[PATCH] ib: split out processing user provided packages
Tomasz Maciej Nowak
tmn505 at terefe.re
Tue Jul 11 07:06:21 PDT 2023
From: Tomasz Maciej Nowak <tmn505 at gmail.com>
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 at gmail.com>
---
Test case is simple, download ath79 SDK and invoke:
make image PROFILE=ubnt_routerstation PACKAGES=kmod-ath9k
The resulting image won't include kmod-ath9k.
target/imagebuilder/files/Makefile | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile
index 502037379245..78ec7e2e94a9 100644
--- a/target/imagebuilder/files/Makefile
+++ b/target/imagebuilder/files/Makefile
@@ -127,9 +127,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
--
2.41.0
More information about the openwrt-devel
mailing list