[Buildroot] [git commit branch/2021.08.x] support/scripts/pkg-stats: fix the status for packages found by guess
Peter Korsgaard
peter at korsgaard.com
Mon Oct 25 18:51:43 UTC 2021
commit: https://git.buildroot.net/buildroot/commit/?id=23017276ccb0f7305107331001e99830a72a87bd
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2021.08.x
The pkg-stats scripts tries to match packages against
release-monitoring.org in two ways:
- First by using the "Buildroot" distribution registered on
release-monitoring.org, in which we have added a lot of mappings
between Buildroot package names and release-monitoring.org package
names. If there is a match using this distribution, the package
status is RM_API_STATUS_FOUND_BY_DISTRO, which means that the
resulting HTML has a "found by distro" statement.
- Then, if the first solution didn't work, by using the pattern
matching, as done in the check_package_get_latest_version_by_guess()
function.
However, there is a bug in this later case: it sets the package status
to RM_API_STATUS_FOUND_BY_DISTRO as well, while it should have been
RM_API_STATUS_FOUND_BY_PATTERN. Due to this bug, in the resulting HTML
file from a pkg-stats run, all packages are marked as "found by
distro" even the ones that are "found by guess".
This commit fixes that by setting the correct package status.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout at mind.be>
(cherry picked from commit 9602fd94e767a30861e43ee8c28086bb413a4e97)
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
support/scripts/pkg-stats | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats
index d5bd130de3..12f2cc2019 100755
--- a/support/scripts/pkg-stats
+++ b/support/scripts/pkg-stats
@@ -512,7 +512,7 @@ async def check_package_get_latest_version_by_guess(session, pkg, retry=True):
if len(projects) > 0:
check_package_latest_version_set_status(pkg,
- RM_API_STATUS_FOUND_BY_DISTRO,
+ RM_API_STATUS_FOUND_BY_PATTERN,
projects[0]['version'],
projects[0]['id'])
return True
More information about the buildroot
mailing list