Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse profiles after mkosi.conf.d #3057

Merged
merged 3 commits into from
Sep 21, 2024
Merged

Conversation

DaanDeMeyer
Copy link
Contributor

Currently profiles can't depend on any of the configuration set in mkosi.conf.d as they are parsed before mkosi.conf.d is parsed. Let's parse the profile related configuration last instead so it can match on all the configuration set in mkosi.conf.d.

To set the distribution and release and such based on the profile, a dropin in mkosi.conf.d can match on the configured profile instead.

@DaanDeMeyer
Copy link
Contributor Author

Added the PR to read mkosi.local on top of this one as it depends on some stuff from the profile one

mkosi/config.py Show resolved Hide resolved
mkosi/config.py Outdated Show resolved Hide resolved
mkosi/config.py Outdated Show resolved Hide resolved
Currently profiles can't depend on any of the configuration set in
mkosi.conf.d as they are parsed before mkosi.conf.d is parsed. Let's
parse the profile related configuration last instead so it can match
on all the configuration set in mkosi.conf.d.

To set the distribution and release and such based on the profile,
a dropin in mkosi.conf.d can match on the configured profile instead.
@behrmann
Copy link
Contributor

LGTM otherwise, but the change from PROFILE to PROFILES needs to be mentioned in the news otherwise this might be a too large footgun.

mkosi/config.py Outdated Show resolved Hide resolved
mkosi/resources/man/mkosi.md Outdated Show resolved Hide resolved
For many use cases it's useful to be able to configure more than one
profile, an example is selecting a generic desktop profile and a more
specific kde profile as well.
@DaanDeMeyer DaanDeMeyer merged commit a26fe14 into systemd:main Sep 21, 2024
29 of 36 checks passed
@DaanDeMeyer DaanDeMeyer deleted the profile branch September 21, 2024 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants