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.
From 140d8209895e3effd4f8ee5c92e49f0c653bf3e2 Mon Sep 17 00:00:00 2001
From: Paulo Neves <paulo.de_sousa_ne...@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

-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to