Revert "Fix dnf failure by adding /run mount, removing --cacheonly, and ensuring host-config usage"

This reverts commit 951a1b7fdc.
This commit is contained in:
2026-02-05 19:43:12 +01:00
parent 74fedf9001
commit 5238fd29d9

View File

@@ -76,10 +76,10 @@ def run_command(cmd, check=True):
@contextmanager @contextmanager
def mount_pseudo_fs(mount_root): def mount_pseudo_fs(mount_root):
""" """
Context manager to bind mount /dev, /proc, /sys, /run, and efivarfs into mount_root. Context manager to bind mount /dev, /proc, /sys, and efivarfs into mount_root.
""" """
logger.info(f"Mounting pseudo-filesystems to {mount_root}...") logger.info(f"Mounting pseudo-filesystems to {mount_root}...")
mounts = ["dev", "proc", "sys", "run"] mounts = ["dev", "proc", "sys"]
mounted_paths = [] mounted_paths = []
try: try:
@@ -230,7 +230,7 @@ def install_minimal_os(mount_root, releasever=None):
"coreutils", "coreutils",
"kernel", "kernel",
"systemd", "systemd",
"systemd-boot", "systemd-boot-unsigned",
"dnf", "dnf",
"shadow-utils", "shadow-utils",
"util-linux", "util-linux",
@@ -251,6 +251,7 @@ def install_minimal_os(mount_root, releasever=None):
f"--repofrompath=iridium-iso,{iso_repo}", f"--repofrompath=iridium-iso,{iso_repo}",
"--enablerepo=iridium-iso", "--enablerepo=iridium-iso",
"--nogpgcheck", "--nogpgcheck",
"--cacheonly",
"--setopt=iridium-iso.gpgcheck=0", "--setopt=iridium-iso.gpgcheck=0",
"--setopt=metadata_expire=-1", "--setopt=metadata_expire=-1",
] ]
@@ -270,11 +271,13 @@ def install_minimal_os(mount_root, releasever=None):
"-y", "-y",
f"--installroot={mount_root}", f"--installroot={mount_root}",
f"--releasever={releasever}", f"--releasever={releasever}",
"--use-host-config",
"--setopt=install_weak_deps=False", "--setopt=install_weak_deps=False",
"--nodocs", "--nodocs",
] ]
if not iso_repo:
cmd.append("--use-host-config")
cmd += dnf_args + packages cmd += dnf_args + packages
with mount_pseudo_fs(mount_root): with mount_pseudo_fs(mount_root):