summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/package.bbclass24
1 files changed, 13 insertions, 11 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 02914b52bb..03fe18de58 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -367,10 +367,12 @@ def append_source_info(file, sourcefile, d, fatal=True):
367 # of rpm's debugedit, which was writing them out that way, and the code elsewhere 367 # of rpm's debugedit, which was writing them out that way, and the code elsewhere
368 # is still assuming that. 368 # is still assuming that.
369 debuglistoutput = '\0'.join(debugsources) + '\0' 369 debuglistoutput = '\0'.join(debugsources) + '\0'
370 lf = bb.utils.lockfile(sourcefile + ".lock")
370 open(sourcefile, 'a').write(debuglistoutput) 371 open(sourcefile, 'a').write(debuglistoutput)
372 bb.utils.unlockfile(lf)
371 373
372 374
373def splitdebuginfo(file, debugfile, debugsrcdir, sourcefile, d): 375def splitdebuginfo(file, dvar, debugdir, debuglibdir, debugappend, debugsrcdir, sourcefile, d):
374 # Function to split a single file into two components, one is the stripped 376 # Function to split a single file into two components, one is the stripped
375 # target system binary, the other contains any debugging information. The 377 # target system binary, the other contains any debugging information. The
376 # two files are linked to reference each other. 378 # two files are linked to reference each other.
@@ -379,6 +381,15 @@ def splitdebuginfo(file, debugfile, debugsrcdir, sourcefile, d):
379 381
380 import stat 382 import stat
381 383
384 src = file[len(dvar):]
385 dest = debuglibdir + os.path.dirname(src) + debugdir + "/" + os.path.basename(src) + debugappend
386 debugfile = dvar + dest
387
388 # Split the file...
389 bb.utils.mkdirhier(os.path.dirname(debugfile))
390 #bb.note("Split %s -> %s" % (file, debugfile))
391 # Only store off the hard link reference if we successfully split!
392
382 dvar = d.getVar('PKGD') 393 dvar = d.getVar('PKGD')
383 objcopy = d.getVar("OBJCOPY") 394 objcopy = d.getVar("OBJCOPY")
384 395
@@ -1046,16 +1057,7 @@ python split_and_strip_files () {
1046 # First lets process debug splitting 1057 # First lets process debug splitting
1047 # 1058 #
1048 if (d.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT') != '1'): 1059 if (d.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT') != '1'):
1049 for file in elffiles: 1060 oe.utils.multiprocess_launch(splitdebuginfo, list(elffiles), d, extraargs=(dvar, debugdir, debuglibdir, debugappend, debugsrcdir, sourcefile, d))
1050 src = file[len(dvar):]
1051 dest = debuglibdir + os.path.dirname(src) + debugdir + "/" + os.path.basename(src) + debugappend
1052 fpath = dvar + dest
1053
1054 # Split the file...
1055 bb.utils.mkdirhier(os.path.dirname(fpath))
1056 #bb.note("Split %s -> %s" % (file, fpath))
1057 # Only store off the hard link reference if we successfully split!
1058 splitdebuginfo(file, fpath, debugsrcdir, sourcefile, d)
1059 1061
1060 if debugsrcdir and not targetos.startswith("mingw"): 1062 if debugsrcdir and not targetos.startswith("mingw"):
1061 for file in staticlibs: 1063 for file in staticlibs: