]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
opensuse: do not install openSUSE-release for Leap >= 16.0
authorAntonio Alvarez Feijoo <antonio.feijoo@suse.com>
Tue, 18 Nov 2025 13:15:54 +0000 (14:15 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 18 Nov 2025 14:47:03 +0000 (15:47 +0100)
The `openSUSE-release` package was renamed to `Leap-release` for Leap after
16.0, so it cannot be installed there.

mkosi/distribution/opensuse.py

index 498520142e0ff6080d58335dfe115a7828948b1f..e0b2d5ff5fc84bb8ddc9830af7ae57283b7bfa7e 100644 (file)
@@ -56,7 +56,12 @@ class Installer(DistributionInstaller, distribution=Distribution.opensuse):
     def install(cls, context: Context) -> None:
         packages = ["filesystem"]
         if not any(p.endswith("-release") for p in context.config.packages):
-            packages += ["openSUSE-release"]
+            if context.config.release in ("current", "stable", "leap") or (
+                context.config.release != "tumbleweed" and GenericVersion(context.config.release) >= 16
+            ):
+                packages += ["Leap-release"]
+            else:
+                packages += ["openSUSE-release"]
 
         cls.install_packages(context, packages, apivfs=False)