[openwrt/openwrt] imagebuilder: cleanup package inclusion

LEDE Commits lede-commits at lists.infradead.org
Sat Nov 9 07:46:58 PST 2024


aparcar pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/15b7994c0198bef0b59bc78880529017387a239d

commit 15b7994c0198bef0b59bc78880529017387a239d
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Wed Nov 6 16:34:32 2024 +0100

    imagebuilder: cleanup package inclusion
    
    Previously three different ways to include packages in an ImageBuilder
    existed:
    
    * buildbot: include libc, kernel (and base-files) in $(IB_LDIR)
    * not buildbot, standalone: include all packages in ./packages/
    * not buildbot, not standalone: include libc, kernel (and base-files) in
      ./packages/
    
    First of, the separation between *buildbot* and *not buildbot, not
    standalone* is not required, we can just always copy packages to
    ./packages instead of ever using the special place $(IB_LDIR).
    Doing so drops the need to handle the extra case and also allows to
    clean up the OPKG package installation, which no longer requries the
    `firstword` logic, things are now always at ./packages.
    
    Signed-off-by: Paul Spooren <mail at aparcar.org>
---
 target/imagebuilder/Makefile       | 13 ++-----------
 target/imagebuilder/files/Makefile |  4 ++--
 2 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/target/imagebuilder/Makefile b/target/imagebuilder/Makefile
index d455cbcd7a..19f21472bd 100644
--- a/target/imagebuilder/Makefile
+++ b/target/imagebuilder/Makefile
@@ -68,25 +68,16 @@ else
 	echo 'src imagebuilder file:packages'                          >> $(PKG_BUILD_DIR)/repositories.conf
 endif
 
-ifeq ($(CONFIG_BUILDBOT),)
-  ifeq ($(CONFIG_IB_STANDALONE),)
+ifeq ($(CONFIG_IB_STANDALONE),)
 	$(FIND) $(call FeedPackageDir,libc) -type f \
 	  \( \
 		-name 'base-files-*.$(PACKAGE_SUFFIX)' -or \
 		-name 'libc-*.$(PACKAGE_SUFFIX)' -or \
 		-name 'kernel-*.$(PACKAGE_SUFFIX)' \) \
 	  -exec $(CP) -t $(PKG_BUILD_DIR)/packages {} +
-  else
+else
 	$(FIND) $(wildcard $(PACKAGE_SUBDIRS)) -type f -name '*.$(PACKAGE_SUFFIX)' \
 		-exec $(CP) -t $(PKG_BUILD_DIR)/packages/ {} +
-  endif
-else
-	$(FIND) $(call FeedPackageDir,libc) -type f \
-		\( \
-		  -name 'base-files-*.$(PACKAGE_SUFFIX)' -or \
-		  -name 'libc-*.$(PACKAGE_SUFFIX)' -or \
-		  -name 'kernel-*.$(PACKAGE_SUFFIX)' \) \
-		-exec $(CP) -t $(IB_LDIR)/ {} +
 endif
 
 ifneq ($(CONFIG_SIGNATURE_CHECK),)
diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile
index 1ac05baa50..914609ada1 100644
--- a/target/imagebuilder/files/Makefile
+++ b/target/imagebuilder/files/Makefile
@@ -222,8 +222,8 @@ package_install: FORCE
 	@echo
 	@echo Installing packages...
 ifeq ($(CONFIG_USE_APK),)
-	$(OPKG) install $(firstword $(wildcard $(LINUX_DIR)/libc_*.ipk $(PACKAGE_DIR)/libc_*.ipk))
-	$(OPKG) install $(firstword $(wildcard $(LINUX_DIR)/kernel_*.ipk $(PACKAGE_DIR)/kernel_*.ipk))
+	$(OPKG) install $(wildcard $(PACKAGE_DIR)/libc_*.ipk)
+	$(OPKG) install $(wildcard $(PACKAGE_DIR)/kernel_*.ipk)
 	$(OPKG) install $(BUILD_PACKAGES)
 else
 	$(APK) add --no-scripts $(BUILD_PACKAGES)




More information about the lede-commits mailing list