Message ID | 20180402081434.4411-8-maxime.hadjinlian@gmail.com |
---|---|
State | Superseded |
Headers | show |
Series | [v4,01/13] core/pkg-download: change all helpers to use common options | expand |
Hello, On Mon, 2 Apr 2018 10:14:29 +0200, Maxime Hadjinlian wrote: > 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> > Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Shouldn't this be squashed into the previous patch ? Indeed, as soon as PATCH 07/13 is merged, the sources.buildroot.net mirror will start storing new tarballs in sources.buildroot.net/<pkg>/ and not directly in sources.buildroot.net/. So we should at the same time start storing tarballs in the per-package sub-folder *and* start querying primary/backup site inside their sub-folder. Thomas
Thomas, Maxime, All, On 2018-04-02 14:13 +0200, Thomas Petazzoni spake thusly: > On Mon, 2 Apr 2018 10:14:29 +0200, Maxime Hadjinlian wrote: > > 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> > > Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> > Shouldn't this be squashed into the previous patch ? Or rather, the order should be inverted: this patch first, then the previous one. That way, we start with looking in sub-dirs (we do not yet exist), then fallback to plain dir. Then sub-dirs are introduced and pushed to the mirror. Regards, Yann E. MORIN. > Indeed, as soon as PATCH 07/13 is merged, the sources.buildroot.net > mirror will start storing new tarballs in sources.buildroot.net/<pkg>/ > and not directly in sources.buildroot.net/. So we should at the same > time start storing tarballs in the per-package sub-folder *and* start > querying primary/backup site inside their sub-folder. > > Thomas > -- > Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) > Embedded Linux and Kernel engineering > https://bootlin.com > _______________________________________________ > buildroot mailing list > buildroot@busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot
diff --git a/package/pkg-download.mk b/package/pkg-download.mk index e88d3f9fda..54edbae29a 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