Commit a10073b6 authored by Mathias De Maré's avatar Mathias De Maré Committed by Thomas Petazzoni
Browse files

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: default avatarMathias De Maré <mathias.demare@gmail.com>
Acked-by: default avatarThomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
parent 5c4b60c7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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) && \