From: Daan De Meyer Date: Thu, 8 Aug 2024 11:09:02 +0000 (+0200) Subject: Check /etc/os-release as well in configure_os_release() X-Git-Tag: v25~365^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0873f38f035190ffaf2026bde68e6501a1f6b68;p=thirdparty%2Fmkosi.git Check /etc/os-release as well in configure_os_release() It might not be a symlink. If that's the case, fix it up as well. --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index b17ac2f7e..a83c7d19d 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -240,7 +240,7 @@ def configure_os_release(context: Context) -> None: if context.config.overlay or context.config.output_format in (OutputFormat.sysext, OutputFormat.confext): return - for candidate in ["usr/lib/os-release", "usr/lib/initrd-release"]: + for candidate in ["usr/lib/os-release", "usr/lib/initrd-release", "etc/os-release"]: osrelease = context.root / candidate # at this point we know we will either change or add to the file newosrelease = osrelease.with_suffix(".new")