aboutsummaryrefslogtreecommitdiff
path: root/package/pkg-download.mk
diff options
context:
space:
mode:
authorGravatar Maxime Hadjinlian <maxime.hadjinlian@gmail.com>2018-04-02 16:57:57 +0200
committerGravatar Peter Korsgaard <peter@korsgaard.com>2018-04-02 17:48:56 +0200
commitef87b0326c71d78f5f7e1551a9985b0bcc5ae380 (patch)
tree11edd5297a9955bce998263453bd68fcfeb10b8b /package/pkg-download.mk
parentddf3feb1047da7e728f89329f2eed6529bcf8636 (diff)
downloadbuildroot-ef87b0326c71d78f5f7e1551a9985b0bcc5ae380.tar.gz
buildroot-ef87b0326c71d78f5f7e1551a9985b0bcc5ae380.tar.bz2
pkg-download: support new subdirs for mirrors
Since we introduced subdirectories to the DL_DIR, we need to support them in the PRIMARY and BACKUP mirrors as they evolve to the new tree structure. We check first the new URI (with the subdir), and in case of failure, we check without. By checking both URIs, we ensure that old mirror are usable. Also, add a missing qstrip call for BR2_BACKUP_SITE. Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/pkg-download.mk')
-rw-r--r--package/pkg-download.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/package/pkg-download.mk b/package/pkg-download.mk
index 3f35661a16..7ca6fcc757 100644
--- a/package/pkg-download.mk
+++ b/package/pkg-download.mk
@@ -75,6 +75,7 @@ export BR_NO_CHECK_HASH_FOR =
ifneq ($(call qstrip,$(BR2_PRIMARY_SITE)),)
DOWNLOAD_URIS += \
+ -u $(call getschemeplusuri,$(call qstrip,$(BR2_PRIMARY_SITE)/$($(PKG)_DL_SUBDIR)),urlencode) \
-u $(call getschemeplusuri,$(call qstrip,$(BR2_PRIMARY_SITE)),urlencode)
endif
@@ -83,7 +84,8 @@ DOWNLOAD_URIS += \
-u $($(PKG)_SITE_METHOD)+$(dir $(call qstrip,$(1)))
ifneq ($(call qstrip,$(BR2_BACKUP_SITE)),)
DOWNLOAD_URIS += \
- -u $(call getschemeplusuri,$(BR2_BACKUP_SITE),urlencode)
+ -u $(call getschemeplusuri,$(call qstrip,$(BR2_BACKUP_SITE)/$($(PKG)_DL_SUBDIR)),urlencode) \
+ -u $(call getschemeplusuri,$(call qstrip,$(BR2_BACKUP_SITE)),urlencode)
endif
endif