[AUH][PATCH v2 2/9] upgrade-helper.py: Handle fetch errors gracefully during version scan

<[email protected]>
Newsgroups org.yoctoproject.lists.yocto-patches
Message-ID <[email protected]>
From: Daniel Turull <[email protected]>

Materialise the iterator from get_recipe_upgrade_status into a list,
catching any exception that terminates the iterator early. A single
unreachable upstream (e.g. git.savannah.gnu.org down) no longer
aborts the entire scan — the recipes collected so far are still
processed.

Signed-off-by: Daniel Turull <[email protected]>
Assisted-by: Claude, Anthropic
---
 upgrade-helper.py | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/upgrade-helper.py b/upgrade-helper.py
index aef7ed1..98391f3 100755
--- a/upgrade-helper.py
+++ b/upgrade-helper.py
@@ -711,7 +711,18 @@ class UniverseUpdater(Updater):
         upgrade_pkggroups = []
 
         for layer_name, layer_recipes in self.recipes:
-            pkggroups = oe.recipeutils.get_recipe_upgrade_status(layer_recipes)
+            pkggroups_iter = oe.recipeutils.get_recipe_upgrade_status(layer_recipes)
+
+            # Collect results, logging any fetch error that terminates
+            # the iterator early (oe-core raises inside executor.map,
+            # which cannot be resumed after an exception).
+            pkggroups = []
+            try:
+                for group in pkggroups_iter:
+                    pkggroups.append(group)
+            except Exception as e:
+                W(" Fetch error terminated recipe scan for layer %s: %s" %
+                  (layer_name, str(e)))
 
             for group in pkggroups:
 
-- 
2.34.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.