From patchwork Mon Apr 2 13:09:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Hadjinlian X-Patchwork-Id: 894183 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="fW+4XdV5"; 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 40FCHk6JkMz9s0p for ; Mon, 2 Apr 2018 23:09:54 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B24F2895CC; Mon, 2 Apr 2018 13:09:50 +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 lhuP6e0vsVRV; Mon, 2 Apr 2018 13:09:48 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 554EA895A1; Mon, 2 Apr 2018 13:09:48 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 448B01C2314 for ; Mon, 2 Apr 2018 13:09:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 41F12227BD for ; Mon, 2 Apr 2018 13:09:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pVERSRY8bber for ; Mon, 2 Apr 2018 13:09:44 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by silver.osuosl.org (Postfix) with ESMTPS id 3F55922761 for ; Mon, 2 Apr 2018 13:09:44 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id h76so25391298wme.4 for ; Mon, 02 Apr 2018 06:09:44 -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=nRz7wwwh3BvTy+qU26nkVX2CNmqUdVFSbMvMy6v5gj4=; b=fW+4XdV5aZ+9NF/i8cTrRvmlBlc6++oyX0CcIUQKgmibt3KBvUlcUK8OvUaiU1MH6g oVSMVyoJ6CIEeu60dCqnch8j8LF9cYTvZyRrX7kdz6x5NwgJvZseX+O778suUv3I9Crr o55yrJrnERieKnpn8uk8IKY/5LE0fl3SprGLV2EHjWBbQMD4i+fl2syj/4yH1I8F1vDI o6CpZGnjGZEWyBRM0sSC2MXDuPqBvqePtlObT8TUMEviCCzPNU0eztaBEI/a8S9QxzFa lLM5JWEvOfSIeSlYmLNaORoNnu1pMVzei+qqbMfTxQAyhUx1JTLveVpWNsT9daQs64uU N90g== 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=nRz7wwwh3BvTy+qU26nkVX2CNmqUdVFSbMvMy6v5gj4=; b=o9mVHF7TcN8s5bqLzbqBnLJ1/jIO7ZhoAntUINXiE2mDfKXCM+r4KV0X+pb0LQcaRN q/00GH2slj+w3cranEugSgezFj4jx+aTKJuQsMGMZIrsfqyqSmRTMpAzBklvthxXkGOM MVxN/6S5UE27s94paGZpF3swoM/wQ80UlTyxiKwTL1klp+ltJ0XCsZd8DHoDXEHEQJB5 8bN30WXkG3toltVeBRGOL8mYpdxllDzg//aYlS48eZGIlSpXWdu7qORbkxYftdq8v9i0 kTwefETT6W9trupjKqz/67oZglRB5lQAjyfchgdKF5HDLnEgE4Lk3FdgfUuFGMK81D4T B52A== X-Gm-Message-State: AElRT7HjBk/Nqt4pzWmUYnSO6Ab8FFKli0NFf4HXWv39VqrpT1UZ9SQW C2VCc3vh4/9NGawUpx5IqEUVBje7 X-Google-Smtp-Source: AIpwx49IUKmVluw5cnwK3jc0giX8E9pocM7yyDtq/0SomRZevRwdSV2+1R3nhUNDJ6w9ePCZEHn2TA== X-Received: by 10.28.109.80 with SMTP id i77mr814562wmc.46.1522674582429; Mon, 02 Apr 2018 06:09:42 -0700 (PDT) Received: from cerise.online.net ([195.154.228.195]) by smtp.gmail.com with ESMTPSA id p187sm1134507wme.8.2018.04.02.06.09.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Apr 2018 06:09:41 -0700 (PDT) From: Maxime Hadjinlian To: buildroot@buildroot.org Date: Mon, 2 Apr 2018 15:09:30 +0200 Message-Id: <20180402130934.19274-7-maxime.hadjinlian@gmail.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180402130934.19274-1-maxime.hadjinlian@gmail.com> References: <20180402130934.19274-1-maxime.hadjinlian@gmail.com> Subject: [Buildroot] [v5 07/11] 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" --- v4 -> v5: - Use new DL_SUBDIR --- package/pkg-download.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/pkg-download.mk b/package/pkg-download.mk index e88d3f9fda..85b75cc3e6 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)/$($(PKG)_DL_SUBDIR),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)/$($(PKG)_DL_SUBDIR),urlencode) \ -u $(call getschemeplusuri,$(BR2_BACKUP_SITE),urlencode) endif endif