Patchwork [bitbake-devel] fetch2: Unable to fetch URL should be a warning, not an error

login
register
mail settings
Submitter Konrad Scherer
Date Dec. 4, 2013, 3:39 p.m.
Message ID <1386171581-16533-1-git-send-email-konrad.scherer@windriver.com>
Download mbox | patch
Permalink /patch/62829/
State New
Headers show

Comments

Konrad Scherer - Dec. 4, 2013, 3:39 p.m.
From: Konrad Scherer <Konrad.Scherer@windriver.com>

Running a build server with local sstate cache and running the
oe-core sstate-cache-management.sh script on cron can cause errors if
an sstate file is removed before it can be used. This is not an
error because the package can be rebuilt from source. Changing
the message to a warning is more appropriate in this case.

Signed-off-by: Konrad Scherer <Konrad.Scherer@windriver.com>
---
 lib/bb/fetch2/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Chris Larson - Dec. 4, 2013, 10:51 p.m.
On Wed, Dec 4, 2013 at 8:39 AM, Konrad Scherer <konrad.scherer@windriver.com
> wrote:

> From: Konrad Scherer <Konrad.Scherer@windriver.com>
>
> Running a build server with local sstate cache and running the
> oe-core sstate-cache-management.sh script on cron can cause errors if
> an sstate file is removed before it can be used. This is not an
> error because the package can be rebuilt from source. Changing
> the message to a warning is more appropriate in this case.
>
> Signed-off-by: Konrad Scherer <Konrad.Scherer@windriver.com>
>

FYI, there’s an open bug to resolve similar issues by getting rid of the
message entirely, not just changing it to a warning:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=4499

Patch

diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index 199cdca..ddbd7f1 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -1418,7 +1418,7 @@  class Fetch(object):
 
                 if not localpath or ((not os.path.exists(localpath)) and localpath.find("*") == -1):
                     if firsterr:
-                        logger.error(str(firsterr))
+                        logger.warn(str(firsterr))
                     raise FetchError("Unable to fetch URL from any source.", u)
 
                 update_stamp(ud, self.d)