diff --git a/features.in/kernel/lib/10-kernel.mk b/features.in/kernel/lib/10-kernel.mk index 34dba6e4..436c6a68 100644 --- a/features.in/kernel/lib/10-kernel.mk +++ b/features.in/kernel/lib/10-kernel.mk @@ -2,5 +2,5 @@ # take care for kernel bits DOT_BASE += $(call kpackages, \ - $(THE_KMODULES) $(BASE_KMODULES) $(BASE_KMODULES_REGEXP), \ - $(KFLAVOURS)) + $(KFLAVOURS), \ + $(THE_KMODULES) $(BASE_KMODULES) $(BASE_KMODULES_REGEXP)) diff --git a/image.in/functions.mk b/image.in/functions.mk index 81e91f96..8148c47a 100644 --- a/image.in/functions.mk +++ b/image.in/functions.mk @@ -22,9 +22,10 @@ SPACE := $(NULL) # the officially documented way of getting a space list2re = $(subst $(SPACE),|,$(strip $(1))) -# args: KMODULES, KFLAVOURS -kpackages = $(and $(1),$(2), \ - ^kernel-(image|modules-($(call list2re,$(1))))-($(call list2re,$(2)))$$) +# args: KFLAVOURS, KMODULES +# NB: $(2) could be empty +kpackages = $(and $(1), \ + ^kernel-(image|modules-($(call list2re,$(2))))-($(call list2re,$(1)))$$) # arg: branding subpackages branding = $(and $(1),^branding-$(BRANDING)-($(call list2re,$(1)))$$) diff --git a/sub.in/main/Makefile b/sub.in/main/Makefile index 915f33ac..7b93a962 100644 --- a/sub.in/main/Makefile +++ b/sub.in/main/Makefile @@ -16,11 +16,11 @@ IMAGE_PACKAGES_REGEXP = $(THE_PACKAGES_REGEXP) \ $(BASE_PACKAGES_REGEXP) \ $(MAIN_PACKAGES_REGEXP) \ $(call kpackages, \ + $(KFLAVOURS), \ $(THE_KMODULES) \ $(BASE_KMODULES) \ $(BASE_KMODULES_REGEXP) \ - $(MAIN_KMODULES), \ - $(KFLAVOURS)) + $(MAIN_KMODULES)) IMAGE_PACKAGES = $(call map,list, \ $(THE_LISTS) $(THE_GROUPS) \ diff --git a/sub.in/stage1/Makefile b/sub.in/stage1/Makefile index 5d90cfef..a6589085 100644 --- a/sub.in/stage1/Makefile +++ b/sub.in/stage1/Makefile @@ -26,10 +26,10 @@ STAGE1_KFLAVOUR ?= $(lastword $(KFLAVOURS)) # propagator needed iff stage1 kernel installed (not for e.g. syslinux.iso) ifneq "$(STAGE1_KFLAVOUR)" "" -INFO_STAGE1_KFLAVOUR := $(STAGE1_KFLAVOUR) +GLOBAL_STAGE1_KFLAVOUR := $(STAGE1_KFLAVOUR) CHROOT_PACKAGES_REGEXP := $(call kpackages, \ - $(STAGE1_KMODULES_REGEXP),$(STAGE1_KFLAVOUR)) -ifneq "$(findstring stage2,$(SUBPROFILES))" "" + $(STAGE1_KFLAVOUR),$(STAGE1_KMODULES_REGEXP)) +ifneq "$(findstring stage2,$(SUBPROFILES))" "" ### assumes stage2 ~ propagator PROPAGATOR_VERSION = ALT Linux PROPAGATOR_MAR_MODULES = ./modules PROPAGATOR_INITFS = ./initfs diff --git a/sub.in/stage2/Makefile b/sub.in/stage2/Makefile index b5b7a92e..9fccca9e 100644 --- a/sub.in/stage2/Makefile +++ b/sub.in/stage2/Makefile @@ -34,9 +34,9 @@ endif # need kernel modules only (which require corresponding kernel-image); # these go into work chroot; NB: no vmlinuz there (unless live-install) IMAGE_PACKAGES_REGEXP += $(call kpackages, \ + $(STAGE1_KFLAVOUR), \ $(STAGE1_KMODULES) $(STAGE1_KMODULES_REGEXP) \ - $(STAGE2_KMODULES) $(STAGE2_KMODULES_REGEXP), \ - $(STAGE1_KFLAVOUR)) + $(STAGE2_KMODULES) $(STAGE2_KMODULES_REGEXP)) -include $(sort $(wildcard lib/*.mk))