Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Seiderer <ps.report@gmx.net>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 08/13] pkg-download: support new subdir for mirrors
Date: Wed, 25 Oct 2017 22:09:58 +0200	[thread overview]
Message-ID: <20171025201003.16105-9-ps.report@gmx.net> (raw)
In-Reply-To: <20171025201003.16105-1-ps.report@gmx.net>

From: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>

Since we introduced subdirectory to the DL_DIR, we need to support them
in the PRIMARY and BACKUP mirror as they evolve to the new tree
structure.

We check first the new URI (with the subdir), and in case of failure, we
go check without.
By checking both URIs, we ensure that old mirror are usable.

Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
---
Changes v1 --> v2:
  - from https://github.com/maximeh/buildroot/commit/a7d5ad4a34322e7f77849e2d5ef38ebc23e42149.patch
  - use urlencode
---
 package/pkg-download.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/pkg-download.mk b/package/pkg-download.mk
index b94a828579..b76d0ec289 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,$(BR2_PRIMARY_SITE)/$(notdir $($(PKG)_DL_DIR)),urlencode) \
 	-u $(call getschemeplusuri,$(BR2_PRIMARY_SITE),urlencode)
 endif
 
@@ -83,6 +84,7 @@ DOWNLOAD_URIS += \
 	-u $($(PKG)_SITE_METHOD)+$(dir $(1))
 ifneq ($(call qstrip,$(BR2_BACKUP_SITE)),)
 DOWNLOAD_URIS += \
+	-u $(call getschemeplusuri,$(BR2_BACKUP_SITE)/$(notdir $($(PKG)_DL_DIR)),urlencode) \
 	-u $(call getschemeplusuri,$(BR2_BACKUP_SITE),urlencode)
 endif
 endif
-- 
2.14.2

  parent reply	other threads:[~2017-10-25 20:09 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-25 20:09 [Buildroot] [PATCH v2 00/13] New DL_DIR organisation; git cache feature Peter Seiderer
2017-10-25 20:09 ` [Buildroot] [PATCH v2 01/13] pkg-{download, generic}: remove source-check Peter Seiderer
2018-01-08 20:22   ` Yann E. MORIN
2018-01-08 20:28   ` Thomas Petazzoni
2018-01-10 12:04     ` Thomas De Schampheleire
2018-01-10 12:41       ` Thomas Petazzoni
2018-01-10 12:51         ` Thomas De Schampheleire
2018-01-10 18:18       ` Yann E. MORIN
2017-10-25 20:09 ` [Buildroot] [PATCH v2 02/13] core/pkg-download: change all helpers to use common options Peter Seiderer
2018-02-05 15:34   ` Luca Ceresoli
2017-10-25 20:09 ` [Buildroot] [PATCH v2 03/13] download: put most of the infra in dl-wrapper Peter Seiderer
2018-02-05 15:34   ` Luca Ceresoli
2017-10-25 20:09 ` [Buildroot] [PATCH v2 04/13] packages: use new $($PKG)_DL_DIR) variable Peter Seiderer
2017-10-25 20:09 ` [Buildroot] [PATCH v2 05/13] pkg-{download, generic}: use new $($(PKG)_DL_DIR) Peter Seiderer
2017-10-25 20:09 ` [Buildroot] [PATCH v2 06/13] support/download: make sure the download folder is created Peter Seiderer
2017-10-25 20:09 ` [Buildroot] [PATCH v2 07/13] pkg-generic: add a subdirectory to the DL_DIR Peter Seiderer
2017-10-25 20:09 ` Peter Seiderer [this message]
2017-10-25 20:09 ` [Buildroot] [PATCH v2 09/13] pkg-generic: introduce _SAME_SOURCE_AS Peter Seiderer
2017-10-25 20:10 ` [Buildroot] [PATCH v2 10/13] help/manual: update help about the new $(LIBFOO_DL_DIR) Peter Seiderer
2017-10-25 20:10 ` [Buildroot] [PATCH v2 11/13] download: add flock call before dl-wrapper Peter Seiderer
2017-10-25 20:10 ` [Buildroot] [PATCH v2 12/13] download: git: introduce cache feature Peter Seiderer
2018-02-05 13:46   ` Thomas Petazzoni
2017-10-25 20:10 ` [Buildroot] [PATCH v2 13/13] WIP: support package with '-' Peter Seiderer
2018-02-05 13:33   ` Thomas Petazzoni

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=20171025201003.16105-9-ps.report@gmx.net \
    --to=ps.report@gmx.net \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox