Skip to content

Commit 180465c

Browse files
committed
build: create a package feed directory containing all packages
Needed for proper dependency handling for per-device rootfs Signed-off-by: Felix Fietkau <[email protected]>
1 parent e351f7c commit 180465c

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

include/feeds.mk

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ ifneq ($(CONFIG_PER_FEED_REPO),)
2323
endif
2424
endif
2525

26+
PACKAGE_DIR_ALL := $(PACKAGE_DIR)_all
27+
2628
PKG_CONFIG_DEPENDS += \
2729
CONFIG_PER_FEED_REPO \
2830
CONFIG_PER_FEED_REPO_ADD_DISABLED \

package/Makefile

+9-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,15 @@ PACKAGE_INSTALL_FILES:= \
4444
$(curdir)/cleanup: $(TMP_DIR)/.build
4545
rm -rf $(STAGING_DIR_ROOT)
4646

47-
$(curdir)/install: $(TMP_DIR)/.build $(curdir)/system/opkg/host/install
47+
$(curdir)/merge:
48+
rm -rf $(PACKAGE_DIR_ALL)
49+
mkdir -p $(PACKAGE_DIR_ALL)
50+
-$(foreach pdir,$(PACKAGE_SUBDIRS),$(if $(wildcard $(pdir)/*.ipk),ln -s $(pdir)/*.ipk $(PACKAGE_DIR_ALL);))
51+
52+
$(curdir)/merge-index: $(curdir)/merge
53+
(cd $(PACKAGE_DIR_ALL) && $(SCRIPT_DIR)/ipkg-make-index.sh . 2>&1 > Packages; )
54+
55+
$(curdir)/install: $(TMP_DIR)/.build $(curdir)/system/opkg/host/install $(curdir)/merge $(if $(CONFIG_TARGET_PER_DEVICE_ROOTFS),$(curdir)/merge-index)
4856
- find $(STAGING_DIR_ROOT) -type d | $(XARGS) chmod 0755
4957
rm -rf $(TARGET_DIR)
5058
[ -d $(TARGET_DIR)/tmp ] || mkdir -p $(TARGET_DIR)/tmp

0 commit comments

Comments
 (0)