aboutsummaryrefslogtreecommitdiff
path: root/package/pkg-download.mk
diff options
context:
space:
mode:
authorGravatar Yann E. MORIN <yann.morin.1998@free.fr>2014-07-02 23:11:22 +0200
committerGravatar Peter Korsgaard <peter@korsgaard.com>2014-07-02 23:59:10 +0200
commit2fd4b959bd8b8e9d8657de9f458215ecd3b9d072 (patch)
tree3d5c998d23e67e055fa60bef25835aeb00de5626 /package/pkg-download.mk
parentf4526c053f700cad5783476e009173827e803f56 (diff)
downloadbuildroot-2fd4b959bd8b8e9d8657de9f458215ecd3b9d072.tar.gz
buildroot-2fd4b959bd8b8e9d8657de9f458215ecd3b9d072.tar.bz2
pkg-infra: move the hg download helper to a script
Maintaining the download helpers in the Makefile has proved to be a bit complex, so move it to a shell script. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: Samuel Martin <s.martin49@gmail.com> Tested-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> [tested a particular scenario that used to fail, when the 'hg archive' step is interrupted, now working fine] Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/pkg-download.mk')
-rw-r--r--package/pkg-download.mk11
1 files changed, 3 insertions, 8 deletions
diff --git a/package/pkg-download.mk b/package/pkg-download.mk
index 9f3afacf98..3290b6ba71 100644
--- a/package/pkg-download.mk
+++ b/package/pkg-download.mk
@@ -13,7 +13,7 @@ export SVN := $(call qstrip,$(BR2_SVN))
export CVS := $(call qstrip,$(BR2_CVS))
BZR := $(call qstrip,$(BR2_BZR))
export GIT := $(call qstrip,$(BR2_GIT))
-HG := $(call qstrip,$(BR2_HG)) $(QUIET)
+export HG := $(call qstrip,$(BR2_HG)) $(QUIET)
SCP := $(call qstrip,$(BR2_SCP)) $(QUIET)
SSH := $(call qstrip,$(BR2_SSH)) $(QUIET)
LOCALFILES := $(call qstrip,$(BR2_LOCALFILES))
@@ -161,13 +161,8 @@ 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) && \
- rm -rf $($(PKG)_DL_DIR) && \
- popd > /dev/null)
+ $(EXTRA_ENV) support/download/hg $($(PKG)_SITE) $($(PKG)_DL_VERSION) \
+ $($(PKG)_BASE_NAME) $(DL_DIR)/$($(PKG)_SOURCE)
endef
# TODO: improve to check that the given PKG_DL_VERSION exists on the remote