From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] package/pkg-utils.mk: add dl_dir to show-info output
Date: Sat, 22 Jun 2019 10:05:23 +0200 [thread overview]
Message-ID: <20190622080523.GC13664@scaer> (raw)
In-Reply-To: <20190619202823.GH2216@scaer>
Arnout, All,
On 2019-06-19 22:28 +0200, Yann E. MORIN spake thusly:
> On 2019-06-19 22:17 +0200, Arnout Vandecappelle (Essensium/Mind) spake thusly:
> > 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:
[--SNIP--]
> Instead, what about emitting the full path to said blob:
>
> diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
> index b7280e930f..80ad349dac 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))
> )
> )
> - ]
> + ],
> + "path": "$($(1)_DL_DIR)/$(notdir $(dl))"
> },
> )
> ],
>
> Or just dump the dl_dir only once:
>
> diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
> index b7280e930f..bd918e5faa 100644
> --- a/package/pkg-utils.mk
> +++ b/package/pkg-utils.mk
> @@ -94,6 +94,7 @@ endef
> define _json-info-pkg-details
> "version": "$($(1)_DL_VERSION)",
> "licenses": "$($(1)_LICENSE)",
> + "dl_dir": "$($(1)_DL_DIR)",
> "downloads": [
> $(foreach dl,$(sort $($ (1)_ALL_DOWNLOADS)),
> {
Actually, there is just one thing I don't like about $($(1)_DL_DIR), is
that it contains a local information: it starts with BR2_DL_DIR, which
is user- and site-specific.
Instead, I'd argue we should just print $($(1)_DL_SUBDIR).
That way, the generated json blurb can even be distributed, and there is
no local information that leaks. Note: even the user name (as present in
$(BR2_DL_DIR)) can be a liability in some cases (true story).
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2019-06-22 8:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-19 20:17 [Buildroot] [PATCH] package/pkg-utils.mk: add dl_dir to show-info output Arnout Vandecappelle
2019-06-19 20:28 ` Yann E. MORIN
2019-06-22 8:05 ` Yann E. MORIN [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-08-03 13:49 Arnout Vandecappelle
2019-09-22 11:54 ` Yann E. MORIN
2019-09-22 11:55 ` Yann E. MORIN
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190622080523.GC13664@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.