diff mbox series

fetch/wget/_check_latest_version_by_dir: correct iterative check of versioned directories

Message ID 20260629125226.3931549-1-alex.kanavin@gmail.com
State New
Headers show
Series fetch/wget/_check_latest_version_by_dir: correct iterative check of versioned directories | expand

Commit Message

Alexander Kanavin June 29, 2026, 12:52 p.m. UTC
From: Alexander Kanavin <alex@linutronix.de>

The versioned directories check runs a loop, only considering a directory
if it is bigger or equal to the biggest directory found so far. The
criteria for 'biggest directory found so far' wasn't entirely correct:
it was set even if no valid tarballs were found in it.

This broke libadwaita's version check, when upstream released
1.10.apha (not a valid version) and made a separate directory for it.
1.10 comes ahead of 1.9, and so 1.9 would not be looked into, resulting
in the overall check failing to find any valid versions:

https://download.gnome.org/sources/libadwaita/

This corrects the 'biggest directory' criteria to also include
'contains valid versions'.

I have confirmed that overall oe-core check for latest versions still works
and reports the same versions, except libadwait check which is no longer broken.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 lib/bb/fetch2/wget.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/lib/bb/fetch2/wget.py b/lib/bb/fetch2/wget.py
index 71667dd2b..141c2d062 100644
--- a/lib/bb/fetch2/wget.py
+++ b/lib/bb/fetch2/wget.py
@@ -610,8 +610,7 @@  class Wget(FetchMethod):
                             package, package_regex, current_version, ud, d, filter_regex)
                     if pupver:
                         version[1] = pupver
-
-                    version_dir = version_dir_new
+                        version_dir = version_dir_new
 
         return version[1]