* [PATCH] fetch2/__init_.py removed bb.error which caused exit code 1
@ 2017-07-18 13:43 Paulo Neves
2017-07-18 16:13 ` Leonardo Sandoval
0 siblings, 1 reply; 2+ messages in thread
From: Paulo Neves @ 2017-07-18 13:43 UTC (permalink / raw)
To: Yocto list discussion
[-- Attachment #1: Type: text/plain, Size: 681 bytes --]
http://lists.openembedded.org/pipermail/openembedded-core/2012-September/069448.html
Workaround to avoid exit 1 status.
The reason it happens is that there are 2 missions
the state cache uses the normal fetcher to get
its's stuff and it is acceptable for it to fail.
On the other hand it is not acceptable for fetch
to fail.
In it's code the state cache code catches the exception that the
fetcher launches and discards. The problem
is that before this exception is caught it prints
a bb.error and bb.error prints something and
continues on like no problem happened. but marks
the exit code as 1 which is a disaster.
[-- Attachment #2: 0001-Workaround-to-avoid-exit-1-status.patch --]
[-- Type: text/x-patch, Size: 1499 bytes --]
From 140d8209895e3effd4f8ee5c92e49f0c653bf3e2 Mon Sep 17 00:00:00 2001
From: Paulo Neves <paulo.de_sousa_neves@nokia.com>
Date: Wed, 5 Jul 2017 14:49:28 +0200
Subject: [PATCH 1/2] Workaround to avoid exit 1 status.
The reason it happens is that there are 2 missions
the state cache uses the normal fetcher to get
its's stuff and it is acceptable for it to fail.
On the other hand it is not acceptable for fetch
to fail.
In it's code the state cache code catches the exception that the
fetcher launches and discards. The problem
is that before this exception is caught it prints
a bb.error and bb.error prints something and
continues on like no problem happened. but marks
the exit code as 1 which is a disaster.
---
bitbake/lib/bb/fetch2/__init__.py | 2 --
1 file changed, 2 deletions(-)
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 4079e3bb4ca9ab229d917171d76f41d962218ded..96c31830ecb8fb6272ca5528b2ce51382c2959d5 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -1620,8 +1620,6 @@ class Fetch(object):
localpath = try_mirrors(self, self.d, ud, mirrors)
if not localpath or ((not os.path.exists(localpath)) and localpath.find("*") == -1):
- if firsterr:
- logger.error(str(firsterr))
raise FetchError("Unable to fetch URL from any source.", u)
update_stamp(ud, self.d)
--
2.6.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-18 16:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-18 13:43 [PATCH] fetch2/__init_.py removed bb.error which caused exit code 1 Paulo Neves
2017-07-18 16:13 ` Leonardo Sandoval
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.