Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] wget.py: handle BBFetchException
@ 2018-03-20 20:25 Bhargava Sreekantappa Gayathri
  2018-03-20 20:35 ` ✗ patchtest: failure for " Patchwork
  2018-03-20 23:07 ` [PATCH] " Richard Purdie
  0 siblings, 2 replies; 3+ messages in thread
From: Bhargava Sreekantappa Gayathri @ 2018-03-20 20:25 UTC (permalink / raw)
  To: openembedded-core, manjukum; +Cc: Bhargava Sreekantappa Gayathri

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@xilinx.com>
Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@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.


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-03-20 23:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-20 20:25 [PATCH] wget.py: handle BBFetchException Bhargava Sreekantappa Gayathri
2018-03-20 20:35 ` ✗ patchtest: failure for " Patchwork
2018-03-20 23:07 ` [PATCH] " Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox