From patchwork Mon Apr 2 14:57:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Hadjinlian X-Patchwork-Id: 894277 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.133; helo=hemlock.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="Fu98F7Zy"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40FFhk248rz9s29 for ; Tue, 3 Apr 2018 00:58:14 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 6766B8A2CE; Mon, 2 Apr 2018 14:58:12 +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 IITyA+ID9gao; Mon, 2 Apr 2018 14:58:11 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id D595E8A294; Mon, 2 Apr 2018 14:58:11 +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 320E51C2314 for ; Mon, 2 Apr 2018 14:58:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 2ECE1227E9 for ; Mon, 2 Apr 2018 14:58:09 +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 sAmz+vVMpNQl for ; Mon, 2 Apr 2018 14:58:08 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by silver.osuosl.org (Postfix) with ESMTPS id 4DB4922208 for ; Mon, 2 Apr 2018 14:58:08 +0000 (UTC) Received: by mail-wr0-f193.google.com with SMTP id s12so3550091wrc.8 for ; Mon, 02 Apr 2018 07:58:08 -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=07f/9/YpQYuNl0SSeyWrAkGo3siV/p7GAXsnW97MXfU=; b=Fu98F7Zyxn0ApXmAh//jfZt3Dx3BHwUyyj3kiOFHQ+sIJwk2LiMlQEUFkgqQubzvoR UPKWQVOSDLGsDi/3HCoPIp5PjiftzuXT/SLYNVH8klEvDQlOibPMYz1FOHOYX75ScfZX 2HxnqBnv3n9f3wsz/Bt1wzhkJg8H0lPtf+hVpvlr2kOJWbL9ZrB7CwKf+SGCHTVEClaq nb9SvNv6mj8X1ndmwQdh9g85at5uFo61wVVZx7VB8XGg49HaZPS6cG6BBkHvRboRWReG CoWyHKtEmqi21RMzRZFsiZedIKWsmv4zovjjyq7cbH+xDNNG/YwlZ05pmu7Sh+WRvFcC jWfA== 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=07f/9/YpQYuNl0SSeyWrAkGo3siV/p7GAXsnW97MXfU=; b=ph0nlqXI0A+71+m3MpELL/JWk36AIUDISLj/kw329ZjJ4bfXyYF9vU6bIjLOe3UDoP Ofh3GA2IxnLsZz4Vl6eXPbsjj3AMjl1S0pHpOKAajE5/TW0mphTFqGNamhHdrDKrQb7c uGOWv8mA4IIXnIpiWegK93Jq/zZ6JBq/TRTdjuI0R+XKLLJhLO5/4EyI8Z44OHx4C3RK bln5qmky1SBxMVj7/ySL0e6GqHvl9InFZDfqCze9MYKP0olwWdyL4S/v00hPn+ZbfZpP gednrA9AXykA+QEAG4K89a4qI3nnfvKdaw5+gATLMTXixgMrFrsqoQZKRknNEls8ZIQy C2vw== X-Gm-Message-State: AElRT7EHtGV679FdMyURpKfFkFk6LOl3sgjP7nvViIEtU+lZJJ5oy2ob v7uKZW6BRBx8I1YysFdhPxLY4KTI X-Google-Smtp-Source: AIpwx48zsRNHA1Q9ivpav38cbi33EtCjWCfTvut7K6IOr9tlBrvBCrMLrRmfjBfpLCVgIfqZqFrmAA== X-Received: by 10.223.201.3 with SMTP id m3mr7333786wrh.137.1522681086311; Mon, 02 Apr 2018 07:58:06 -0700 (PDT) Received: from cerise.online.net ([195.154.228.195]) by smtp.gmail.com with ESMTPSA id s15sm756001wrg.28.2018.04.02.07.58.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Apr 2018 07:58:05 -0700 (PDT) From: Maxime Hadjinlian To: buildroot@buildroot.org Date: Mon, 2 Apr 2018 16:57:56 +0200 Message-Id: <20180402145802.17611-2-maxime.hadjinlian@gmail.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180402145802.17611-1-maxime.hadjinlian@gmail.com> References: <20180402145802.17611-1-maxime.hadjinlian@gmail.com> Subject: [Buildroot] [PATCH 2/8] pkg-generic: introduce _DL_SUBDIR 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" This per package variable can be used to specify the download subdirectory used by that package. The use case here is for example linux-headers and linux, which share the same sources (because they are the same upstream project), so we don't want to download twice the kernel, nor store it multiple times either. Signed-off-by: Maxime Hadjinlian Reviewed-by: "Yann E. MORIN" --- v4 -> v5: - Change SAME_SOURCE_AS into DL_SUBDIR (Thomas Petazzonni) --- package/pkg-generic.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index 20ee73d438..3c6a1839ff 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -432,7 +432,8 @@ endif $(2)_BASENAME = $$(if $$($(2)_VERSION),$(1)-$$($(2)_VERSION),$(1)) $(2)_BASENAME_RAW = $$(if $$($(2)_VERSION),$$($(2)_RAWNAME)-$$($(2)_VERSION),$$($(2)_RAWNAME)) -$(2)_DL_DIR = $$(DL_DIR)/$$($(2)_RAWNAME) +$(2)_DL_SUBDIR ?= $$($(2)_RAWNAME) +$(2)_DL_DIR = $$(DL_DIR)/$$($(2)_DL_SUBDIR) $(2)_DIR = $$(BUILD_DIR)/$$($(2)_BASENAME) ifndef $(2)_SUBDIR