diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-05-14 08:50:33 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-05-14 08:52:47 +0300 |
commit | efb8a460d2a977dbd481a0650fba8eb637c65bec (patch) | |
tree | eb7409f5d9117fdcea00a29b96db5134d5b962ea /meta/classes | |
parent | a9f5bf0ed398bf9cb861feaa8b6fefd8645b1d09 (diff) | |
download | poky-efb8a460d2a977dbd481a0650fba8eb637c65bec.tar.gz |
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 <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | 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 36b3ae5109..0f2743d106 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
@@ -226,7 +226,7 @@ python () { | |||
226 | d.setVar("PACKAGERDEPTASK", "") | 226 | d.setVar("PACKAGERDEPTASK", "") |
227 | } | 227 | } |
228 | 228 | ||
229 | def splitdebuginfo(file, debugfile, debugsrcdir, d): | 229 | def splitdebuginfo(file, debugfile, debugsrcdir, sourcefile, d): |
230 | # Function to split a single file into two components, one is the stripped | 230 | # Function to split a single file into two components, one is the stripped |
231 | # target system binary, the other contains any debugging information. The | 231 | # target system binary, the other contains any debugging information. The |
232 | # two files are linked to reference each other. | 232 | # two files are linked to reference each other. |
@@ -240,9 +240,6 @@ def splitdebuginfo(file, debugfile, debugsrcdir, d): | |||
240 | debugedit = d.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit") | 240 | debugedit = d.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit") |
241 | workdir = d.getVar("WORKDIR", True) | 241 | workdir = d.getVar("WORKDIR", True) |
242 | workparentdir = d.getVar("DEBUGSRC_OVERRIDE_PATH", True) or os.path.dirname(os.path.dirname(workdir)) | 242 | workparentdir = d.getVar("DEBUGSRC_OVERRIDE_PATH", True) or os.path.dirname(os.path.dirname(workdir)) |
243 | sourcefile = d.expand("${WORKDIR}/debugsources.list") | ||
244 | |||
245 | bb.utils.remove(sourcefile) | ||
246 | 243 | ||
247 | # We ignore kernel modules, we don't generate debug info files. | 244 | # We ignore kernel modules, we don't generate debug info files. |
248 | if file.find("/lib/modules/") != -1 and file.endswith(".ko"): | 245 | if file.find("/lib/modules/") != -1 and file.endswith(".ko"): |
@@ -721,6 +718,9 @@ python split_and_strip_files () { | |||
721 | debuglibdir = "" | 718 | debuglibdir = "" |
722 | debugsrcdir = "/usr/src/debug" | 719 | debugsrcdir = "/usr/src/debug" |
723 | 720 | ||
721 | sourcefile = d.expand("${WORKDIR}/debugsources.list") | ||
722 | bb.utils.remove(sourcefile) | ||
723 | |||
724 | os.chdir(dvar) | 724 | os.chdir(dvar) |
725 | 725 | ||
726 | # Return type (bits): | 726 | # Return type (bits): |
@@ -833,7 +833,7 @@ python split_and_strip_files () { | |||
833 | bb.utils.mkdirhier(os.path.dirname(fpath)) | 833 | bb.utils.mkdirhier(os.path.dirname(fpath)) |
834 | #bb.note("Split %s -> %s" % (file, fpath)) | 834 | #bb.note("Split %s -> %s" % (file, fpath)) |
835 | # Only store off the hard link reference if we successfully split! | 835 | # Only store off the hard link reference if we successfully split! |
836 | splitdebuginfo(file, fpath, debugsrcdir, d) | 836 | splitdebuginfo(file, fpath, debugsrcdir, sourcefile, d) |
837 | 837 | ||
838 | # Hardlink our debug symbols to the other hardlink copies | 838 | # Hardlink our debug symbols to the other hardlink copies |
839 | for file in hardlinks: | 839 | for file in hardlinks: |