- `mkosi.version` is now picked up from preset and dropin directories as
well following the usual config precedence logic
-- The "first assignment wins" logic was dropped from configuration
- parsing. Settings parsed later will now override earlier values and
- the `!` operator for lists will now remove values already in the list
- instead of preventing specific values from being added.
-- Add support for configuring custom default values for settings by
+- Removed the "first assignment wins" logic from configuration parsing.
+ Settings parsed later will now override earlier values
+- Removed the `!` operator for lists. Instead, assign the empty string
+ to the list to remove all previous values.
+- Added support for configuring custom default values for settings by
prefixing their name in the configuration file with `@`.
## v15.1
def config_parse_list(value: Optional[str], old: Optional[list[Any]]) -> list[Any]:
new = old.copy() if old else []
- # Empty strings reset the list.
if value is None:
return []
else:
values = value.replace(delimiter, "\n").split("\n")
- for v in values:
- if not v:
- continue
-
- if v.startswith("!"):
- v = v[1:]
- new = [n for n in new if not fnmatch.fnmatchcase(str(n), v)]
- else:
- new.append(parse(v))
+ # Empty strings reset the list.
+ if len(values) == 1 and values[0] == "":
+ return []
- return new
+ return new + [parse(v) for v in values if v]
return config_parse_list
the earlier assignment would be used instead of later assignments.
Settings that take a list of values are merged by appending the new
-values to the previously configured values. If a value of a list setting
-is prefixed with `!`, all existing instances of that value in the list
-are removed. Values prefixed with `!` can be globs to remove more than
-one value.
+values to the previously configured values. Assigning the empty string
+to such a setting removes all previously assigned values.
If a setting's name in the configuration file is prefixed with `@`, it
configures the default value used for that setting if no explicit