Patchwork [1/1,V2] package.bbclass: do not split debug pkg when no debugsources.list

login
register
mail settings
Submitter Robert Yang
Date March 14, 2012, 7:16 a.m.
Message ID <8cc6388313595c314347bf98254a4c2489be69e4.1331709176.git.liezhi.yang@windriver.com>
Download mbox | patch
Permalink /patch/23231/
State Accepted
Commit f88e3f420b4e95ab5ba4a075df8ed65b817f8b45
Headers show

Comments

Robert Yang - March 14, 2012, 7:16 a.m.
We don't have to split the debug pkg if it is null (No debugsources.list
since the find-debuginfo.sh would not generate it for the null pkg).

Serval pkg's debug pkg is null, and there were a few errors: (53 pkgs
had such errors in a core-image-sato build):

log.do_package:sort: open failed: debugsources.list: No such file or directory

[YOCTO #2076]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/classes/package.bbclass |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)
Richard Purdie - March 14, 2012, 1:29 p.m.
On Wed, 2012-03-14 at 15:16 +0800, Robert Yang wrote:
> We don't have to split the debug pkg if it is null (No debugsources.list
> since the find-debuginfo.sh would not generate it for the null pkg).
> 
> Serval pkg's debug pkg is null, and there were a few errors: (53 pkgs
> had such errors in a core-image-sato build):
> 
> log.do_package:sort: open failed: debugsources.list: No such file or directory
> 
> [YOCTO #2076]
> 
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
>  meta/classes/package.bbclass |   18 +++++++++---------
>  1 files changed, 9 insertions(+), 9 deletions(-)

Merged to master, thanks.

Richard

Patch

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 7bcfa02..bdc4d37 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -234,17 +234,17 @@  def splitfile2(debugsrcdir, d):
 
     import commands, stat
 
-    dvar = d.getVar('PKGD', True)
-    pathprefix = "export PATH=%s; " % d.getVar('PATH', True)
-    strip = d.getVar("STRIP", True)
-    objcopy = d.getVar("OBJCOPY", True)
-    debugedit = d.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit")
-    workdir = d.getVar("WORKDIR", True)
-    workparentdir = os.path.dirname(workdir)
-    workbasedir = os.path.basename(workdir)
     sourcefile = d.expand("${WORKDIR}/debugsources.list")
+    if debugsrcdir and os.path.isfile(sourcefile):
+       dvar = d.getVar('PKGD', True)
+       pathprefix = "export PATH=%s; " % d.getVar('PATH', True)
+       strip = d.getVar("STRIP", True)
+       objcopy = d.getVar("OBJCOPY", True)
+       debugedit = d.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit")
+       workdir = d.getVar("WORKDIR", True)
+       workparentdir = os.path.dirname(workdir)
+       workbasedir = os.path.basename(workdir)
 
-    if debugsrcdir:
        nosuchdir = []
        basepath = dvar
        for p in debugsrcdir.split("/"):