build: fix opkg install step for large package selection
[openwrt/staging/dedeckeh.git] / package / Makefile
index ec503dc5273d43d6cec3699e50dd654f23ceda99..209be34674747a728606f0c8b2d7dbcd2930ba7b 100644 (file)
@@ -66,8 +66,10 @@ $(curdir)/install: $(TMP_DIR)/.build $(curdir)/merge $(if $(CONFIG_TARGET_PER_DE
        - find $(STAGING_DIR_ROOT) -type d | $(XARGS) chmod 0755
        rm -rf $(TARGET_DIR) $(TARGET_DIR_ORIG)
        mkdir -p $(TARGET_DIR)/tmp
-       $(call opkg,$(TARGET_DIR)) install \
-               $(call opkg_package_files,$(foreach pkg,$(shell cat $(PACKAGE_INSTALL_FILES) 2>/dev/null),$(pkg)$(call GetABISuffix,$(pkg))))
+       $(file >$(TMP_DIR)/opkg_install_list,\
+         $(call opkg_package_files,\
+           $(foreach pkg,$(shell cat $(PACKAGE_INSTALL_FILES) 2>/dev/null),$(pkg)$(call GetABISuffix,$(pkg)))))
+       $(call opkg,$(TARGET_DIR)) install $$(cat $(TMP_DIR)/opkg_install_list)
        @for file in $(PACKAGE_INSTALL_FILES); do \
                [ -s $$file.flags ] || continue; \
                for flag in `cat $$file.flags`; do \