All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 08/12] pkg-infra: move the bzr download helper to a script
Date: Sun,  8 Jun 2014 22:43:09 +0200	[thread overview]
Message-ID: <86eec01d70aeae1353c595eecd1c9ec85c67f2d3.1402260012.git.yann.morin.1998@free.fr> (raw)
In-Reply-To: <cover.1402260012.git.yann.morin.1998@free.fr>

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

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>
---
 package/pkg-download.mk |  4 ++--
 support/download/bzr    | 19 +++++++++++++++++++
 2 files changed, 21 insertions(+), 2 deletions(-)
 create mode 100755 support/download/bzr

diff --git a/package/pkg-download.mk b/package/pkg-download.mk
index b495bbb..e0dda39 100644
--- a/package/pkg-download.mk
+++ b/package/pkg-download.mk
@@ -11,7 +11,7 @@
 export WGET := $(call qstrip,$(BR2_WGET)) $(QUIET)
 export SVN := $(call qstrip,$(BR2_SVN))
 export CVS := $(call qstrip,$(BR2_CVS))
-BZR := $(call qstrip,$(BR2_BZR))
+export BZR := $(call qstrip,$(BR2_BZR))
 export GIT := $(call qstrip,$(BR2_GIT))
 export HG := $(call qstrip,$(BR2_HG)) $(QUIET)
 SCP := $(call qstrip,$(BR2_SCP)) $(QUIET)
@@ -101,7 +101,7 @@ endef
 
 define DOWNLOAD_BZR
 	test -e $(DL_DIR)/$($(PKG)_SOURCE) || \
-	$(BZR) export $(DL_DIR)/$($(PKG)_SOURCE) $($(PKG)_SITE) -r $($(PKG)_DL_VERSION)
+	$(EXTRA_ENV) support/download/bzr $($(PKG)_SITE) $($(PKG)_DL_VERSION) $(DL_DIR)/$($(PKG)_SOURCE)
 endef
 
 define SOURCE_CHECK_BZR
diff --git a/support/download/bzr b/support/download/bzr
new file mode 100755
index 0000000..68121f4
--- /dev/null
+++ b/support/download/bzr
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+# We want to catch any command failure, and exit immediately
+set -e
+
+# Download helper for bzr
+# Call it with:
+#   $1: bzr repo
+#   $2: bzr revision
+#   $3: output file
+# And this environment:
+#   BZR       : the bzr command to call
+#   BR2_DL_DIR: path to Buildroot's download dir
+
+repo="${1}"
+rev="${2}"
+output="${3}"
+
+${BZR} export "${output}" "${repo}" -r "${rev}"
-- 
1.8.3.2

  parent reply	other threads:[~2014-06-08 20:43 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-08 20:43 [Buildroot] [PATCH 0/12 v7] Some download-related changes (branch yem/check-downloads) Yann E. MORIN
2014-06-08 20:43 ` [Buildroot] [PATCH 01/12] Makefile: add BR2_DL_DIR to EXTRA_ENV Yann E. MORIN
2014-06-08 20:43 ` [Buildroot] [PATCH 02/12] pkg-infra: also set PKGDIR for the download step Yann E. MORIN
2014-06-08 20:43 ` [Buildroot] [PATCH 03/12] pkg-infra: move the git download helper to a script Yann E. MORIN
2014-06-08 20:43 ` [Buildroot] [PATCH 04/12] pkg-infra: move the svn " Yann E. MORIN
2014-06-08 20:43 ` [Buildroot] [PATCH 05/12] pkg-infra: move the cvs " Yann E. MORIN
2014-06-08 20:43 ` [Buildroot] [PATCH 06/12] pkg-infra: move the hg " Yann E. MORIN
2014-06-12  6:50   ` Thomas De Schampheleire
2014-06-08 20:43 ` [Buildroot] [PATCH 07/12] pkg-infra: move the wget " Yann E. MORIN
2014-06-08 20:43 ` Yann E. MORIN [this message]
2014-06-08 20:43 ` [Buildroot] [PATCH 09/12] pkg-infra: don't use DL_DIR as scratchpad for temporary downloads Yann E. MORIN
2014-06-12  6:53   ` Thomas De Schampheleire
2014-06-08 20:43 ` [Buildroot] [PATCH 10/12] pkg-infra: add possiblity to check downloaded files against known hashes Yann E. MORIN
2014-06-10 19:42   ` Thomas De Schampheleire
2014-06-08 20:43 ` [Buildroot] [PATCH 11/12] manual: add documentation about packages' hashes Yann E. MORIN
2014-06-08 20:43 ` [Buildroot] [PATCH 12/12] package/ca-certificates: add tarball's hashes Yann E. MORIN
2014-06-10 19:44 ` [Buildroot] [PATCH 0/12 v7] Some download-related changes (branch yem/check-downloads) Thomas De Schampheleire
2014-06-10 20:08   ` Yann E. MORIN
2014-06-10 21:41     ` Yann E. MORIN
2014-06-13 17:09 ` Yann E. MORIN
  -- strict thread matches above, loose matches on Subject: below --
2014-06-01 17:40 [Buildroot] [PATCH 0/12 v6] " Yann E. MORIN
2014-06-01 17:40 ` [Buildroot] [PATCH 08/12] pkg-infra: move the bzr download helper to a script Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86eec01d70aeae1353c595eecd1c9ec85c67f2d3.1402260012.git.yann.morin.1998@free.fr \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.