From patchwork Sat Mar 31 14:24:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Hadjinlian X-Patchwork-Id: 893798 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="cIFMKC0k"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40D13J467pz9rxs for ; Sun, 1 Apr 2018 01:25:00 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 602BE8A196; Sat, 31 Mar 2018 14:24:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hFkdNgD-DJku; Sat, 31 Mar 2018 14:24:52 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 6B5528A18B; Sat, 31 Mar 2018 14:24:26 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 868AB1C16D3 for ; Sat, 31 Mar 2018 14:24:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 817938AE82 for ; Sat, 31 Mar 2018 14:24:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2yFj+TUBRTWS for ; Sat, 31 Mar 2018 14:24:18 +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 hemlock.osuosl.org (Postfix) with ESMTPS id BFC738AAA7 for ; Sat, 31 Mar 2018 14:24:17 +0000 (UTC) Received: by mail-wr0-f194.google.com with SMTP id 80so10056735wrb.2 for ; Sat, 31 Mar 2018 07:24:17 -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=qsjUOBR8kxz9CQwvHi4IA6jvgliUPyTOXQhcnFgMPcg=; b=cIFMKC0kUSjum9AVaAIaJK2+7aViaKErnwOwsCFJUpJlEk3xKGOeYj0v3nwE5ChYKo j0+QyIzcjRV7Y4umGdTvs1Ua9AYGjJyvhcyGVpulo9d8uaLHBkebeNv55VQAaa6yma8Q V2SfMIYEFiQGPdYY9/hbFELtk7u3g1OMeYq+XxHoyMRziLXAei38vtVxwADUOHs8/yl6 ashcoZwX3nfcm31wVVBR4TH0qxVQKu4CS0v3gZTAD8Y6uD7wH59W6LCX/uTTN0Mqb9va pHxL+72HmYTr3QVtoFwCXe20Mh1sK/L0V5F9JObcVfNn2R7/0op7yr9zkrYrSjYboF6b ofRw== 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=qsjUOBR8kxz9CQwvHi4IA6jvgliUPyTOXQhcnFgMPcg=; b=H41e4HZB4c6ADsC1jDu3CEKEkLshSt8DIHDdLqgyX+D+QiNSTS7DCz9ImWX/nfEnfZ Ufmn7JNgZVRIgZe93PtVZ//j57QPOqCBf75CBxG31oYCfDtPTmb35YbrEzgoTFPHcov6 kXakDhFVkBAMMrlljB+i3/k+tspQ8dxzUR57n0Sy33JY8alNcQ6CgVguSb39kYQ+o+zm ry5jGsNTCiRr8gMLyR68SXMqIrpo+gRR93b/7MpLe1eyVLWtpuQ0x8MYs76TFsmFijOC TkvWHcsZTMZKQxqoRgVSs5MDX1H+wbU5XsM6Hoaom7SvjVUjYS/6aVoiFlbViWchx70z wYzA== X-Gm-Message-State: AElRT7EEkfmFqZaLrRRcpVjzeqKxUvQ/8NnGcwH2MwfJs9qahB+U0YBL saiSnsutHYDi/INxhxYoWD8MXwVj X-Google-Smtp-Source: AIpwx49L1unbHdFQY6LrU/8enboFKZaC21eRxz24yvAlamH9kFfNyMV9zUPWUjpldXMfZeAvfuxYrg== X-Received: by 10.223.135.140 with SMTP id b12mr1962336wrb.80.1522506255916; Sat, 31 Mar 2018 07:24:15 -0700 (PDT) Received: from cerise.online.net ([195.154.228.195]) by smtp.gmail.com with ESMTPSA id o88sm11394409wrb.44.2018.03.31.07.24.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 31 Mar 2018 07:24:15 -0700 (PDT) From: Maxime Hadjinlian To: buildroot@buildroot.org Date: Sat, 31 Mar 2018 16:24:02 +0200 Message-Id: <20180331142407.9522-8-maxime.hadjinlian@gmail.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180331142407.9522-1-maxime.hadjinlian@gmail.com> References: <20180331142407.9522-1-maxime.hadjinlian@gmail.com> Subject: [Buildroot] [v3 08/13] pkg-download: support new subdir for mirrors X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Yann E . Morin" , Maxime Hadjinlian 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 Reviewed-by: "Yann E. MORIN" --- package/pkg-download.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/pkg-download.mk b/package/pkg-download.mk index 0717943bb0..23f3403098 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