[oe-commits] Richard Purdie : package.bbclass: Fix sources contents
git at git.openembedded.org
git at git.openembedded.org
Wed May 22 16:08:56 UTC 2013
Module: openembedded-core.git
Branch: dylan
Commit: f897550222003ccea8f18c136a7b9ced5acb0ed3
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=f897550222003ccea8f18c136a7b9ced5acb0ed3
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date: Tue May 14 08:50:33 2013 +0300
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 at linuxfoundation.org>
---
meta/classes/package.bbclass | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 2bc31ee..affa34e 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:
More information about the Openembedded-commits
mailing list