osbuild2/tar: don't omit explicit false values in options
The `tar` stage options contain three boolean values. All of them
default to `true` in the osbuild stage implementation [1]. However
if these values were explicitly set to `false`, they would be omitted
from the resulting JSON structure. As a result, it was impossible to use
any non-default values.
Use `*bool` instead of `bool`, to ensure that explicitly set `false`
values will end up in the JSON structure passed to osbuild.
[1] 8102f20d23/stages/org.osbuild.tar (L39-L53)
Signed-off-by: Tomas Hozza <thozza@redhat.com>
This commit is contained in:
parent
bd81506831
commit
1b618b1015
1 changed files with 3 additions and 3 deletions
|
|
@ -29,13 +29,13 @@ type TarStageOptions struct {
|
|||
Format TarArchiveFormat `json:"format,omitempty"`
|
||||
|
||||
// Enable support for POSIX ACLs
|
||||
ACLs bool `json:"acls,omitempty"`
|
||||
ACLs *bool `json:"acls,omitempty"`
|
||||
|
||||
// Enable support for SELinux contexts
|
||||
SELinux bool `json:"selinux,omitempty"`
|
||||
SELinux *bool `json:"selinux,omitempty"`
|
||||
|
||||
// Enable support for extended attributes
|
||||
Xattrs bool `json:"xattrs,omitempty"`
|
||||
Xattrs *bool `json:"xattrs,omitempty"`
|
||||
|
||||
// How to handle the root node: include or omit
|
||||
RootNode TarRootNode `json:"root-node,omitempty"`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue