diff --git a/mkosi/config.py b/mkosi/config.py index c966260a8..630c16840 100644 --- a/mkosi/config.py +++ b/mkosi/config.py @@ -4616,6 +4616,9 @@ def parse_new_includes(self) -> None: else: path = p + if not path.exists(): + logging.warning(f"{path.absolute()}: Include file {p} does not exist, ignoring") + continue st = path.stat() if (st.st_dev, st.st_ino) in self.includes: @@ -4813,6 +4816,8 @@ def parse_config_one(self, path: Path, parse_profiles: bool = False, parse_local for localpath in ( *([p] if (p := path.parent / "mkosi.local").is_dir() else []), *([p] if (p := path.parent / "mkosi.local.conf").is_file() else []), + # Support top-level entry point automatically extracted by OBS + *([p] if (p := Path("/usr/src/packages/SOURCES/mkosi.conf")).is_file() else []), ): with chdir(localpath if localpath.is_dir() else Path.cwd()): self.parse_config_one(localpath if localpath.is_file() else Path.cwd())