Author: blogic
Date: 2014-09-15 12:18:56 +0200 (Mon, 15 Sep 2014)
New Revision: 42547

Modified:
   trunk/include/package-defaults.mk
Log:
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 <[email protected]>
Signed-off-by: Mathieu Olivari <[email protected]>

Modified: trunk/include/package-defaults.mk
===================================================================
--- trunk/include/package-defaults.mk   2014-09-15 10:18:50 UTC (rev 42546)
+++ trunk/include/package-defaults.mk   2014-09-15 10:18:56 UTC (rev 42547)
@@ -98,7 +98,9 @@
 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)); \
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to