summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2012-09-23 18:05:35 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-09-24 12:13:52 +0100
commit683d3b9cfbbc5a93e9eb1423cfbdfe3538e26087 (patch)
treef4aca846d17bc074cf3243d6fe88a107c891a382
parent0bdde689f651a22a2ff925bcdd88755cde592b3d (diff)
downloadpoky-683d3b9cfbbc5a93e9eb1423cfbdfe3538e26087.tar.gz
poky-683d3b9cfbbc5a93e9eb1423cfbdfe3538e26087.tar.bz2
poky-683d3b9cfbbc5a93e9eb1423cfbdfe3538e26087.zip
bitbake: fetch2: make fetch failure errors more readable
Most of the time we don't need to see the fetch command; the fetch log includes the command as a debug message in any case, so omit it. Also adjust the way command output is printed (we don't need stderr/stdout labelled, and print "no output" instead of "output:\nNone" when there is no output. (Bitbake rev: a75505a52e4da918222100221f79e8a658f90446) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 37f7d7544e..1acb0a4f8c 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -471,7 +471,13 @@ def runfetchcmd(cmd, d, quiet = False, cleanup = []):
except bb.process.NotFoundError as e:
error_message = "Fetch command %s" % (e.command)
except bb.process.ExecutionError as e:
- error_message = "Fetch command %s failed with exit code %s, output:\nSTDOUT: %s\nSTDERR: %s" % (e.command, e.exitcode, e.stdout, e.stderr)
+ if e.stdout:
+ output = "output:\n%s\n%s" % (e.stdout, e.stderr)
+ elif e.stderr:
+ output = "output:\n%s" % e.stderr
+ else:
+ output = "no output"
+ error_message = "Fetch command failed with exit code %s, %s" % (e.exitcode, output)
except bb.process.CmdError as e:
error_message = "Fetch command %s could not be run:\n%s" % (e.command, e.msg)
if not success: