From 0be99528ef27e3cdc955b161bd88a87d07bfe147 Mon Sep 17 00:00:00 2001 From: "Jason N." <33561705+JasonN3@users.noreply.github.com> Date: Thu, 7 Mar 2024 13:50:52 -0500 Subject: [PATCH] move condition --- Makefile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index d8966fe..bba4a5a 100644 --- a/Makefile +++ b/Makefile @@ -45,6 +45,13 @@ _LORAX_ARGS += --cachedir $(DNF_CACHE) _LORAX_TEMPLATES += lorax_templates/copy_dnf_cache.tmpl endif +ifeq ($(findstring redhat.repo,$(REPOS)),redhat.repo) +_PLATFORM_ID = platform:el$(VERSION) +else +_PLATFORM_ID = platform:f$(VERSION) +endif + + # Step 7: Buid end ISO ## Default action build/deploy.iso: boot.iso container/$(IMAGE_NAME)-$(IMAGE_TAG) xorriso/input.txt @@ -139,11 +146,7 @@ boot.iso: $(_LORAX_TEMPLATES) $(_REPO_FILES) rm -Rf $(_BASE_DIR)/results || true mv /etc/rpm/macros.image-language-conf /etc/rpm/macros.image-language-conf.orig || true cp /etc/dnf/dnf.conf /etc/dnf/dnf.conf.orig || true - ifeq ($(findstring redhat.repo,$(REPOS)),redhat.repo) - echo "module_platform_id=platform:el${VERSION} >> /etc/dnf/dnf.conf - else - echo "module_platform_id=platform:f${VERSION} >> /etc/dnf/dnf.conf - endif + echo "module_platform_id=$(_PLATFORM_ID) >> /etc/dnf/dnf.conf # Download the secure boot key if [ -n "$(SECURE_BOOT_KEY_URL)" ]; \