diff options
author | Michael Büsch <mb@bu3sch.de> | 2010-11-04 12:28:55 +0000 |
---|---|---|
committer | Michael Büsch <mb@bu3sch.de> | 2010-11-04 12:28:55 +0000 |
commit | 8238fd39712b717c4a0a40295664b85646302b80 (patch) | |
tree | 8441b518d39ad18d7d478609bb77e85c5d754687 /include | |
parent | 04ad609d2856afb8b9d57815af430296b2eb6000 (diff) | |
download | upstream-8238fd39712b717c4a0a40295664b85646302b80.tar.gz upstream-8238fd39712b717c4a0a40295664b85646302b80.tar.bz2 upstream-8238fd39712b717c4a0a40295664b85646302b80.zip |
Lock copying of directory trees to the staging dir with the "staging-dir" lock. This lock probably has to be taken elsewhere, too.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23857 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include')
-rw-r--r-- | include/package.mk | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/package.mk b/include/package.mk index 2d3a5d0966..712b793d0d 100644 --- a/include/package.mk +++ b/include/package.mk @@ -132,8 +132,10 @@ define Build/DefaultTargets $(call $(hook),$(TMP_DIR)/stage-$(PKG_NAME),$(TMP_DIR)/stage-$(PKG_NAME)/host)$(sep)\ ) if [ -d $(TMP_DIR)/stage-$(PKG_NAME) ]; then \ - (cd $(TMP_DIR)/stage-$(PKG_NAME); find ./ > $(STAGING_DIR)/packages/$(STAGING_FILES_LIST)); \ - $(CP) $(TMP_DIR)/stage-$(PKG_NAME)/* $(STAGING_DIR)/; \ + $(call locked, \ + (cd $(TMP_DIR)/stage-$(PKG_NAME); find ./ > $(STAGING_DIR)/packages/$(STAGING_FILES_LIST)); \ + $(CP) $(TMP_DIR)/stage-$(PKG_NAME)/* $(STAGING_DIR)/; \ + ,staging-dir); \ fi rm -rf $(TMP_DIR)/stage-$(PKG_NAME) touch $$@ |