fix kpackages() API
This function's got its argument order chosen for "aesthetical" reason of $(2) following $(1) in the macros but the logical order is exactly the opposite: we care for kernel flavour much more than for module set (which is dependent upon it). So while silent dropout of kernel-image if KFLAVOURS is set but KMODULES is empty could be fixed by testing for $(2) only, it looks like a good time to fix this discrepancy altogether.
This commit is contained in:
parent
8faf140777
commit
6f452182fd
@ -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))
|
||||
|
@ -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)))$$)
|
||||
|
@ -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) \
|
||||
|
@ -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
|
||||
|
@ -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))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user