summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOla x Nilsson <ola.x.nilsson@axis.com>2018-04-23 09:49:49 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-04-23 11:15:06 +0100
commite2235b7567a9aba474cda4cdc20cc9bfffc63711 (patch)
tree6f2f3ea781ec722d516ddf1dc84baff20d72f2f9
parentb1783e423444e0432d2653fbd00c18d119d82647 (diff)
downloadopenembedded-core-e2235b7567a9aba474cda4cdc20cc9bfffc63711.tar.gz
openembedded-core-e2235b7567a9aba474cda4cdc20cc9bfffc63711.tar.bz2
openembedded-core-e2235b7567a9aba474cda4cdc20cc9bfffc63711.zip
package.bbclass: Make staticlib problems non-fatal
Allow debugsource listing using dwarfsourcefiles to fail for static libraries when the archive content is not as expected. Signed-off-by: Ola x Nilsson <olani@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--meta/classes/package.bbclass9
1 files changed, 6 insertions, 3 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index e03d4502c4..edeffa978f 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -344,12 +344,15 @@ def parse_debugsources_from_dwarfsrcfiles_output(dwarfsrcfiles_output):
return debugfiles.keys()
-def append_source_info(file, sourcefile, d):
+def append_source_info(file, sourcefile, d, fatal=True):
cmd = "'dwarfsrcfiles' '%s'" % (file)
(retval, output) = oe.utils.getstatusoutput(cmd)
# 255 means a specific file wasn't fully parsed to get the debug file list, which is not a fatal failure
if retval != 0 and retval != 255:
- bb.fatal("dwarfsrcfiles failed with exit code %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else ""))
+ msg = "dwarfsrcfiles failed with exit code %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else "")
+ if fatal:
+ bb.fatal(msg)
+ bb.note(msg)
debugsources = parse_debugsources_from_dwarfsrcfiles_output(output)
# filenames are null-separated - this is an artefact of the previous use
@@ -1052,7 +1055,7 @@ python split_and_strip_files () {
if debugsrcdir and not targetos.startswith("mingw"):
for file in staticlibs:
- append_source_info(file, sourcefile, d)
+ append_source_info(file, sourcefile, d, fatal=False)
# Hardlink our debug symbols to the other hardlink copies
for ref in inodes: