group.add_argument('-t', "--format", dest='output_format', choices=OutputFormat.__members__, help='Output Format')
group.add_argument('-o', "--output", help='Output image path', metavar='PATH')
group.add_argument('-f', "--force", action='store_true', help='Remove existing image file before operation')
- group.add_argument('-b', "--bootable", action='store_true', help='Make image bootable on EFI (only raw_gpt, raw_btrfs)')
+ group.add_argument('-b', "--bootable", type=parse_boolean, nargs='?', const=True,
+ help='Make image bootable on EFI (only raw_gpt, raw_btrfs)')
group.add_argument("--read-only", action='store_true', help='Make root volume read-only (only raw_btrfs, subvolume)')
group.add_argument("--compress", action='store_true', help='Enable compression in file system (only raw_btrfs, subvolume)')
group.add_argument("--xz", action='store_true', help='Compress resulting image with xz (only raw_gpt, raw_btrfs, implied on tar)')
group.add_argument("--build-script", help='Build script to run inside image', metavar='PATH')
group.add_argument("--build-sources", help='Path for sources to build', metavar='PATH')
group.add_argument("--build-package", action=PackageAction, dest='build_packages', help='Additional packages needed for build script', metavar='PACKAGE')
- group.add_argument('--use-git-files', type=bool,
+ group.add_argument('--use-git-files', type=parse_boolean,
help='Ignore any files that git itself ignores (default: guess)')
group.add_argument("--settings", dest='nspawn_settings', help='Add in .spawn settings file', metavar='PATH')
if s in {"0", "false", "no"}:
return False
- return KeyError("Unknown setting")
+ raise ValueError("invalid literal for bool(): {!r}".format(s))
def process_setting(args, section, key, value):
if section == "Distribution":