]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Only parse profiles from subimages and includes if those are dirs 3423/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 24 Jan 2025 11:43:23 +0000 (12:43 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 24 Jan 2025 12:42:12 +0000 (13:42 +0100)
mkosi/config.py

index 79eca8175bd6afa9acd8a1a7baeb03ae581ea224..c918cde584ee2c68c6bd959143714dde58a59e67 100644 (file)
@@ -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