From: Mathias De Maré Date: Tue, 10 Dec 2013 18:31:30 +0000 (+0100) Subject: package: make package download from Mercurial repositories more robust X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a10073b6b0a70feea944cbd77914cb51c7a558f1;p=buildroot.git 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é Acked-by: Thomas De Schampheleire Signed-off-by: Thomas Petazzoni --- diff --git a/package/pkg-download.mk b/package/pkg-download.mk index 758b211097..c00689b89c 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) && \