package/pkg-utils.mk: add dl_dir to show-info output
authorArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Sat, 3 Aug 2019 14:04:33 +0000 (16:04 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Wed, 25 Sep 2019 19:54:55 +0000 (21:54 +0200)
commitf304caab11ebb6140e942ced9fc12c79dfa609c9
tree3dcd46b900ab2f99cbfb749e66328be28220e8ac
parent77657f36de106a062b7e91a0589bf2bac9a8641d
package/pkg-utils.mk: add dl_dir to show-info output

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 package information. It prints
just PKG_DL_SUBDIR, to avoid dumping absolute paths to the buildroot
directory in the show-info output.

It can be used with the following jq script to get a newline-separated
list of all downloaded files:

make show-info | jq -r '.[] | ("dl/" + .dl_dir + "/" + .downloads[]?.source)'

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Cc: Yann E. MORIN <yann.morin.1998@free.fr>
Acked-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/pkg-utils.mk