From: Daan De Meyer Date: Fri, 24 Jan 2025 11:43:23 +0000 (+0100) Subject: Only parse profiles from subimages and includes if those are dirs X-Git-Tag: v25.2~2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F3423%2Fhead;p=thirdparty%2Fmkosi.git Only parse profiles from subimages and includes if those are dirs --- diff --git a/mkosi/config.py b/mkosi/config.py index 79eca8175..c918cde58 100644 --- a/mkosi/config.py +++ b/mkosi/config.py @@ -4151,7 +4151,7 @@ class ParseContext: ) with chdir(path if path.is_dir() else Path.cwd()): - self.parse_config_one(path if path.is_file() else Path.cwd(), parse_profiles=True) + self.parse_config_one(path if path.is_file() else Path.cwd(), parse_profiles=p.is_dir()) def finalize_value(self, setting: ConfigSetting[T]) -> Optional[T]: # If a value was specified on the CLI, it always takes priority. If the setting is a collection of @@ -4603,7 +4603,7 @@ def parse_config( with chdir(p if p.is_dir() else Path.cwd()): if not context.parse_config_one( p if p.is_file() else Path.cwd(), - parse_profiles=True, + parse_profiles=p.is_dir(), parse_local=True, ): continue