]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Check /etc/os-release as well in configure_os_release()
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 8 Aug 2024 11:09:02 +0000 (13:09 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 8 Aug 2024 11:09:02 +0000 (13:09 +0200)
It might not be a symlink. If that's the case, fix it up as well.

mkosi/__init__.py

index b17ac2f7ea48142428b04bc366a11e50fee62764..a83c7d19d1b077d03f8c34391b804bdfb0289fdc 100644 (file)
@@ -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")