From a10073b6b0a70feea944cbd77914cb51c7a558f1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mathias=20De=20Mar=C3=A9?= Date: Tue, 10 Dec 2013 19:31:30 +0100 Subject: [PATCH] package: make package download from Mercurial repositories more robust MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- package/pkg-download.mk | 1 + 1 file changed, 1 insertion(+) 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) && \ -- 2.30.2