From d0e0824a2bb60d2b1afefc3849871a6bf8cd04b9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sat, 10 Dec 2016 22:46:42 -0500 Subject: [PATCH] mkosi: fix overriding of boolean arguments The command line should have higher priority then the configuration file, but this wouldn't work when the config file said yes and command line no. --- mkosi | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/mkosi b/mkosi index a89073620..73f2ec272 100755 --- a/mkosi +++ b/mkosi @@ -1399,22 +1399,22 @@ def process_setting(args, section, key, value): if args.output is None: args.output = value elif key == "Force": - if not args.force: + if args.force is None: args.force = parse_boolean(value) elif key == "Bootable": - if not args.bootable: + if args.bootable is None: args.bootable = parse_boolean(value) elif key == "ReadOnly": - if not args.read_only: + if args.read_only is None: args.read_only = parse_boolean(value) elif key == "Verity": - if not args.verity: + if args.verity is None: args.verity = parse_boolean(value) elif key == "Compress": - if not args.compress: + if args.compress is None: args.compress = parse_boolean(value) elif key == "XZ": - if not args.xz: + if args.xz is None: args.xz = parse_boolean(value) elif key is None: return True @@ -1428,7 +1428,7 @@ def process_setting(args, section, key, value): else: args.packages.extend(list_value) elif key == "WithDocs": - if not args.with_docs: + if args.with_docs is None: args.with_docs = parse_boolean(value) elif key == "Cache": if args.cache_path is None: @@ -1480,10 +1480,10 @@ def process_setting(args, section, key, value): return False elif section == "Validation": if key == "CheckSum": - if not args.checksum: + if args.checksum is None: args.checksum = parse_boolean(value) elif key == "Sign": - if not args.sign: + if args.sign is None: args.sign = parse_boolean(value) elif key == "Key": if args.key is None: -- 2.47.2