]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Set RPM_FORCE_DEBIAN=1 for zypper and dnf 2863/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 11 Jul 2024 11:46:39 +0000 (13:46 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 11 Jul 2024 11:47:29 +0000 (13:47 +0200)
This stops rpm on Ubuntu from printing noisy warnings about aliens.

mkosi/installer/dnf.py
mkosi/installer/zypper.py

index 331909c473a6ea63827ba77b9973cf1b736f2f2b..84807114f4e8466fe5a0cfb1bd39cfceaa39a17d 100644 (file)
@@ -107,6 +107,12 @@ class Dnf(PackageManager):
 
                     f.write("\n")
 
+    @classmethod
+    def finalize_environment(cls, context: Context) -> dict[str, str]:
+        return super().finalize_environment(context) | {
+            "RPM_FORCE_DEBIAN": "1",
+        }
+
     @classmethod
     def cmd(
             cls,
index ed8ec527d08ea81297a9feb297820559b4596a4a..b8c1f9d5c4b4e620377fe10b55552682fd952d62 100644 (file)
@@ -100,7 +100,10 @@ class Zypper(PackageManager):
 
     @classmethod
     def finalize_environment(cls, context: Context) -> dict[str, str]:
-        return super().finalize_environment(context) | {"ZYPP_CONF": "/etc/zypp/zypp.conf"}
+        return super().finalize_environment(context) | {
+            "ZYPP_CONF": "/etc/zypp/zypp.conf",
+            "RPM_FORCE_DEBIAN": "1",
+        }
 
     @classmethod
     def cmd(cls, context: Context) -> list[PathString]: