From 453946bb9f1093aad13f7fa4a012e8b55a8bff20 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Thu, 11 Jul 2024 13:46:39 +0200 Subject: [PATCH] Set RPM_FORCE_DEBIAN=1 for zypper and dnf This stops rpm on Ubuntu from printing noisy warnings about aliens. --- mkosi/installer/dnf.py | 6 ++++++ mkosi/installer/zypper.py | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/mkosi/installer/dnf.py b/mkosi/installer/dnf.py index 331909c47..84807114f 100644 --- a/mkosi/installer/dnf.py +++ b/mkosi/installer/dnf.py @@ -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, diff --git a/mkosi/installer/zypper.py b/mkosi/installer/zypper.py index ed8ec527d..b8c1f9d5c 100644 --- a/mkosi/installer/zypper.py +++ b/mkosi/installer/zypper.py @@ -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]: -- 2.47.2