Patchwork [1/1] package.bbclass: create debugsources.list if it doesn't exist

login
register
mail settings
Submitter Robert Yang
Date March 13, 2012, 2:50 a.m.
Message ID <195b9ad9e78ea2355c0a5594436293e803bd460e.1331605922.git.liezhi.yang@windriver.com>
Download mbox | patch
Permalink /patch/23099/
State New
Headers show

Comments

Robert Yang - March 13, 2012, 2:50 a.m.
Serval pkg's debug pkg is null, so the find-debuginfo.sh would not
generate the ${WORKDIR}/debugsources.list, but the processdebugsrc
always need it, there are a few such errors currently:(53 pkgs have such
errors in a core-image-sato build):

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

Create debugsources.list if it doesn't exist would fix this problem.

[YOCTO #2076]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/classes/package.bbclass |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
Richard Purdie - March 13, 2012, 5:15 p.m.
On Tue, 2012-03-13 at 10:50 +0800, Robert Yang wrote:
> Serval pkg's debug pkg is null, so the find-debuginfo.sh would not
> generate the ${WORKDIR}/debugsources.list, but the processdebugsrc
> always need it, there are a few such errors currently:(53 pkgs have such
> errors in a core-image-sato build):
> 
> log.do_package:sort: open failed: debugsources.list: No such file or directory
> 
> Create debugsources.list if it doesn't exist would fix this problem.

Why can't we modify the code that uses debugsources.list not to get
upset if it doesn't exist?

This change seems a little backwards to me...

Cheers,

Richard

> [YOCTO #2076]
> 
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
>  meta/classes/package.bbclass |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
> index 9b6862d..8e76ef8 100644
> --- a/meta/classes/package.bbclass
> +++ b/meta/classes/package.bbclass
> @@ -243,6 +243,11 @@ def splitfile2(debugsrcdir, d):
>      workparentdir = os.path.dirname(workdir)
>      workbasedir = os.path.basename(workdir)
>      sourcefile = d.expand("${WORKDIR}/debugsources.list")
> +    # There is no debugsources.list when the debug pkg is null, but the
> +    # processdebugsrc needs it, so create one if it doesn't exist.
> +    if not os.path.isfile(sourcefile):
> +        f = open(sourcefile, 'w')
> +        f.close()
>  
>      if debugsrcdir:
>         nosuchdir = []
Robert Yang - March 14, 2012, 12:49 a.m.
On 03/14/2012 01:15 AM, Richard Purdie wrote:
> On Tue, 2012-03-13 at 10:50 +0800, Robert Yang wrote:
>> Serval pkg's debug pkg is null, so the find-debuginfo.sh would not
>> generate the ${WORKDIR}/debugsources.list, but the processdebugsrc
>> always need it, there are a few such errors currently:(53 pkgs have such
>> errors in a core-image-sato build):
>>
>> log.do_package:sort: open failed: debugsources.list: No such file or directory
>>
>> Create debugsources.list if it doesn't exist would fix this problem.
>
> Why can't we modify the code that uses debugsources.list not to get
> upset if it doesn't exist?
>

Sounds great! I will send an update patch sooner.

Will I reply the updated patch here or should I send a V2, please?
I don't know which is popular:-).

// Robert


> This change seems a little backwards to me...
>
> Cheers,
>
> Richard
>
>> [YOCTO #2076]
>>
>> Signed-off-by: Robert Yang<liezhi.yang@windriver.com>
>> ---
>>   meta/classes/package.bbclass |    5 +++++
>>   1 files changed, 5 insertions(+), 0 deletions(-)
>>
>> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
>> index 9b6862d..8e76ef8 100644
>> --- a/meta/classes/package.bbclass
>> +++ b/meta/classes/package.bbclass
>> @@ -243,6 +243,11 @@ def splitfile2(debugsrcdir, d):
>>       workparentdir = os.path.dirname(workdir)
>>       workbasedir = os.path.basename(workdir)
>>       sourcefile = d.expand("${WORKDIR}/debugsources.list")
>> +    # There is no debugsources.list when the debug pkg is null, but the
>> +    # processdebugsrc needs it, so create one if it doesn't exist.
>> +    if not os.path.isfile(sourcefile):
>> +        f = open(sourcefile, 'w')
>> +        f.close()
>>
>>       if debugsrcdir:
>>          nosuchdir = []
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>

Patch

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 9b6862d..8e76ef8 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -243,6 +243,11 @@  def splitfile2(debugsrcdir, d):
     workparentdir = os.path.dirname(workdir)
     workbasedir = os.path.basename(workdir)
     sourcefile = d.expand("${WORKDIR}/debugsources.list")
+    # There is no debugsources.list when the debug pkg is null, but the
+    # processdebugsrc needs it, so create one if it doesn't exist.
+    if not os.path.isfile(sourcefile):
+        f = open(sourcefile, 'w')
+        f.close()
 
     if debugsrcdir:
        nosuchdir = []