aboutsummaryrefslogtreecommitdiff
path: root/package/pkg-download.mk
diff options
context:
space:
mode:
authorGravatar Yann E. MORIN <yann.morin.1998@free.fr>2018-04-02 10:14:22 +0200
committerGravatar Peter Korsgaard <peter@korsgaard.com>2018-04-02 12:22:50 +0200
commit91e776b5af11f6f98646168fc8c16254fa3bb012 (patch)
treee4d9d6499d7485df8ee7862bf0043e32753abe17 /package/pkg-download.mk
parentf03cf639cfba961ca4cbfb73435f23b951941685 (diff)
downloadbuildroot-91e776b5af11f6f98646168fc8c16254fa3bb012.tar.gz
buildroot-91e776b5af11f6f98646168fc8c16254fa3bb012.tar.bz2
core/pkg-download: change all helpers to use common options
Currently all download helpers accepts the local output file, the remote locations, the changesets and so on... as positional arguments. This was well and nice when that's was all we needed. But then we added an option to quiesce their verbosity, and that was shoehorned with a trivial getopts, still keeping all the existing positional arguments as... positional arguments. Adding yet more options while keeping positional arguments will not be very easy, even if we do not envision any new option in the foreseeable future (but 640K ought to be enough for everyone, remember? ;-) ). Change all helpers to accept a set of generic options (-q for quiet and -o for the output file) as well as helper-specific options (like -r for the repository, -c for a changeset...). Maxime: Changed -R to -r for recurse (only for the git backend) Changed -r to -u for URI (for all backend) Change -R to -c for cset (for CVS and SVN backend) Add the export of the BR_BACKEND_DL_GETOPTS so all the backend wrapper can use the same option easily Now all the backends use the same common options. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/pkg-download.mk')
-rw-r--r--package/pkg-download.mk38
1 files changed, 19 insertions, 19 deletions
diff --git a/package/pkg-download.mk b/package/pkg-download.mk
index 6f15deba28..a410dce1ee 100644
--- a/package/pkg-download.mk
+++ b/package/pkg-download.mk
@@ -77,9 +77,9 @@ define DOWNLOAD_GIT
-H $(PKGDIR)/$($(PKG)_RAWNAME).hash \
$(QUIET) \
-- \
- $($(PKG)_SITE) \
- $($(PKG)_DL_VERSION) \
- $($(PKG)_BASENAME_RAW) \
+ -u $($(PKG)_SITE) \
+ -c $($(PKG)_DL_VERSION) \
+ -n $($(PKG)_BASENAME_RAW) \
$($(PKG)_DL_OPTS)
endef
@@ -88,9 +88,9 @@ define DOWNLOAD_BZR
-o $(DL_DIR)/$($(PKG)_SOURCE) \
$(QUIET) \
-- \
- $($(PKG)_SITE) \
- $($(PKG)_DL_VERSION) \
- $($(PKG)_BASENAME_RAW) \
+ -u $($(PKG)_SITE) \
+ -c $($(PKG)_DL_VERSION) \
+ -n $($(PKG)_BASENAME_RAW) \
$($(PKG)_DL_OPTS)
endef
@@ -99,10 +99,10 @@ define DOWNLOAD_CVS
-o $(DL_DIR)/$($(PKG)_SOURCE) \
$(QUIET) \
-- \
- $(call stripurischeme,$(call qstrip,$($(PKG)_SITE))) \
- $($(PKG)_DL_VERSION) \
- $($(PKG)_RAWNAME) \
- $($(PKG)_BASENAME_RAW) \
+ -u $(call stripurischeme,$(call qstrip,$($(PKG)_SITE))) \
+ -c $($(PKG)_DL_VERSION) \
+ -N $($(PKG)_RAWNAME) \
+ -n $($(PKG)_BASENAME_RAW) \
$($(PKG)_DL_OPTS)
endef
@@ -111,9 +111,9 @@ define DOWNLOAD_SVN
-o $(DL_DIR)/$($(PKG)_SOURCE) \
$(QUIET) \
-- \
- $($(PKG)_SITE) \
- $($(PKG)_DL_VERSION) \
- $($(PKG)_BASENAME_RAW) \
+ -u $($(PKG)_SITE) \
+ -c $($(PKG)_DL_VERSION) \
+ -n $($(PKG)_BASENAME_RAW) \
$($(PKG)_DL_OPTS)
endef
@@ -126,7 +126,7 @@ define DOWNLOAD_SCP
-H $(PKGDIR)/$($(PKG)_RAWNAME).hash \
$(QUIET) \
-- \
- '$(call stripurischeme,$(call qstrip,$(1)))' \
+ -u '$(call stripurischeme,$(call qstrip,$(1)))' \
$($(PKG)_DL_OPTS)
endef
@@ -135,9 +135,9 @@ define DOWNLOAD_HG
-o $(DL_DIR)/$($(PKG)_SOURCE) \
$(QUIET) \
-- \
- $($(PKG)_SITE) \
- $($(PKG)_DL_VERSION) \
- $($(PKG)_BASENAME_RAW) \
+ -u $($(PKG)_SITE) \
+ -c $($(PKG)_DL_VERSION) \
+ -n $($(PKG)_BASENAME_RAW) \
$($(PKG)_DL_OPTS)
endef
@@ -147,7 +147,7 @@ define DOWNLOAD_WGET
-H $(PKGDIR)/$($(PKG)_RAWNAME).hash \
$(QUIET) \
-- \
- '$(call qstrip,$(1))' \
+ -u '$(call qstrip,$(1))' \
$($(PKG)_DL_OPTS)
endef
@@ -157,7 +157,7 @@ define DOWNLOAD_LOCALFILES
-H $(PKGDIR)/$($(PKG)_RAWNAME).hash \
$(QUIET) \
-- \
- $(call stripurischeme,$(call qstrip,$(1))) \
+ -u $(call stripurischeme,$(call qstrip,$(1))) \
$($(PKG)_DL_OPTS)
endef