aboutsummaryrefslogtreecommitdiffstats
path: root/include/package-defaults.mk
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2014-09-15 10:18:56 +0000
committerJohn Crispin <blogic@openwrt.org>2014-09-15 10:18:56 +0000
commit4ddb54c8450e5fe505f67b408375a71c7a7abdfe (patch)
tree34904d652e793572e7cab209241b2a87a63a7ace /include/package-defaults.mk
parent0e1d6368706d6913ea6e101f7273d7583274a33d (diff)
downloadmaster-187ad058-4ddb54c8450e5fe505f67b408375a71c7a7abdfe.tar.gz
master-187ad058-4ddb54c8450e5fe505f67b408375a71c7a7abdfe.tar.bz2
master-187ad058-4ddb54c8450e5fe505f67b408375a71c7a7abdfe.zip
include: remove file before overwritting it with replace_script
config.{sub,guess} could be symlinks to a shared common version of this file (e.g. in staging). So we remove the destination file via --remove-destination option of cp. This prevents replaceing the common file that other packages could be build with if running at the same time. This fixes a class of errors where config.sub is missing, or only partially present when running configure because a cp is currently in progress This is commonly seen building with a lot of parallel jobs and on packages that use 'PKG_FIXUP:=autoreconf' Signed-off-by: Matthew McClintock <mmcclint@qca.qualcomm.com> Signed-off-by: Mathieu Olivari <mathieu@qca.qualcomm.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42547 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include/package-defaults.mk')
-rw-r--r--include/package-defaults.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/package-defaults.mk b/include/package-defaults.mk
index 61e495f50f..051cde5020 100644
--- a/include/package-defaults.mk
+++ b/include/package-defaults.mk
@@ -98,7 +98,9 @@ CONFIGURE_VARS = \
CONFIGURE_PATH = .
CONFIGURE_CMD = ./configure
-replace_script=$(FIND) $(1) -name $(2) | $(XARGS) chmod u+w; $(FIND) $(1) -name $(2) | $(XARGS) -n1 cp $(SCRIPT_DIR)/$(2);
+replace_script=$(FIND) $(1) -name $(2) | $(XARGS) chmod u+w; \
+ $(FIND) $(1) -name $(2) | $(XARGS) -n1 cp --remove-destination \
+ $(SCRIPT_DIR)/$(2);
define Build/Configure/Default
(cd $(PKG_BUILD_DIR)/$(CONFIGURE_PATH)/$(strip $(3)); \