[Buildroot] [PATCH 2/6] pkg-download: Allow packages to pass an URL referer to the wget method

Romain Perier romain.perier at free-electrons.com
Mon Jul 11 08:48:41 UTC 2016


Introduce a new package variable $(PKG)_DL_REFERER. When this variable
is defined, its value is passed to the wget downloader. Packages can now
retrieve archives from servers that assume that the HTTP client is
always connected to the website.

Signed-off-by: Romain Perier <romain.perier at free-electrons.com>
---
 package/pkg-download.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/pkg-download.mk b/package/pkg-download.mk
index a0f694d..7e82ae9 100644
--- a/package/pkg-download.mk
+++ b/package/pkg-download.mk
@@ -171,7 +171,8 @@ define DOWNLOAD_WGET
 		-H $(PKGDIR)/$($(PKG)_RAWNAME).hash \
 		$(QUIET) \
 		-- \
-		'$(call qstrip,$(1))'
+		'$(call qstrip,$(1))' \
+		$($(PKG)_DL_REFERER)
 endef
 
 define SOURCE_CHECK_WGET
-- 
2.8.1




More information about the buildroot mailing list