[bitbake][wrynose][2.18][PATCH v2 1/8] fetch2: reraise IOError during download

Yoann Congal <[email protected]> Thu, 11 Jun 2026 15:11:23 +0200
Newsgroups org.openembedded.lists.bitbake-devel
Message-ID <69e22a5f95d650ed83e6064d4e99b8dc067a6659.1781183212.git.yoann.congal@smile.fr>
From: Anthony Squires <[email protected]>

Fixes [YOCTO #16268]

Adds a missing "raise" statement to download that ensures when there
is an IOError/OSError that is is correctly reported and not silently
discarded.

When an IOError is thrown in this case do_fetch silently passes which
then leads to downstream failures in do_unpack when the file doesn't
exist.

Signed-off-by: Anthony Squires <[email protected]>
Signed-off-by: Richard Purdie <[email protected]>
(cherry picked from commit 0460038e4705934e614b26ba5febc09293924cd4)
Signed-off-by: Yoann Congal <[email protected]>
---
 lib/bb/fetch2/__init__.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index 0e4f491ce..d913d7511 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -1969,6 +1969,7 @@ class Fetch(object):
                 if e.errno in [errno.ESTALE]:
                     logger.error("Stale Error Observed %s." % u)
                     raise ChecksumError("Stale Error Detected")
+                raise
 
             except BBFetchException as e:
                 if isinstance(e, NoChecksumError):