From: Daan De Meyer Date: Wed, 9 Aug 2023 06:48:29 +0000 (+0200) Subject: Don't reverse list option values found in the same option X-Git-Tag: v15~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a4bf61201fcdfdd58d5949bff4868898c5ea1fc;p=thirdparty%2Fmkosi.git Don't reverse list option values found in the same option Items from earlier settings should take precedence over items from later settings, but that doesn't mean we should reverse items found in the same setting. Fixes #1707 --- diff --git a/mkosi/config.py b/mkosi/config.py index e3d978bb1..ae77dace1 100644 --- a/mkosi/config.py +++ b/mkosi/config.py @@ -361,6 +361,8 @@ def config_make_list_parser(delimiter: str, else: values = value.replace(delimiter, "\n").split("\n") + new = [] + for v in values: if not v: continue @@ -373,9 +375,9 @@ def config_make_list_parser(delimiter: str, if fnmatch.fnmatchcase(v, i): break else: - l.insert(0, parse(v)) + new.append(parse(v)) - return l + return new + l return config_parse_list