From 97a2e0ecc96602bba2594e0ed25066bd6f951c2b Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 14 May 2013 08:50:33 +0300 Subject: [PATCH] package.bbclass: Fix sources contents http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=c376f1f49cea182a2887945840ab97a20970a373 fixed a valid issue where the sources file was accumulating information and subsequent task runs of do_packacge were not cleaning it. The fix is wrong however since we're removing the file within a loop. This fix removes the file outside the loop ensuring it is not truncated and contains the correct information. (From OE-Core rev: a015881f2207aded601459ba3eebbefb0002b3c5) Signed-off-by: Richard Purdie --- meta/classes/package.bbclass | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 36b3ae5..0f2743d 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass @@ -226,7 +226,7 @@ python () { d.setVar("PACKAGERDEPTASK", "") } -def splitdebuginfo(file, debugfile, debugsrcdir, d): +def splitdebuginfo(file, debugfile, debugsrcdir, sourcefile, d): # Function to split a single file into two components, one is the stripped # target system binary, the other contains any debugging information. The # two files are linked to reference each other. @@ -240,9 +240,6 @@ def splitdebuginfo(file, debugfile, debugsrcdir, d): debugedit = d.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit") workdir = d.getVar("WORKDIR", True) workparentdir = d.getVar("DEBUGSRC_OVERRIDE_PATH", True) or os.path.dirname(os.path.dirname(workdir)) - sourcefile = d.expand("${WORKDIR}/debugsources.list") - - bb.utils.remove(sourcefile) # We ignore kernel modules, we don't generate debug info files. if file.find("/lib/modules/") != -1 and file.endswith(".ko"): @@ -721,6 +718,9 @@ python split_and_strip_files () { debuglibdir = "" debugsrcdir = "/usr/src/debug" + sourcefile = d.expand("${WORKDIR}/debugsources.list") + bb.utils.remove(sourcefile) + os.chdir(dvar) # Return type (bits): @@ -833,7 +833,7 @@ python split_and_strip_files () { bb.utils.mkdirhier(os.path.dirname(fpath)) #bb.note("Split %s -> %s" % (file, fpath)) # Only store off the hard link reference if we successfully split! - splitdebuginfo(file, fpath, debugsrcdir, d) + splitdebuginfo(file, fpath, debugsrcdir, sourcefile, d) # Hardlink our debug symbols to the other hardlink copies for file in hardlinks: -- 2.7.4