summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias De Maré <mathias.demare@gmail.com>2013-12-10 18:31:30 (GMT)
committer Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2013-12-25 11:36:39 (GMT)
commita10073b6b0a70feea944cbd77914cb51c7a558f1 (patch)
tree1d362f14a8b9346dd6f0cc25236f5be256658cf6
parent5c4b60c7e0d74f92ae7c06c7bd8f732a12e70ca6 (diff)
downloadbuildroot-a10073b6b0a70feea944cbd77914cb51c7a558f1.tar.gz
buildroot-a10073b6b0a70feea944cbd77914cb51c7a558f1.tar.bz2
package: make package download from Mercurial repositories more robust
Previously, when cloning a Mercurial repository, aborting the clone could (in some cases) leave behind an empty directory. As a result, a later clone would fail. Signed-off-by: Mathias De Maré <mathias.demare@gmail.com> Acked-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-rw-r--r--package/pkg-download.mk1
1 files changed, 1 insertions, 0 deletions
diff --git a/package/pkg-download.mk b/package/pkg-download.mk
index 758b211..c00689b 100644
--- a/package/pkg-download.mk
+++ b/package/pkg-download.mk
@@ -178,6 +178,7 @@ endef
define DOWNLOAD_HG
test -e $(DL_DIR)/$($(PKG)_SOURCE) || \
(pushd $(DL_DIR) > /dev/null && \
+ rm -rf $($(PKG)_BASE_NAME) && \
$(HG) clone --noupdate --rev $($(PKG)_DL_VERSION) $($(PKG)_SITE) $($(PKG)_BASE_NAME) && \
$(HG) archive --repository $($(PKG)_BASE_NAME) --type tgz --prefix $($(PKG)_BASE_NAME)/ \
--rev $($(PKG)_DL_VERSION) $(DL_DIR)/$($(PKG)_SOURCE) && \