mbox series

[v2,0/8] pkg-stats json output improvements

Message ID 20200105092329.6288-1-heiko.thiery@gmail.com
Headers show
Series pkg-stats json output improvements | expand

Message

Heiko Thiery Jan. 5, 2020, 9:23 a.m. UTC
This patches add several improvements for the json output of the
pkg-stats script.

- add developers information to the packages
- add supported defconfigs to json
- add license information to json
- add more generic status field to the packages

---
v1 -> v2:
- cleanup and recreation of patches
- remove pkg name from dumping to json
- use patch_files instead of combine count and files in dict
- include getdevelopers.py to reuse Developers class

---
Heiko Thiery (8):
  support/scripts/pkg-stats: store latest version in a dict
  support/scripts/pkg-stats: store patch files for the package
  support/scripts/pkg-stats: set developers info
  support/scripts/pkg-stats: store licences of package
  support/scripts/pkg-stats: add package status
  support/scripts/pkg-stats: add package count to stats
  support/scripts/pkg-stats: store pkg dir path
  support/scripts/pkg-stats: add defconfig support

 support/scripts/pkg-stats | 208 +++++++++++++++++++++++++++-----------
 1 file changed, 151 insertions(+), 57 deletions(-)

Comments

Thomas Petazzoni Jan. 5, 2020, 7:45 p.m. UTC | #1
Hello Heiko,

On Sun,  5 Jan 2020 10:23:22 +0100
Heiko Thiery <heiko.thiery@gmail.com> wrote:

> This patches add several improvements for the json output of the
> pkg-stats script.
> 
> - add developers information to the packages
> - add supported defconfigs to json
> - add license information to json
> - add more generic status field to the packages

Thanks for this new iteration. There is however one really important
thing that I missed in the review of v1: the JSON provided by pkg-stats
is then used by other tools. So if you change the layout/format of the
JSON file, those tools also need to be modified accordingly.

The tool consuming the JSON file today is the daily-mail script at
https://git.buildroot.org/buildroot-test/tree/utils/daily-mail. I think
the only function that needs to be modified is
https://git.buildroot.org/buildroot-test/tree/utils/daily-mail#n549.

Best regards,

Thomas
Heiko Thiery Jan. 5, 2020, 9:40 p.m. UTC | #2
Am So., 5. Jan. 2020 um 20:45 Uhr schrieb Thomas Petazzoni
<thomas.petazzoni@bootlin.com>:
>
> Hello Heiko,
>
> On Sun,  5 Jan 2020 10:23:22 +0100
> Heiko Thiery <heiko.thiery@gmail.com> wrote:
>
> > This patches add several improvements for the json output of the
> > pkg-stats script.
> >
> > - add developers information to the packages
> > - add supported defconfigs to json
> > - add license information to json
> > - add more generic status field to the packages
>
> Thanks for this new iteration. There is however one really important
> thing that I missed in the review of v1: the JSON provided by pkg-stats
> is then used by other tools. So if you change the layout/format of the
> JSON file, those tools also need to be modified accordingly.
>
> The tool consuming the JSON file today is the daily-mail script at
> https://git.buildroot.org/buildroot-test/tree/utils/daily-mail. I think
> the only function that needs to be modified is
> https://git.buildroot.org/buildroot-test/tree/utils/daily-mail#n549.

ok I see .. was not aware of this repo till now. I try to figure out
how it works. But when I'm correct this script is also used for the
other branches of maintained buildroot versions. So if we change the
layout of the JSON file we have to take care of the pkg-stats script
in the other maintained branches.

> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
Heiko Thiery Jan. 6, 2020, 6:08 p.m. UTC | #3
Hi Thomas,

Am So., 5. Jan. 2020 um 22:40 Uhr schrieb Heiko Thiery <heiko.thiery@gmail.com>:
>
> Am So., 5. Jan. 2020 um 20:45 Uhr schrieb Thomas Petazzoni
> <thomas.petazzoni@bootlin.com>:
> >
> > Hello Heiko,
> >
> > On Sun,  5 Jan 2020 10:23:22 +0100
> > Heiko Thiery <heiko.thiery@gmail.com> wrote:
> >
> > > This patches add several improvements for the json output of the
> > > pkg-stats script.
> > >
> > > - add developers information to the packages
> > > - add supported defconfigs to json
> > > - add license information to json
> > > - add more generic status field to the packages
> >
> > Thanks for this new iteration. There is however one really important
> > thing that I missed in the review of v1: the JSON provided by pkg-stats
> > is then used by other tools. So if you change the layout/format of the
> > JSON file, those tools also need to be modified accordingly.
> >
> > The tool consuming the JSON file today is the daily-mail script at
> > https://git.buildroot.org/buildroot-test/tree/utils/daily-mail. I think
> > the only function that needs to be modified is
> > https://git.buildroot.org/buildroot-test/tree/utils/daily-mail#n549.
>
> ok I see .. was not aware of this repo till now. I try to figure out
> how it works. But when I'm correct this script is also used for the
> other branches of maintained buildroot versions. So if we change the
> layout of the JSON file we have to take care of the pkg-stats script
> in the other maintained branches.

if I see correct we only need to change this line
https://git.buildroot.org/buildroot-test/tree/utils/daily-mail#n554 to
get the 'status', 'latest_v' and 'id' from the dict 'rm_version'.
Should I send a patch to you? Or where to send?

> > Best regards,
> >
> > Thomas
> > --
> > Thomas Petazzoni, CTO, Bootlin
> > Embedded Linux and Kernel engineering
> > https://bootlin.com

--
Heiko