[Buildroot] [PATCH 09/12 v2] core: introduce new global show-info

Peter Korsgaard peter at korsgaard.com
Tue Apr 16 09:47:09 UTC 2019


>>>>> "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:

https://stackoverflow.com/questions/25378013/how-to-convert-a-json-object-to-key-value-format-in-jq

-- 
Bye, Peter Korsgaard



More information about the buildroot mailing list