summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-14 08:50:33 +0300
committerPaul Eggleton <paul.eggleton@linux.intel.com>2013-05-20 16:06:27 +0100
commitf897550222003ccea8f18c136a7b9ced5acb0ed3 (patch)
tree10e5dc86d2b13e9c4a316c4bcbae00b0accf7dda
parentb47906121f4440e32f6efef04827f49be5ced657 (diff)
downloadopenembedded-core-f897550222003ccea8f18c136a7b9ced5acb0ed3.tar.gz
openembedded-core-f897550222003ccea8f18c136a7b9ced5acb0ed3.tar.bz2
openembedded-core-f897550222003ccea8f18c136a7b9ced5acb0ed3.zip
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 master rev: a015881f2207aded601459ba3eebbefb0002b3c5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/package.bbclass10
1 files changed, 5 insertions, 5 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 2bc31eefe2..affa34e808 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):
@@ -832,7 +832,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: