[OE-core] [oe-core][PATCH] wget.py: handle BBFetchException

Bhargava Sreekantappa Gayathri bhargava.sreekantappa-gayathri at xilinx.com
Tue Mar 20 20:25:19 UTC 2018


When BB_NO_NETWORK is set to 1 and the first mirror url needs network
access, then bitbake will just fail and report error instead of going
through the list of mirror urls. This is because BBFetchException is not
handled when wget is called.

This patch calls wget with a except blocks which returns to the previous
function instead of failing immediately.

Signed-off-by: Bhargava Sreekantappa Gayathri <bhargava.sreekantappa-gayathri at xilinx.com>
Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha at xilinx.com>
---
 bitbake/lib/bb/fetch2/wget.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py
index 7c49c2b..95970d1 100644
--- a/bitbake/lib/bb/fetch2/wget.py
+++ b/bitbake/lib/bb/fetch2/wget.py
@@ -118,7 +118,12 @@ class Wget(FetchMethod):
         else:
             fetchcmd += d.expand(" -P ${DL_DIR} '%s'" % uri)

-        self._runwget(ud, d, fetchcmd, False)
+        try:
+
+            self._runwget(ud, d, fetchcmd, False)
+        except bb.fetch2.BBFetchException:
+            return False
+

         # Sanity check since wget can pretend it succeed when it didn't
         # Also, this used to happen if sourceforge sent us to the mirror page
--
2.7.4

This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.



More information about the Openembedded-core mailing list