diff --git a/features.in/build-vm/config.mk b/features.in/build-vm/config.mk index b7b3ff13..6a2f7343 100644 --- a/features.in/build-vm/config.mk +++ b/features.in/build-vm/config.mk @@ -1,3 +1,4 @@ # hooked from ../../lib/sugar.mk use/build-vm: @$(call add_feature) + @$(call xport,ROOTPW) diff --git a/features.in/cleanup/config.mk b/features.in/cleanup/config.mk index 3ef209b4..33b5fdba 100644 --- a/features.in/cleanup/config.mk +++ b/features.in/cleanup/config.mk @@ -1,5 +1,6 @@ use/cleanup: @$(call add_feature) + @$(call xport,CLEANUP_PACKAGES) use/cleanup/installer: use/cleanup @$(call add,CLEANUP_PACKAGES,'installer-*') diff --git a/features.in/install2/config.mk b/features.in/install2/config.mk index 33fc243a..123a1da5 100644 --- a/features.in/install2/config.mk +++ b/features.in/install2/config.mk @@ -5,6 +5,7 @@ use/install2: use/stage2 sub/stage2/install2 use/metadata use/cleanup/installer @$(call add,INSTALL2_PACKAGES,branding-$$(BRANDING)-alterator) @$(call add,BASE_PACKAGES,branding-$$(BRANDING)-release) @$(call add,BASE_LISTS,$(call tags,basesystem)) + @$(call xport,BASE_BOOTLOADER) use/install2/net: use/install2 @$(call add,INSTALL2_PACKAGES,curl) diff --git a/features.in/install2/install2/stage2cfg.mk b/features.in/install2/install2/stage2cfg.mk index 7b63873f..327cf0bb 100644 --- a/features.in/install2/install2/stage2cfg.mk +++ b/features.in/install2/install2/stage2cfg.mk @@ -8,9 +8,6 @@ MKI_PACK_RESULTS = squash:altinst # also removed in a cleanup hook but to spare a few cycles... HSH_EXCLUDE_DOCS = 1 -# pass downstream -GLOBAL_BASE_BOOTLOADER := $(BASE_BOOTLOADER) - debug:: @echo "** install2: IMAGE_PACKAGES: $(IMAGE_PACKAGES)" @echo "** install2: IMAGE_PACKAGES_REGEXP: $(IMAGE_PACKAGES_REGEXP)" diff --git a/lib/functions.mk b/lib/functions.mk index ac474e2c..6a3f38c4 100644 --- a/lib/functions.mk +++ b/lib/functions.mk @@ -36,6 +36,14 @@ define try_body printf '%s ?= %s\n' '$(1)' '$(2)' >> "$(CONFIG)"; } endef +# xport() requests a variable to be exported to the scripts +xport = $(and $(1),$(xport_body)) +define xport_body +{ $(log_body); \ +v='$(1:GLOBAL_%=%)'; \ +printf 'export GLOBAL_%s = $$(%s)\n' "$$v" "$$v" >> "$(CONFIG)"; } +endef + # if the rule being executed isn't logged yet, log it define log_body { [ -s "$(CONFIG)" ] && \