From e5fc77edd957fac0b0496594bd55a9662d3a7a2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20B=C3=BCsch?= Date: Thu, 4 Nov 2010 12:28:55 +0000 Subject: [PATCH] Lock copying of directory trees to the staging dir with the "staging-dir" lock. This lock probably has to be taken elsewhere, too. SVN-Revision: 23857 --- include/package.mk | 6 ++++-- 1 file 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 $$@