All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] support/scripts/pkg-stats: fix the status for packages found by guess
@ 2021-10-08 21:21 Thomas Petazzoni
  2021-10-08 21:21 ` [Buildroot] [PATCH 2/2] support/scripts/pkg-stats: use the new 'stable_versions' field of release-monitoring.org Thomas Petazzoni
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2021-10-08 21:21 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Petazzoni

The pkg-stats scripts tries to match packages against
release-monitoring.org in two days:

- 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@bootlin.com>
---
This should be backported to stable branches of Buildroot.
---
 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 cc91d13167..0f1521873f 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
-- 
2.31.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-10-25 18:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-08 21:21 [Buildroot] [PATCH 1/2] support/scripts/pkg-stats: fix the status for packages found by guess Thomas Petazzoni
2021-10-08 21:21 ` [Buildroot] [PATCH 2/2] support/scripts/pkg-stats: use the new 'stable_versions' field of release-monitoring.org Thomas Petazzoni
2021-10-21 19:14   ` Arnout Vandecappelle
2021-10-21 20:03     ` Thomas Petazzoni
2021-10-25 18:54   ` Peter Korsgaard
2021-10-21 19:09 ` [Buildroot] [PATCH 1/2] support/scripts/pkg-stats: fix the status for packages found by guess Arnout Vandecappelle
2021-10-25 18:54 ` Peter Korsgaard

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.