From patchwork Wed Jun 19 20:17:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 1118993 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.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=mind.be Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=mind-be.20150623.gappssmtp.com header.i=@mind-be.20150623.gappssmtp.com header.b="a/xOtUC1"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45Tbpv3T8rz9s4V for ; Thu, 20 Jun 2019 06:17:43 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 93A9420C45; Wed, 19 Jun 2019 20:17:40 +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 rVfKaGjopTFd; Wed, 19 Jun 2019 20:17:38 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 7495B20399; Wed, 19 Jun 2019 20:17:38 +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 A001B1BF4DD for ; Wed, 19 Jun 2019 20:17:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 9883C20399 for ; Wed, 19 Jun 2019 20:17:37 +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 e9QbmoUHVbOF for ; Wed, 19 Jun 2019 20:17:36 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ed1-f68.google.com (mail-ed1-f68.google.com [209.85.208.68]) by silver.osuosl.org (Postfix) with ESMTPS id 2AFDE20031 for ; Wed, 19 Jun 2019 20:17:35 +0000 (UTC) Received: by mail-ed1-f68.google.com with SMTP id k8so1054632edr.11 for ; Wed, 19 Jun 2019 13:17:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mind-be.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=eHRzl3xAvQsQr/ZYhPVUwxz4APO4j7bQzStutSFsD+M=; b=a/xOtUC1KbzforPmUxhfPI5FJqhRjcx7cBOiN6ohdffHHbi7XtJQkTSYAIzzavewwQ TmYrWVnZ/GHJV2cTem0EAw+1g0NTKhOn+ahg5MrKIbOOgsr4gxMb3ciK2BxFwgvf8wpI tD9HCrQaRiXCvAkxYpLgZFTJFDl8t/KBA1Gqi48/SmZ0uo/Y+8bUdAF0Z7XoMU6i5v4A gM+gQDY6Fdv4zUPBwICHRDJ1+yeX6/wYBcdEKAG/eeJ7qYW2mFrW89Dzntk87Aa8Ryfx inQqMnnYi91gQKIlpm4GP+9uCbsVdgdhwGybliY/7P614s8cNLsHJWtXWtIxchdBt7Hn F39Q== 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:mime-version :content-transfer-encoding; bh=eHRzl3xAvQsQr/ZYhPVUwxz4APO4j7bQzStutSFsD+M=; b=rsK+AsBlTTptNxCGm4t4HCUp3p6R659uThO6zjs5g4dB1drb66Erx4YYsrT/HuubdY pxWO7HWS/fHl5VAhYkCMdbFVtfYPTlg7/aTdB+VX+zpP+eJqHcmls19yX74KRtIzEuka PDsihdA9jRJSl8bALrmfjYOP/MUxaUye14a2ec5PLlBK2VW/7qlxAxtxlObCcKG7bVn4 Cs7x4/Mu3LzHEPlWR/QKCGaSkBVGjditPG1wvUr8uUDNTaZ8Of8J3dIJCZJPhSfUk0zT p59l0CDeDJd/2sJJ5UouIYZZhjia9w/BQO+7pIrJWGJ3yetAt+CZu4uCgx6+SPJAAMYV F4IA== X-Gm-Message-State: APjAAAX+QrAiJEpaAdnqzvUNedWgOa8/652hxyIiGoFf3kQwbFMhoiVT w9cgJkHe8QRI2LKFiKshNWlx1xZ646o= X-Google-Smtp-Source: APXvYqzansUqkn6cKteToLjCiR7LXM/I0XzcgidlG5LrJnI8bRL/IbSAJDY4wFKj2W9R9B80bkJCjA== X-Received: by 2002:a17:906:1181:: with SMTP id n1mr76950501eja.177.1560975454094; Wed, 19 Jun 2019 13:17:34 -0700 (PDT) Received: from localhost.localdomain (d51A4E7A0.access.telenet.be. [81.164.231.160]) by smtp.gmail.com with ESMTPSA id a3sm5739565edr.48.2019.06.19.13.17.32 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 19 Jun 2019 13:17:33 -0700 (PDT) From: "Arnout Vandecappelle (Essensium/Mind)" To: buildroot@buildroot.org Date: Wed, 19 Jun 2019 22:17:32 +0200 Message-Id: <20190619201732.24027-1-arnout@mind.be> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] package/pkg-utils.mk: add dl_dir to show-info output X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" It can be useful for scripts to be able to access a package's source file after download. That used to be easy, just DL_DIR/PKG_SOURCE. However, with the subdirectories in DL_DIR which can be overridden with PKG_DL_SUBDIR, that is no longer easy. Therefore, this patch adds dl_dir to the downloads list of a package. It can be used with the following jq script to get a newline-separated list of all downloaded files: make show-info | jq -r '.[].downloads[]? | (.dl_dir + "/" + .source)' Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/pkg-utils.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk index b7280e930f..4de0bc042c 100644 --- a/package/pkg-utils.mk +++ b/package/pkg-utils.mk @@ -104,7 +104,8 @@ define _json-info-pkg-details $(call DOWNLOAD_URIS,$(dl),$(1)) ) ) - ] + ], + "dl_dir": "$($(1)_DL_DIR)" }, ) ],