From patchwork Mon Apr 2 08:14:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Hadjinlian X-Patchwork-Id: 894122 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="Y2nkFo4e"; 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 40F4lL4vHRz9s2B for ; Mon, 2 Apr 2018 18:14:54 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 7AD1289016; Mon, 2 Apr 2018 08:14:51 +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 ZHCi690IwGOX; Mon, 2 Apr 2018 08:14:50 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 41CA288E16; Mon, 2 Apr 2018 08:14:50 +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 9F9191C0B66 for ; Mon, 2 Apr 2018 08:14:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 9BE4E87F26 for ; Mon, 2 Apr 2018 08:14:46 +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 SdBOXSL3E1AI for ; Mon, 2 Apr 2018 08:14:45 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 545DD8838C for ; Mon, 2 Apr 2018 08:14:45 +0000 (UTC) Received: by mail-wm0-f65.google.com with SMTP id v21so23846360wmc.1 for ; Mon, 02 Apr 2018 01:14:45 -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=a0o6fH7VixaQ7L+J7u3bN/UihqG8QcyjKErYmFi2mUE=; b=Y2nkFo4euMr4lXPW1BNPfu5iiVEaoQgCUGNlkFnIjp0KzimW2W0zyh9Yz8CZ4t6dvH xV5WISjYJtIzyHixt95SRaG0b/Vl7Us6MrZGZlrJBb1Pfv/Jo/qxj+06zkFFP86AKkFX fdWePJ0htJQ3caVt1QNsao1ixhFNwv4zvE4SEPVOUTm6J8J6SPK0Ld1ct+4tfDK63Mda vO5Ps8a1k+xfyXRkGGnUl8WAX8HTGstgIhBK1a48MKKNaHFepWtjte8mlndl4LWna5vf VexEsl5mY/2KKhLX7N0DfamHbtnjmcjOzYU0+2JOOrrJVK4CJoHkltXvazsrGqFgJVoL U7pg== 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=a0o6fH7VixaQ7L+J7u3bN/UihqG8QcyjKErYmFi2mUE=; b=Dr7WT2umO1u/FGcmQGtnn13k6AoeplP72EIEBDJsjMXz8GPKkZAgxQXXl2mq4+FCbZ Wvx27Dow6UW2s1thOTe+cydG6tFVUqto/Z/RsvFf0GNU2wCdKPSY9JgC8E913r/kWr3U ypRA++38UUm1bMqPjhZV3fZim6jX1/AJN+t3Ya6wqXos143DnzmfO3Bcmhxc0210zHfk yXwkGXYdpLW8sO3a2MEYl6D46Pjop2RUIpQDGqFuE0mGuTVGyt5Onch70vC3dOpzNP8o EFSMUi92t6i2n176A2IVlLlm3kzbOrK2oBxXUObZ512I3skEZtus8uLMmnBAwH/eJm3O c3XA== X-Gm-Message-State: AElRT7EeBVK/YSOB5Jf1W+2DDupg+WbzzN9TfGJT1jPthor0WHnDeAUF cF1oqsRRI65udXcebIlipzENMa1T X-Google-Smtp-Source: AIpwx48ETcXu0WViZrtPs8Ds6Tt97J+B3xXpUskfmutSbQmaLf9LaatAQrt038MvpbVZQLJyLDFaeg== X-Received: by 10.28.125.194 with SMTP id y185mr153806wmc.160.1522656883444; Mon, 02 Apr 2018 01:14:43 -0700 (PDT) Received: from cerise.online.net ([195.154.228.195]) by smtp.gmail.com with ESMTPSA id a205sm51981wmf.18.2018.04.02.01.14.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Apr 2018 01:14:42 -0700 (PDT) From: Maxime Hadjinlian To: buildroot@buildroot.org Date: Mon, 2 Apr 2018 10:14:29 +0200 Message-Id: <20180402081434.4411-8-maxime.hadjinlian@gmail.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180402081434.4411-1-maxime.hadjinlian@gmail.com> References: <20180402081434.4411-1-maxime.hadjinlian@gmail.com> Subject: [Buildroot] [v4 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: 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 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