[Buildroot] [PATCH 09/12 v2] core: introduce new global show-info
arnout at mind.be
Tue Apr 16 19:49:03 UTC 2019
On 16/04/2019 11:47, Peter Korsgaard wrote:
>>>>>> "Arnout" == Arnout Vandecappelle <arnout at mind.be> writes:
> > On 14/04/2019 22:17, Yann E. MORIN wrote:
> >> Users are increasingly trying to extract information about packages. For
> >> example, they might need to get the list of URIs, or the dependencies of
> >> a package.
> >> Although we do have a bunch of rules to generate some of that, this is
> >> done in ad-hoc way, with most of the output formats just ad-hoc, raw,
> >> unformatted blurbs, mostly internal data dumped as-is.
> >> Introduce a new rule, show-info, that provides a properly formatted
> >> output of all the meta-information about packages: name, type, version,
> >> licenses, dependencies...
> >> We choose to use JSON as the output format, because it is pretty
> >> versatile, has parsers in virtually all languages, has tools to parse
> >> from the shell (jq).
> > Actually, OpenWrt has a couple of bash functions to convert JSON into bash
> > variables. If we start making extensive use of show-info, it might be worth
> > copying that.
> That should be pretty trivial to do with jq, E.G. something like:
Yes, but then jq needs to be installed. The point is to be able to use the
show-info output in our own shell scripts without requiring an additional
package to be installed.
More information about the buildroot