summaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorThomas De Schampheleire <patrickdepinguin+buildroot@gmail.com>2012-06-22 07:37:03 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2012-07-22 18:29:33 +0200
commit5a83e0849964c5160b980bb57ce89e28684a7dbb (patch)
tree88d51c7693b56730b1fb4877d55b665944a336fc /package
parent5cc492482589a78f46b1945b176821775fca86c8 (diff)
downloadbuildroot-novena-5a83e0849964c5160b980bb57ce89e28684a7dbb.tar.gz
buildroot-novena-5a83e0849964c5160b980bb57ce89e28684a7dbb.zip
Package downloads: allow restricting to primary site only
This patch adds a new config option BR2_PRIMARY_SITE_ONLY that, when set, restricts package downloads to the specified BR2_PRIMARY_SITE. If the package is not present on the primary site, the download fails. This is useful for project developers who want to ensure that the project can be built even if the upstream tarball locations disappear. [thomas.petazzoni@free-electrons.com: Extend config option help message with more details coming from the commit log. Added a dependency on the fact that a primary site has been defined. Without any primary site (the default configuration), this new option does not make any sense.] Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package')
-rw-r--r--package/pkg-download.mk7
1 files changed, 5 insertions, 2 deletions
diff --git a/package/pkg-download.mk b/package/pkg-download.mk
index e93875988..9e9858100 100644
--- a/package/pkg-download.mk
+++ b/package/pkg-download.mk
@@ -192,8 +192,8 @@ endef
################################################################################
# DOWNLOAD -- Download helper. Will try to download source from:
# 1) BR2_PRIMARY_SITE if enabled
-# 2) Download site
-# 3) BR2_BACKUP_SITE if enabled
+# 2) Download site, unless BR2_PRIMARY_SITE_ONLY is set
+# 3) BR2_BACKUP_SITE if enabled, unless BR2_PRIMARY_SITE_ONLY is set
#
# Argument 1 is the source location
# Argument 2 is the source filename
@@ -213,6 +213,9 @@ define DOWNLOAD_INNER
*) $(call $(DL_MODE)_WGET,$(BR2_PRIMARY_SITE)/$(2),$(2)) && exit ;; \
esac ; \
fi ; \
+ if test "$(BR2_PRIMARY_SITE_ONLY)" = "y" ; then \
+ exit 1 ; \
+ fi ; \
if test -n "$(1)" ; then \
if test -z "$($(PKG)_SITE_METHOD)" ; then \
scheme="$(call geturischeme,$(1))" ; \