action="store_true",
default=False,
)
+ parser.add_argument(
+ "--append",
+ help="All settings passed after this argument will be parsed after all configuration files are parsed",
+ action="store_true",
+ )
# These can be removed once mkosi v15 is available in LTS distros and compatibility with <= v14
# is no longer needed in build infrastructure (e.g.: OBS).
parser.add_argument(
defaults = argparse.Namespace()
parsed_includes: set[tuple[int, int]] = set()
immutable_settings: set[str] = set()
+ append = False
def expand_specifiers(text: str, path: Path) -> str:
percent = False
) -> None:
assert option_string is not None
+ if getattr(namespace, "append", False) != append:
+ return
+
if values is None and self.nargs == "?":
values = self.const or "yes"
finalize_defaults()
images = [namespace]
+ append = True
+
+ for ns in images:
+ argparser.parse_args(argv, ns)
+
for s in vars(cli_ns):
if s not in SETTINGS_LOOKUP_BY_DEST:
continue
: Show the summary output as JSON-SEQ.
+`--append`
+
+: All settings passed after this argument will be parsed after all
+ configuration files have been parsed.
+
+: Note that any setting passed this way will not have any affect on
+ `[Match]` sections as they will only be parsed after all `[Match]`
+ sections have already been evaluated.
+
## Supported output formats
The following output formats are supported: