From patchwork Tue Jul 4 16:22:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Hadjinlian X-Patchwork-Id: 784175 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3x28SL1nNHz9t0j for ; Wed, 5 Jul 2017 02:23:14 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="HgrpUvsf"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 356E68762F; Tue, 4 Jul 2017 16:23:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JC-esIRxCZUe; Tue, 4 Jul 2017 16:23:08 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 9472587A19; Tue, 4 Jul 2017 16:22:57 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id ED85E1C0021 for ; Tue, 4 Jul 2017 16:22:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id E6B01877BE for ; Tue, 4 Jul 2017 16:22:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vPc3r4IROHc2 for ; Tue, 4 Jul 2017 16:22:26 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 977E687614 for ; Tue, 4 Jul 2017 16:22:26 +0000 (UTC) Received: by mail-wr0-f194.google.com with SMTP id z45so47900660wrb.2 for ; Tue, 04 Jul 2017 09:22:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=B3ugIvoCr60UGm9FqsTmj/HwVjdvQSyoU4E2OAwaZUg=; b=HgrpUvsfm9goPat6iDNmEnCk8pImV33qJcCsu4gwOWuc+GNlVVZhoYlcAeiEaipFAy uXDp9IhwZFDgwMRUuv4lvXsQ2PjFjZBQ8ruQc/HkIfTzzUrxQCSUmA+h/zCgvDNypd6s 714/3likj46nM4bZ7YfdLNrJk8agIdQxsdKQ4s/ElalybNrtgBQiS0RFOmQi2Gj4VKRG 2qDM/H2aCAnjx06Y0V/QgEHMe1bCeTEvvNZZwpN2ZptBVGcE2fRDKMa/6u9FNHntZRMp 1/NU7clSmJa1VijdsnBHozrzZz29+INGEH00/0+FFttFn17mC+boD/IAfV0dbuEGWnh3 7zQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=B3ugIvoCr60UGm9FqsTmj/HwVjdvQSyoU4E2OAwaZUg=; b=boWDVtfRpeOFgKvT1MW9Gg1cWi0MCw8T42E4pNczex/NIaRwlGU9+k52cLdgW+AlJb tQbR1GAHYsLEEjGD/dTy0L3zo3NnWOHpUB6uppiTypAacunmp9h08VETrnkjIFYqkNP6 BrwqAxVyhWOGdhs6/iCbdgcAgTY2m1V+FPi4s13+RFuwzI0wqTAaRiO3cNucZSV7HQOV O8k8039ArwwNriZ7PgpQ1pmosbAhzy+FLJ9h+wwUHWq3RdkHsD1HD6Y5efkBiqaAiJOY Ww8ECS2hyja5OK3aRWPoQdSnfLseD0eGsTkOmEzQPI8QqWT8q7w2MlXE4cZ/WPJLMQ40 Rh8w== X-Gm-Message-State: AKS2vOzHfhqpf1nHzG35ceYcrTLjgnaPrC2oU3pdsqIhi0B49DOZf3dd wi9g5Vq6NcC+DPyjSg0= X-Received: by 10.223.162.208 with SMTP id t16mr42478942wra.151.1499185344964; Tue, 04 Jul 2017 09:22:24 -0700 (PDT) Received: from cerise.bzh.lan (2a01cb0886107300297010e522b1c364.ipv6.abo.wanadoo.fr. [2a01:cb08:8610:7300:2970:10e5:22b1:c364]) by smtp.gmail.com with ESMTPSA id u187sm3582012wmd.26.2017.07.04.09.22.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Jul 2017 09:22:24 -0700 (PDT) From: Maxime Hadjinlian To: buildroot@buildroot.org Date: Tue, 4 Jul 2017 18:22:07 +0200 Message-Id: <20170704162211.13238-10-maxime.hadjinlian@gmail.com> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20170704162211.13238-1-maxime.hadjinlian@gmail.com> References: <20170704162211.13238-1-maxime.hadjinlian@gmail.com> Subject: [Buildroot] [PATCH 09/13] pkg-download: support new subdir for mirrors X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" 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 --- package/pkg-download.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/pkg-download.mk b/package/pkg-download.mk index 9a455dc79b..47671e21a7 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)) \ -u $(call getschemeplusuri,$(BR2_PRIMARY_SITE)) 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)) \ -u $(call getschemeplusuri,$(BR2_BACKUP_SITE)) endif endif