All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Thiery <heiko.thiery@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3 03/12] support/scripts/pkg-stats: set developers info
Date: Sun, 23 Feb 2020 22:37:29 +0100	[thread overview]
Message-ID: <CAEyMn7a0QXPLJJ+-dkgJh0EasxGie-NC2pe36byvieMVRCOrow@mail.gmail.com> (raw)
In-Reply-To: <d2c5c7c7-3fd6-7cf7-3108-091d3b15a114@railnova.eu>

Hi Titouan and all,

Am So., 23. Feb. 2020 um 14:45 Uhr schrieb Titouan Christophe
<titouan.christophe@railnova.eu>:
>
> Heiko, all,
> On 2/22/20 9:57 AM, Heiko Thiery wrote:
> > Use the function 'parse_developers' function from getdeveloperlib that
> > collect the information about the developers and the files they
> > maintain. Then set the maintainer(s) to each package.
> >
> > Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
> > ---
> >   support/scripts/pkg-stats | 16 ++++++++++++++++
> >   1 file changed, 16 insertions(+)
> >
> > diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats
> > index 4c963cef0f..643272e9d2 100755
> > --- a/support/scripts/pkg-stats
> > +++ b/support/scripts/pkg-stats
> > @@ -30,10 +30,14 @@ import certifi
> >   import distutils.version
> >   import time
> >   import gzip
> > +import sys
> >   from urllib3 import HTTPSConnectionPool
> >   from urllib3.exceptions import HTTPError
> >   from multiprocessing import Pool
> >
> > +sys.path.append('utils/')
> > +from getdeveloperlib import parse_developers
> > + >   NVD_START_YEAR = 2002
> >   NVD_JSON_VERSION = "1.0"
> >   NVD_BASE_URL = "https://nvd.nist.gov/feeds/json/cve/" + NVD_JSON_VERSION
> > @@ -169,6 +173,15 @@ class Package:
> >           """
> >           return cve in self.all_ignored_cves.get(self.pkgvar(), [])
> >
> > +    def set_developers(self, developers):
> > +        """
> > +        Fills in the .developers field
> > +        """
> > +        self.developers = list()
> > +        for dev in developers:
> > +            if dev.hasfile(self.path):
> > +                self.developers.append((dev.name))
>
> Bikeshedding again, but maybe more elegant like this:

Indeed this is more elegant. I will change that.

> self.developers = [
>      dev.name
>      for dev in developers
>      if dev.hasfile(self.path)
> ]
>
> > +
> >       def __eq__(self, other):
> >           return self.path == other.path
> >
> > @@ -891,6 +904,8 @@ def __main__():
> >                                         'HEAD']).splitlines()[0]
> >       print("Build package list ...")
> >       packages = get_pkglist(args.npackages, package_list)
> > +    print("Getting developers ...")
> > +    developers = parse_developers()
> >       print("Getting package make info ...")
> >       package_init_make_info()
> >       print("Getting package details ...")
> > @@ -902,6 +917,7 @@ def __main__():
> >           pkg.set_check_package_warnings()
> >           pkg.set_current_version()
> >           pkg.set_url()
> > +        pkg.set_developers(developers)
> >       print("Checking URL status")
> >       check_package_urls(packages)
> >       print("Getting latest versions ...")
> >

  reply	other threads:[~2020-02-23 21:37 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-22  8:57 [Buildroot] [PATCH v3 00/12] pkg-stats json output improvements Heiko Thiery
2020-02-22  8:57 ` [Buildroot] [PATCH v3 01/12] support/scripts/pkg-stats: store latest version in a dict Heiko Thiery
2020-02-23 13:26   ` Titouan Christophe
2020-02-23 21:41     ` Heiko Thiery
2020-02-22  8:57 ` [Buildroot] [PATCH v3 02/12] support/scripts/pkg-stats: store patch files for the package Heiko Thiery
2020-02-23 13:35   ` Titouan Christophe
2020-02-23 21:23     ` Heiko Thiery
2020-02-22  8:57 ` [Buildroot] [PATCH v3 03/12] support/scripts/pkg-stats: set developers info Heiko Thiery
2020-02-23 13:45   ` Titouan Christophe
2020-02-23 21:37     ` Heiko Thiery [this message]
2020-02-22  8:57 ` [Buildroot] [PATCH v3 04/12] support/scripts/pkg-stats: store licences of package Heiko Thiery
2020-02-23 15:27   ` Titouan Christophe
2020-02-22  8:57 ` [Buildroot] [PATCH v3 05/12] support/scripts/pkg-stats: add package status Heiko Thiery
2020-02-23 15:19   ` Titouan Christophe
2020-02-24  8:03     ` Heiko Thiery
2020-02-22  8:57 ` [Buildroot] [PATCH v3 06/12] support/scripts/pkg-stats: add package count to stats Heiko Thiery
2020-02-23 14:40   ` Titouan Christophe
2020-02-22  8:57 ` [Buildroot] [PATCH v3 07/12] support/scripts/pkg-stats: store pkg dir path Heiko Thiery
2020-02-23 15:20   ` Titouan Christophe
2020-02-24  8:04     ` Heiko Thiery
2020-02-22  8:57 ` [Buildroot] [PATCH v3 08/12] support/scripts/pkg-stats: add defconfig support Heiko Thiery
2020-02-23 14:37   ` Titouan Christophe
2020-02-22  8:57 ` [Buildroot] [PATCH v3 09/12] support/scripts/pkg-stats: add support for license hash check Heiko Thiery
2020-02-23 16:02   ` Titouan Christophe
2020-02-22  8:57 ` [Buildroot] [PATCH v3 10/12] support/scripts/pkg-stats: set status to 'na' for virtual packages Heiko Thiery
2020-02-23 16:11   ` Titouan Christophe
2020-02-24  8:22     ` Heiko Thiery
2020-02-22  8:57 ` [Buildroot] [PATCH v3 11/12] support/scripts/pkg-stats: initialize all package status checks Heiko Thiery
2020-02-23 14:09   ` Titouan Christophe
2020-02-24  7:28     ` Heiko Thiery
2020-02-22  8:57 ` [Buildroot] [PATCH v3 12/12] support/scripts/pkg-stats: add status for cve check Heiko Thiery
2020-02-23 14:24   ` Titouan Christophe
2020-02-24  7:06     ` Heiko Thiery
2020-02-24  9:35       ` Titouan Christophe
2020-02-24 12:21         ` Heiko Thiery
2020-02-23 16:26 ` [Buildroot] [PATCH v3 00/12] pkg-stats json output improvements Titouan Christophe

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=CAEyMn7a0QXPLJJ+-dkgJh0EasxGie-NC2pe36byvieMVRCOrow@mail.gmail.com \
    --to=heiko.thiery@gmail.com \
    --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.