Skip to contentSkip to conversation

bin/bitbake-setup: print a note about fetcher log if something fails there

PATCH New Alexander Kanavin 1 participant 1 message Sep 7

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bin/bitbake-setup: print a note about fetcher log if something fails there

From: Alexander Kanavin <[email protected]>

Fetcher errors can sometimes be not particularly helpful, e.g.

ERROR: Fetcher failure for URL: '<url>'. Unable to fetch URL from any source.

In such situations, fetcher log can contain the actual information about what went wrong, but bitbake-setup would not say where it is (unlike bitbake proper which does).

So if a log exists, and isn't empty, print a note to try to help users:

ERROR: Check /home/alex/bitbake-builds/poky-master-poky-distro_poky-machine_qemux86-64/layers/logs/fetch_log.20260907192613 for additional information to diagnoze the issue.
ERROR: Fetcher failure for URL: '<url>'. Unable to fetch URL from any source.

---
 bin/bitbake-setup | 4 ++++
 1 file changed, 4 insertions(+)
bin/bitbake-setup +4 -0
index 427a2d835..d18d32ba0 100755
@@ -985,6 +985,10 @@ def do_fetch(fetcher, dir):
         try:
             fetcher.download()
             fetcher.unpack_update(dir)
+        except:
+            if os.path.exists(fetchlog) and os.path.getsize(fetchlog) > 0:
+                logger.error("Check {} for additional information that may help diagnoze the issue.".format(fetchlog))
+            raise
         finally:
             sys.stdout = oldstdout
 
Signature · 1 line
2.47.3