From: Peter Korsgaard <peter@korsgaard.com>
To: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [Buildroot] [PATCH] support/scripts/pkg-stats: strengthen version check in check_package_get_latest_version_by_distro()
Date: Sun, 20 Mar 2022 23:39:31 +0100 [thread overview]
Message-ID: <875yo8l04c.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <20220316214848.448925-1-thomas.petazzoni@bootlin.com> (Thomas Petazzoni via buildroot's message of "Wed, 16 Mar 2022 22:48:46 +0100")
>>>>> "Thomas" == Thomas Petazzoni via buildroot <buildroot@buildroot.org> writes:
> The check_package_get_latest_version_by_distro() function analyzes the
> data returned by release-monitoring.org. For two of our
> packages (bento4 and qextserialport), release-monitoring.org returns
> something that is a bit odd: it returns an entry with a
> "stable_versions" field that contains an empty array. Our code was
> ready to have or not have a "stable_versions" entry, but when it is
> present, we assumed it was not an empty array. These two packages, for
> some reason, break this assumption.
> In order to solve this problem, this commit is more careful, and uses
> the stable_versions field only if it exists and it has at least one
> entry. The code is also reworked as a sequence of "if...elif...else"
> to be more readable.
> This fixes the following exception when running pkg-stats on the full
> package set:
> Task exception was never retrieved
> future: <Task finished name='Task-10772' coro=<check_package_latest_version_get() done, defined at ./support/scripts/pkg-stats:532> exception=IndexError('list index out of range')>
> Traceback (most recent call last):
> File "./support/scripts/pkg-stats", line 535, in check_package_latest_version_get
> if await check_package_get_latest_version_by_distro(session, pkg):
> File "./support/scripts/pkg-stats", line 489, in check_package_get_latest_version_by_distro
> version = data['stable_versions'][0] if 'stable_versions' in data else data['version'] if 'version' in data else None
> IndexError: list index out of range
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Committed to 2021.02.x, 2021.11.x and 2022.02.x, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
prev parent reply other threads:[~2022-03-20 22:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-16 21:48 [Buildroot] [PATCH] support/scripts/pkg-stats: strengthen version check in check_package_get_latest_version_by_distro() Thomas Petazzoni via buildroot
2022-03-16 22:06 ` Yann E. MORIN
2022-03-20 22:39 ` Peter Korsgaard [this message]
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=875yo8l04c.fsf@dell.be.48ers.dk \
--to=peter@korsgaard.com \
--cc=buildroot@buildroot.org \
--cc=thomas.petazzoni@bootlin.com \
--cc=yann.morin.1998@free.fr \
/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.