ib: split out processing user provided packages
authorTomasz Maciej Nowak <tmn505@gmail.com>
Tue, 11 Jul 2023 14:06:21 +0000 (16:06 +0200)
committerChristian Lamparter <chunkeey@gmail.com>
Thu, 20 Jul 2023 09:31:08 +0000 (11:31 +0200)
Some device recipes remove default target packages. If user tries to add
them back they will be ignored, since packages list is processed in one
go. Process the device recipe packages first and do user ones later, so
additions won't get filtered out.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
(cherry picked from commit e40b9a7fa002154e85459791101a0444d99dfb86)

target/imagebuilder/files/Makefile

index eadb0ebe8522e4a933db70f57d31d4d2b924871e..a8708bc882b99ca687ab38319fdc7aaca7d83754 100644 (file)
@@ -108,9 +108,11 @@ _call_info: FORCE
        echo 'Available Profiles:'
        echo; $(PROFILE_LIST)
 
-BUILD_PACKAGES:=$(USER_PACKAGES) $(sort $(DEFAULT_PACKAGES) $($(USER_PROFILE)_PACKAGES) kernel)
+BUILD_PACKAGES:=$(sort $(DEFAULT_PACKAGES) $($(USER_PROFILE)_PACKAGES) kernel)
 # "-pkgname" in the package list means remove "pkgname" from the package list
 BUILD_PACKAGES:=$(filter-out $(filter -%,$(BUILD_PACKAGES)) $(patsubst -%,%,$(filter -%,$(BUILD_PACKAGES))),$(BUILD_PACKAGES))
+BUILD_PACKAGES:=$(USER_PACKAGES) $(BUILD_PACKAGES)
+BUILD_PACKAGES:=$(filter-out $(filter -%,$(BUILD_PACKAGES)) $(patsubst -%,%,$(filter -%,$(BUILD_PACKAGES))),$(BUILD_PACKAGES))
 PACKAGES:=
 
 _call_image: staging_dir/host/.prereq-build