]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
centos: Install epel-release in both build and final images
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 29 Jan 2023 14:29:40 +0000 (15:29 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 29 Jan 2023 14:42:25 +0000 (15:42 +0100)
This allows mkosi.prepare scripts to install extra dependencies
from epel as well.

mkosi/distributions/centos.py

index b3eb5b6387127df9bebfd279600ea35fd3cb4473..5bf5053da2efe1c47573a30e01c913a857084382 100644 (file)
@@ -69,12 +69,13 @@ class CentosInstaller(DistributionInstaller):
         if state.do_run_build_script:
             packages.update(state.config.build_packages)
 
-        if not state.do_run_build_script and "epel" in state.config.repositories:
+        if "epel" in state.config.repositories:
             add_packages(state.config, packages, "epel-release")
-            if state.config.netdev:
-                add_packages(state.config, packages, "systemd-networkd", conditional="systemd")
-            if state.config.distribution != Distribution.centos and release >= 9:
-                add_packages(state.config, packages, "systemd-boot", conditional="systemd")
+            if not state.do_run_build_script:
+                if state.config.netdev:
+                    add_packages(state.config, packages, "systemd-networkd", conditional="systemd")
+                if state.config.distribution != Distribution.centos and release >= 9:
+                    add_packages(state.config, packages, "systemd-boot", conditional="systemd")
 
         # Make sure we only install the minimal language files by default on CentOS Stream 8 which still
         # defaults to all langpacks.