diff options
author | Ola x Nilsson <ola.x.nilsson@axis.com> | 2018-04-23 09:49:49 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-04-23 17:26:05 +0100 |
commit | df08ba32a6d61ef7d55a09892cf39a8ee8144eb6 (patch) | |
tree | 38f951265ba47d10c4a41821e841a552c275696f | |
parent | 00fe24fe8cbec81362e04c4c56ff4d33384cf72c (diff) | |
download | poky-df08ba32a6d61ef7d55a09892cf39a8ee8144eb6.tar.gz |
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.
(From OE-Core rev: e2235b7567a9aba474cda4cdc20cc9bfffc63711)
Signed-off-by: Ola x Nilsson <olani@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/package.bbclass | 9 |
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): | |||
344 | 344 | ||
345 | return debugfiles.keys() | 345 | return debugfiles.keys() |
346 | 346 | ||
347 | def append_source_info(file, sourcefile, d): | 347 | def append_source_info(file, sourcefile, d, fatal=True): |
348 | cmd = "'dwarfsrcfiles' '%s'" % (file) | 348 | cmd = "'dwarfsrcfiles' '%s'" % (file) |
349 | (retval, output) = oe.utils.getstatusoutput(cmd) | 349 | (retval, output) = oe.utils.getstatusoutput(cmd) |
350 | # 255 means a specific file wasn't fully parsed to get the debug file list, which is not a fatal failure | 350 | # 255 means a specific file wasn't fully parsed to get the debug file list, which is not a fatal failure |
351 | if retval != 0 and retval != 255: | 351 | if retval != 0 and retval != 255: |
352 | bb.fatal("dwarfsrcfiles failed with exit code %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else "")) | 352 | msg = "dwarfsrcfiles failed with exit code %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else "") |
353 | if fatal: | ||
354 | bb.fatal(msg) | ||
355 | bb.note(msg) | ||
353 | 356 | ||
354 | debugsources = parse_debugsources_from_dwarfsrcfiles_output(output) | 357 | debugsources = parse_debugsources_from_dwarfsrcfiles_output(output) |
355 | # filenames are null-separated - this is an artefact of the previous use | 358 | # filenames are null-separated - this is an artefact of the previous use |
@@ -1052,7 +1055,7 @@ python split_and_strip_files () { | |||
1052 | 1055 | ||
1053 | if debugsrcdir and not targetos.startswith("mingw"): | 1056 | if debugsrcdir and not targetos.startswith("mingw"): |
1054 | for file in staticlibs: | 1057 | for file in staticlibs: |
1055 | append_source_info(file, sourcefile, d) | 1058 | append_source_info(file, sourcefile, d, fatal=False) |
1056 | 1059 | ||
1057 | # Hardlink our debug symbols to the other hardlink copies | 1060 | # Hardlink our debug symbols to the other hardlink copies |
1058 | for ref in inodes: | 1061 | for ref in inodes: |