All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: bitbake-devel <bitbake-devel@lists.openembedded.org>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Subject: [PATCH] knotty: Don't show errors for universe provider issues
Date: Sun, 31 Jan 2016 13:23:12 +0000	[thread overview]
Message-ID: <1454246592.27087.14.camel@linuxfoundation.org> (raw)

When running universe builds, we don't expect an error exit code for
provider warnings. Change the error messages to warnings in this case.

This deals with errors causing problems on our autobuilders amongst 
other issues.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py
index 3f2b77b..9e71b1c 100644
--- a/bitbake/lib/bb/ui/knotty.py
+++ b/bitbake/lib/bb/ui/knotty.py
@@ -289,6 +289,7 @@ def main(server, eventHandler, params, tf = TerminalFilter):
     llevel, debug_domains = bb.msg.constructLogOptions()
     server.runCommand(["setEventMask", server.getEventHandle(), llevel, debug_domains, _evt_list])
 
+    universe = False
     if not params.observe_only:
         params.updateFromServer(server)
         params.updateToServer(server, os.environ.copy())
@@ -299,6 +300,8 @@ def main(server, eventHandler, params, tf = TerminalFilter):
         if 'msg' in cmdline and cmdline['msg']:
             logger.error(cmdline['msg'])
             return 1
+        if cmdline['action'][0] == "buildTargets" and "universe" in cmdline['action'][1]:
+            universe = True
 
         ret, error = server.runCommand(cmdline['action'])
         if error:
@@ -456,13 +459,18 @@ def main(server, eventHandler, params, tf = TerminalFilter):
                     if event._close_matches:
                         extra = ". Close matches:\n  %s" % '\n  '.join(event._close_matches)
 
+                # For universe builds, only show these as warnings, not errors
+                h = logger.error
+                if universe:
+                    h = logger.warning
+
                 if event._dependees:
-                    logger.error("Nothing %sPROVIDES '%s' (but %s %sDEPENDS on or otherwise requires it)%s", r, event._item, ", ".join(event._dependees), r, extra)
+                    h("Nothing %sPROVIDES '%s' (but %s %sDEPENDS on or otherwise requires it)%s", r, event._item, ", ".join(event._dependees), r, extra)
                 else:
-                    logger.error("Nothing %sPROVIDES '%s'%s", r, event._item, extra)
+                    h("Nothing %sPROVIDES '%s'%s", r, event._item, extra)
                 if event._reasons:
                     for reason in event._reasons:
-                        logger.error("%s", reason)
+                        h("%s", reason)
                 continue
 
             if isinstance(event, bb.runqueue.sceneQueueTaskStarted):




                 reply	other threads:[~2016-01-31 13:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1454246592.27087.14.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=otavio@ossystems.com.br \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.