Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH next v2 4/5] support/scripts/pkg-stats-new: add latest upstream version information
Date: Wed, 7 Mar 2018 23:41:44 +0100	[thread overview]
Message-ID: <20180307234144.69fc987b@windsurf> (raw)
In-Reply-To: <5a961c197f405_484fb72dfc147d@ultri3.mail>

Hello,

On Wed, 28 Feb 2018 00:03:53 -0300, Ricardo Martincoski wrote:

> When running the script with a few packages it works well.
> But when running the script for all packages, for me it often hangs at the end
> (2 out of 5 tries).
> It can be related to my setup (python module versions?, internet connection?)
> But anyway see later in this email an alternative approach.

This could probably be solved by adding timeouts, but I find your
solution below interesting and useful.

> There is also an undocumented API:
> http://release-monitoring.org/api/projects/?distro=Buildroot
> It was implemented here:
> https://github.com/release-monitoring/anitya/commit/f3d8be75a6643b5d8c55754b74ed4f74f71fe952
> and will eventually be documented here:
> https://github.com/release-monitoring/anitya/issues/420
> 
> When the Buildroot distro becomes 90% filled we could get something like this:
> $ wget -O Alpine 'http://release-monitoring.org/api/projects/?distro=Alpine'
> ... 1MB, 15 seconds ...
> $ grep -c '"name"' Alpine
> 1838

Right, but it's going to take a while before we reach this :-)

> Also there is a field 'version' that looks to contain the latest version (or
> None if there is none). For the majority of projects it is exactly equal to
> 'versions'[0].
> See the test below, but I didn't find a documentation to corroborate this.

We can probably talk with the maintainers of release-monitoring.org
about this.

> As an alternative approach we could first download 2 lists:
> - all projects for distro (now 10, eventually 2000+)
> - all projects (now 16000+)
> It could even be saved to a file by one option and then loaded by other option
> to speedup the development/maintenance.

Yes, I'll do something like this: download both files to some
~/.release-monitoring-all-packages.cache and
~/.release-monitoring-buildroot-packages.cache, and use them if they
already exist. Then an option such as -r/--reload can force pkg-stats
to re-download the new version.

> But that would require:
> The projects in the Buildroot distro to be named exactly as the buildroot
> package, i.e. samba4, not samba.

Well, that is the whole point of "distros" on release-monitoring.org:
provide a mapping between the package name in the distribution and the
package name on release-monitoring.org.

The packages present in the "Buildroot" distro on
release-monitoring.org were added by me, often to fix a mismatch
between the Buildroot name and the release-monitoring.org name. samba4
(Buildroot) vs. samba (release-monitoring.org) is a good example.

> Or of course implementing the search by
> similarity with regexp.
> 
> And be aware: it produces few different guesses (some better, some worst).

I didn't understand this part. Why would the results be different ?

> > +    if pkg.latest_version[0]:
> > +        latest_version_text += "has <a href=\"https://release-monitoring.org/distro/Buildroot/\">mapping</a>"
> > +    else:
> > +        latest_version_text += "has <a href=\"https://release-monitoring.org/distro/Buildroot/\">no mapping</a>"  
> 
> If you don't think it gets too ugly, you could invert the text, putting
> 'mapping'/'no mapping' as the first cell text. It should make sorting by this
> column to show all 'mapping' together and 'no mapping' together. I did not
> tested this.

I understand the point, but I find it a bit ugly that this information
appears first in this cell. One option is to make this a separate
column, but we already have a lot of columns. Can we handle that later
on ?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com

  reply	other threads:[~2018-03-07 22:41 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-21 22:13 [Buildroot] [PATCH next v2 0/5] New pkg-stats script, with version information Thomas Petazzoni
2018-02-21 22:13 ` [Buildroot] [PATCH next v2 1/5] support/scripts/pkg-stats-new: rewrite in Python Thomas Petazzoni
2018-02-22  1:58   ` Ricardo Martincoski
2018-03-07 22:35     ` Thomas Petazzoni
2018-02-21 22:13 ` [Buildroot] [PATCH next v2 2/5] support/scripts/pkg-stats-new: add -n and -p options Thomas Petazzoni
2018-02-24  4:54   ` Ricardo Martincoski
2018-03-07 22:35     ` Thomas Petazzoni
2018-02-21 22:13 ` [Buildroot] [PATCH next v2 3/5] support/scripts/pkg-stats-new: add current version information Thomas Petazzoni
2018-02-26  0:47   ` Ricardo Martincoski
2018-03-07 22:25     ` Thomas Petazzoni
2018-03-08  3:14       ` Ricardo Martincoski
2018-03-08  7:48         ` Thomas Petazzoni
2018-02-21 22:13 ` [Buildroot] [PATCH next v2 4/5] support/scripts/pkg-stats-new: add latest upstream " Thomas Petazzoni
2018-02-28  3:03   ` Ricardo Martincoski
2018-03-07 22:41     ` Thomas Petazzoni [this message]
2018-03-08  9:52       ` Ricardo Martincoski
2018-03-08  9:56         ` Thomas Petazzoni
2018-03-09  2:41           ` Ricardo Martincoski
2018-03-21 20:58     ` Thomas Petazzoni
2018-03-22  3:11       ` Ricardo Martincoski
2018-03-22  7:53         ` Thomas Petazzoni
2018-03-21 21:35     ` Thomas Petazzoni
2018-03-22  3:17       ` Ricardo Martincoski
2018-03-22 10:01         ` Thomas Petazzoni
2018-02-21 22:13 ` [Buildroot] [PATCH next v2 5/5] support/scripts/pkg-stats: replace with new Python version Thomas Petazzoni
2018-02-24 17:55 ` [Buildroot] [PATCH next v2 0/5] New pkg-stats script, with version information Arnout Vandecappelle

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=20180307234144.69fc987b@windsurf \
    --to=thomas.petazzoni@bootlin.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox