summaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2016-09-25 09:30:55 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2016-09-25 09:30:55 +0200
commit663145e419410876f6a962e7f3461ed73eb50831 (patch)
tree92893603e2313927cb9b9ef747fc4859198d68e6 /package
parentce89535bce052c9463e32ad83b950d00c988c21f (diff)
downloadmaster-31e0f0ae-663145e419410876f6a962e7f3461ed73eb50831.tar.gz
master-31e0f0ae-663145e419410876f6a962e7f3461ed73eb50831.tar.bz2
master-31e0f0ae-663145e419410876f6a962e7f3461ed73eb50831.zip
image: fix CONFIG_CLEAN_IPKG with CONFIG_TARGET_PER_DEVICE_ROOTFS
Running prepare_rootfs on TARGET_DIR deletes the opkg state when CONFIG_CLEAN_IPKG is enabled, making the per-device rootfs package install fail. To avoid this, create a copy of the TARGET_DIR before prepare_rootfs is run and use this as basis for per-device rootfs generation. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Diffstat (limited to 'package')
-rw-r--r--package/Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/package/Makefile b/package/Makefile
index 9f39395bae..8726e2eae9 100644
--- a/package/Makefile
+++ b/package/Makefile
@@ -54,7 +54,7 @@ $(curdir)/merge-index: $(curdir)/merge
$(curdir)/install: $(TMP_DIR)/.build $(curdir)/system/opkg/host/install $(curdir)/merge $(if $(CONFIG_TARGET_PER_DEVICE_ROOTFS),$(curdir)/merge-index)
- find $(STAGING_DIR_ROOT) -type d | $(XARGS) chmod 0755
- rm -rf $(TARGET_DIR)
+ rm -rf $(TARGET_DIR) $(TARGET_DIR_ORIG)
[ -d $(TARGET_DIR)/tmp ] || mkdir -p $(TARGET_DIR)/tmp
$(call opkg,$(TARGET_DIR)) install \
$(call opkg_package_files,$(shell cat $(PACKAGE_INSTALL_FILES) 2>/dev/null))
@@ -65,6 +65,9 @@ $(curdir)/install: $(TMP_DIR)/.build $(curdir)/system/opkg/host/install $(curdir
done; \
done || true
@-$(MAKE) package/preconfig
+
+ $(CP) $(TARGET_DIR) $(TARGET_DIR_ORIG)
+
$(call prepare_rootfs,$(TARGET_DIR))
PASSOPT=""