* [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages @ 2018-05-17 5:50 Vignesh Rajendran 2018-05-17 5:55 ` Vignesh Rajendran (RBEI/ECF3) 2018-05-20 22:26 ` Paul Eggleton 0 siblings, 2 replies; 16+ messages in thread From: Vignesh Rajendran @ 2018-05-17 5:50 UTC (permalink / raw) To: openembedded-core The recipes which are using externalsrc method doesn't contain the debug sources in their -dbg packages. Add a handling in copydebugsources function to copy the debugsources for externalsrc -dbg packages. Signed-off-by: Vignesh Rajendran <vignesh.rajendran@in.bosch.com> --- meta/classes/externalsrc.bbclass | 3 +++ meta/classes/package.bbclass | 12 ++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass index c9f5cf7..135670d 100644 --- a/meta/classes/externalsrc.bbclass +++ b/meta/classes/externalsrc.bbclass @@ -129,6 +129,9 @@ python () { d.setVar('CONFIGURESTAMPFILE', configstamp) d.setVar('STAMP', '${STAMPS_DIR}/work-shared/${PN}/${EXTENDPE}${PV}-${PR}') d.setVar('STAMPCLEAN', '${STAMPS_DIR}/work-shared/${PN}/*-*') + + # set DEBUG_PREFIX_MAP to external source path + d.appendVar("DEBUG_PREFIX_MAP", "-fdebug-prefix-map=${EXTERNALSRC}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}") } python externalsrc_configure_prefunc() { diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index edeffa9..f071a2e 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass @@ -420,6 +420,7 @@ def copydebugsources(debugsrcdir, d): workdir = d.getVar("WORKDIR") workparentdir = os.path.dirname(os.path.dirname(workdir)) workbasedir = os.path.basename(os.path.dirname(workdir)) + "/" + os.path.basename(workdir) + externalsrc = d.getVar('EXTERNALSRC', True) # If build path exists in sourcefile, it means toolchain did not use # -fdebug-prefix-map to compile @@ -444,9 +445,16 @@ def copydebugsources(debugsrcdir, d): processdebugsrc += "fgrep -zw '%s' | " # Remove prefix in the source paths processdebugsrc += "sed 's#%s##g' | " - processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s' 2>/dev/null)" + # handle external sources to provide sources in -dbg packages + if externalsrc: + localsrc_prefix = "/usr/src/debug/" + processdebugsrc += "sed 's#%s/##g' | " + processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s/%s' 2>/dev/null)" + cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workbasedir, externalsrc, dvar, debugsrcdir, workbasedir) + else: + processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s' 2>/dev/null)" + cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workparentdir, dvar, debugsrcdir) - cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workparentdir, dvar, debugsrcdir) (retval, output) = oe.utils.getstatusoutput(cmd) # Can "fail" if internal headers/transient sources are attempted #if retval: -- 2.7.4 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages 2018-05-17 5:50 [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages Vignesh Rajendran @ 2018-05-17 5:55 ` Vignesh Rajendran (RBEI/ECF3) 2018-05-20 22:26 ` Paul Eggleton 1 sibling, 0 replies; 16+ messages in thread From: Vignesh Rajendran (RBEI/ECF3) @ 2018-05-17 5:55 UTC (permalink / raw) To: openembedded-core [-- Attachment #1: Type: text/plain, Size: 4345 bytes --] Hi OE-Core members, As per the wiki notes, This is a reminder and re-submission again the same patch posted some weeks before. https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded If your patch has not had any feedback after a few days it may have been missed or the appropriate reviewers may not currently be around; it is perfectly fine to reply to it yourself with a "ping" / reminder request for feedback. NOTE: patch review for feature / recipe upgrade patches will likely be delayed during a feature freeze because these types of patches aren't merged during this time - you may have to wait until after the freeze is lifted. I have noted that the patch not available in master and may have been missed. Mit freundlichen Grüßen / Best regards Rajendran Vignesh RBEI/ECF33 Tel. +91 422 67-65103 -----Original Message----- From: Vignesh Rajendran (RBEI/ECF3) Sent: Thursday, May 17, 2018 11:20 AM To: openembedded-core@lists.openembedded.org Cc: Vignesh Rajendran (RBEI/ECF3) <Vignesh.Rajendran@in.bosch.com> Subject: [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages The recipes which are using externalsrc method doesn't contain the debug sources in their -dbg packages. Add a handling in copydebugsources function to copy the debugsources for externalsrc -dbg packages. Signed-off-by: Vignesh Rajendran <vignesh.rajendran@in.bosch.com<mailto:vignesh.rajendran@in.bosch.com>> --- meta/classes/externalsrc.bbclass | 3 +++ meta/classes/package.bbclass | 12 ++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass index c9f5cf7..135670d 100644 --- a/meta/classes/externalsrc.bbclass +++ b/meta/classes/externalsrc.bbclass @@ -129,6 +129,9 @@ python () { d.setVar('CONFIGURESTAMPFILE', configstamp) d.setVar('STAMP', '${STAMPS_DIR}/work-shared/${PN}/${EXTENDPE}${PV}-${PR}') d.setVar('STAMPCLEAN', '${STAMPS_DIR}/work-shared/${PN}/*-*') + + # set DEBUG_PREFIX_MAP to external source path + d.appendVar("DEBUG_PREFIX_MAP", "-fdebug-prefix-map=${EXTERNALSRC}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}") } python externalsrc_configure_prefunc() { diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index edeffa9..f071a2e 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass @@ -420,6 +420,7 @@ def copydebugsources(debugsrcdir, d): workdir = d.getVar("WORKDIR") workparentdir = os.path.dirname(os.path.dirname(workdir)) workbasedir = os.path.basename(os.path.dirname(workdir)) + "/" + os.path.basename(workdir) + externalsrc = d.getVar('EXTERNALSRC', True) # If build path exists in sourcefile, it means toolchain did not use # -fdebug-prefix-map to compile @@ -444,9 +445,16 @@ def copydebugsources(debugsrcdir, d): processdebugsrc += "fgrep -zw '%s' | " # Remove prefix in the source paths processdebugsrc += "sed 's#%s##g' | " - processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s' 2>/dev/null)" + # handle external sources to provide sources in -dbg packages + if externalsrc: + localsrc_prefix = "/usr/src/debug/" + processdebugsrc += "sed 's#%s/##g' | " + processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s/%s' 2>/dev/null)" + cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workbasedir, externalsrc, dvar, debugsrcdir, workbasedir) + else: + processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s' 2>/dev/null)" + cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workparentdir, dvar, debugsrcdir) - cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workparentdir, dvar, debugsrcdir) (retval, output) = oe.utils.getstatusoutput(cmd) # Can "fail" if internal headers/transient sources are attempted #if retval: -- 2.7.4 [-- Attachment #2: Type: text/html, Size: 11291 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages 2018-05-17 5:50 [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages Vignesh Rajendran 2018-05-17 5:55 ` Vignesh Rajendran (RBEI/ECF3) @ 2018-05-20 22:26 ` Paul Eggleton 2018-05-21 4:50 ` Vignesh Rajendran (RBEI/ECF3) ` (2 more replies) 1 sibling, 3 replies; 16+ messages in thread From: Paul Eggleton @ 2018-05-20 22:26 UTC (permalink / raw) To: Vignesh Rajendran; +Cc: openembedded-core Hi Vignesh, Thanks for the patch, a question below. On Thursday, 17 May 2018 5:50:00 PM NZST Vignesh Rajendran wrote: > The recipes which are using externalsrc method doesn't contain the > debug sources in their -dbg packages. > > Add a handling in copydebugsources function to copy the debugsources for > externalsrc -dbg packages. > > Signed-off-by: Vignesh Rajendran <vignesh.rajendran@in.bosch.com> > --- > meta/classes/externalsrc.bbclass | 3 +++ > meta/classes/package.bbclass | 12 ++++++++++-- > 2 files changed, 13 insertions(+), 2 deletions(-) > > diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass > index c9f5cf7..135670d 100644 > --- a/meta/classes/externalsrc.bbclass > +++ b/meta/classes/externalsrc.bbclass > @@ -129,6 +129,9 @@ python () { > d.setVar('CONFIGURESTAMPFILE', configstamp) > d.setVar('STAMP', '${STAMPS_DIR}/work-shared/${PN}/${EXTENDPE}${PV}-${PR}') > d.setVar('STAMPCLEAN', '${STAMPS_DIR}/work-shared/${PN}/*-*') > + > + # set DEBUG_PREFIX_MAP to external source path > + d.appendVar("DEBUG_PREFIX_MAP", "-fdebug-prefix-map=${EXTERNALSRC}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}") > } > > python externalsrc_configure_prefunc() { > diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass > index edeffa9..f071a2e 100644 > --- a/meta/classes/package.bbclass > +++ b/meta/classes/package.bbclass > @@ -420,6 +420,7 @@ def copydebugsources(debugsrcdir, d): > workdir = d.getVar("WORKDIR") > workparentdir = os.path.dirname(os.path.dirname(workdir)) > workbasedir = os.path.basename(os.path.dirname(workdir)) + "/" + os.path.basename(workdir) > + externalsrc = d.getVar('EXTERNALSRC', True) > > # If build path exists in sourcefile, it means toolchain did not use > # -fdebug-prefix-map to compile > @@ -444,9 +445,16 @@ def copydebugsources(debugsrcdir, d): > processdebugsrc += "fgrep -zw '%s' | " > # Remove prefix in the source paths > processdebugsrc += "sed 's#%s##g' | " > - processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s' 2>/dev/null)" > + # handle external sources to provide sources in -dbg packages > + if externalsrc: > + localsrc_prefix = "/usr/src/debug/" > + processdebugsrc += "sed 's#%s/##g' | " > + processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s/%s' 2>/dev/null)" > + cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workbasedir, externalsrc, dvar, debugsrcdir, workbasedir) > + else: > + processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s' 2>/dev/null)" > + cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workparentdir, dvar, debugsrcdir) > > - cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workparentdir, dvar, debugsrcdir) > (retval, output) = oe.utils.getstatusoutput(cmd) > # Can "fail" if internal headers/transient sources are attempted > #if retval: > Is there a way we can fix this without adding a reference to externalsrc in package.bbclass? Cheers, Paul -- Paul Eggleton Intel Open Source Technology Centre ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages 2018-05-20 22:26 ` Paul Eggleton @ 2018-05-21 4:50 ` Vignesh Rajendran (RBEI/ECF3) 2018-06-18 6:38 ` Vignesh Rajendran (RBEI/ECF3) 2018-06-18 17:43 ` Khem Raj 2 siblings, 0 replies; 16+ messages in thread From: Vignesh Rajendran (RBEI/ECF3) @ 2018-05-21 4:50 UTC (permalink / raw) To: Paul Eggleton Cc: Ramadevi Sennakesavan (RBEI/ECF3), Thangaraj Sathish (RBEI/ECF3), Avanashilingam Gokulnath (RBEI/ECF3), openembedded-core Hello Paul, >> Is there a way we can fix this without adding a reference to externalsrc in >> package.bbclass? From my knowledge, No. Because the path of source location in debug binaries is pointed to the external path. copydebugsources was the only option in my point of view to copy the sources from external path. Do you find/foresee any issues regarding that change in package.bbclass? Mit freundlichen Grüßen / Best regards Rajendran Vignesh RBEI/ECF33 Tel. +91 422 67-65103 -----Original Message----- From: Paul Eggleton [mailto:paul.eggleton@linux.intel.com] Sent: Monday, May 21, 2018 3:56 AM To: Vignesh Rajendran (RBEI/ECF3) <Vignesh.Rajendran@in.bosch.com> Cc: openembedded-core@lists.openembedded.org Subject: Re: [OE-core] [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages Hi Vignesh, Thanks for the patch, a question below. On Thursday, 17 May 2018 5:50:00 PM NZST Vignesh Rajendran wrote: > The recipes which are using externalsrc method doesn't contain the > debug sources in their -dbg packages. > > Add a handling in copydebugsources function to copy the debugsources for > externalsrc -dbg packages. > > Signed-off-by: Vignesh Rajendran <vignesh.rajendran@in.bosch.com> > --- > meta/classes/externalsrc.bbclass | 3 +++ > meta/classes/package.bbclass | 12 ++++++++++-- > 2 files changed, 13 insertions(+), 2 deletions(-) > > diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass > index c9f5cf7..135670d 100644 > --- a/meta/classes/externalsrc.bbclass > +++ b/meta/classes/externalsrc.bbclass > @@ -129,6 +129,9 @@ python () { > d.setVar('CONFIGURESTAMPFILE', configstamp) > d.setVar('STAMP', '${STAMPS_DIR}/work-shared/${PN}/${EXTENDPE}${PV}-${PR}') > d.setVar('STAMPCLEAN', '${STAMPS_DIR}/work-shared/${PN}/*-*') > + > + # set DEBUG_PREFIX_MAP to external source path > + d.appendVar("DEBUG_PREFIX_MAP", "-fdebug-prefix-map=${EXTERNALSRC}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}") > } > > python externalsrc_configure_prefunc() { > diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass > index edeffa9..f071a2e 100644 > --- a/meta/classes/package.bbclass > +++ b/meta/classes/package.bbclass > @@ -420,6 +420,7 @@ def copydebugsources(debugsrcdir, d): > workdir = d.getVar("WORKDIR") > workparentdir = os.path.dirname(os.path.dirname(workdir)) > workbasedir = os.path.basename(os.path.dirname(workdir)) + "/" + os.path.basename(workdir) > + externalsrc = d.getVar('EXTERNALSRC', True) > > # If build path exists in sourcefile, it means toolchain did not use > # -fdebug-prefix-map to compile > @@ -444,9 +445,16 @@ def copydebugsources(debugsrcdir, d): > processdebugsrc += "fgrep -zw '%s' | " > # Remove prefix in the source paths > processdebugsrc += "sed 's#%s##g' | " > - processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s' 2>/dev/null)" > + # handle external sources to provide sources in -dbg packages > + if externalsrc: > + localsrc_prefix = "/usr/src/debug/" > + processdebugsrc += "sed 's#%s/##g' | " > + processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s/%s' 2>/dev/null)" > + cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workbasedir, externalsrc, dvar, debugsrcdir, workbasedir) > + else: > + processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s' 2>/dev/null)" > + cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workparentdir, dvar, debugsrcdir) > > - cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workparentdir, dvar, debugsrcdir) > (retval, output) = oe.utils.getstatusoutput(cmd) > # Can "fail" if internal headers/transient sources are attempted > #if retval: > Is there a way we can fix this without adding a reference to externalsrc in package.bbclass? Cheers, Paul -- Paul Eggleton Intel Open Source Technology Centre ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages 2018-05-20 22:26 ` Paul Eggleton 2018-05-21 4:50 ` Vignesh Rajendran (RBEI/ECF3) @ 2018-06-18 6:38 ` Vignesh Rajendran (RBEI/ECF3) 2018-06-18 17:43 ` Khem Raj 2 siblings, 0 replies; 16+ messages in thread From: Vignesh Rajendran (RBEI/ECF3) @ 2018-06-18 6:38 UTC (permalink / raw) To: Paul Eggleton, openembedded-core Hello Openembedded-Core maintainers, Since the commit from myself has its age more than a month at patchwork.openembedded.org, it is not arrived to master/next branch. https://patchwork.openembedded.org/series/12005/# I could see some latest commits after mine just before few days are available at master branch. Can you please let me know if anything went wrong from my end? Mit freundlichen Grüßen / Best regards Rajendran Vignesh RBEI/ECF33 Tel. +91 422 67-65103 -----Original Message----- From: Vignesh Rajendran (RBEI/ECF3) Sent: Monday, May 21, 2018 10:21 AM To: 'Paul Eggleton' <paul.eggleton@linux.intel.com> Cc: openembedded-core@lists.openembedded.org; Avanashilingam Gokulnath (RBEI/ECF3) <Gokulnath.Avanashilingam@in.bosch.com>; Thangaraj Sathish (RBEI/ECF3) <Sathish.Thangaraj@in.bosch.com>; Ramadevi Sennakeseavan <ramadevi.sennakesavan@in.bosch.com> Subject: RE: [OE-core] [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages Hello Paul, >> Is there a way we can fix this without adding a reference to externalsrc in >> package.bbclass? From my knowledge, No. Because the path of source location in debug binaries is pointed to the external path. copydebugsources was the only option in my point of view to copy the sources from external path. Do you find/foresee any issues regarding that change in package.bbclass? Mit freundlichen Grüßen / Best regards Rajendran Vignesh RBEI/ECF33 Tel. +91 422 67-65103 -----Original Message----- From: Paul Eggleton [mailto:paul.eggleton@linux.intel.com] Sent: Monday, May 21, 2018 3:56 AM To: Vignesh Rajendran (RBEI/ECF3) <Vignesh.Rajendran@in.bosch.com> Cc: openembedded-core@lists.openembedded.org Subject: Re: [OE-core] [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages Hi Vignesh, Thanks for the patch, a question below. On Thursday, 17 May 2018 5:50:00 PM NZST Vignesh Rajendran wrote: > The recipes which are using externalsrc method doesn't contain the > debug sources in their -dbg packages. > > Add a handling in copydebugsources function to copy the debugsources for > externalsrc -dbg packages. > > Signed-off-by: Vignesh Rajendran <vignesh.rajendran@in.bosch.com> > --- > meta/classes/externalsrc.bbclass | 3 +++ > meta/classes/package.bbclass | 12 ++++++++++-- > 2 files changed, 13 insertions(+), 2 deletions(-) > > diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass > index c9f5cf7..135670d 100644 > --- a/meta/classes/externalsrc.bbclass > +++ b/meta/classes/externalsrc.bbclass > @@ -129,6 +129,9 @@ python () { > d.setVar('CONFIGURESTAMPFILE', configstamp) > d.setVar('STAMP', '${STAMPS_DIR}/work-shared/${PN}/${EXTENDPE}${PV}-${PR}') > d.setVar('STAMPCLEAN', '${STAMPS_DIR}/work-shared/${PN}/*-*') > + > + # set DEBUG_PREFIX_MAP to external source path > + d.appendVar("DEBUG_PREFIX_MAP", "-fdebug-prefix-map=${EXTERNALSRC}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}") > } > > python externalsrc_configure_prefunc() { > diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass > index edeffa9..f071a2e 100644 > --- a/meta/classes/package.bbclass > +++ b/meta/classes/package.bbclass > @@ -420,6 +420,7 @@ def copydebugsources(debugsrcdir, d): > workdir = d.getVar("WORKDIR") > workparentdir = os.path.dirname(os.path.dirname(workdir)) > workbasedir = os.path.basename(os.path.dirname(workdir)) + "/" + os.path.basename(workdir) > + externalsrc = d.getVar('EXTERNALSRC', True) > > # If build path exists in sourcefile, it means toolchain did not use > # -fdebug-prefix-map to compile > @@ -444,9 +445,16 @@ def copydebugsources(debugsrcdir, d): > processdebugsrc += "fgrep -zw '%s' | " > # Remove prefix in the source paths > processdebugsrc += "sed 's#%s##g' | " > - processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s' 2>/dev/null)" > + # handle external sources to provide sources in -dbg packages > + if externalsrc: > + localsrc_prefix = "/usr/src/debug/" > + processdebugsrc += "sed 's#%s/##g' | " > + processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s/%s' 2>/dev/null)" > + cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workbasedir, externalsrc, dvar, debugsrcdir, workbasedir) > + else: > + processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s' 2>/dev/null)" > + cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workparentdir, dvar, debugsrcdir) > > - cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workparentdir, dvar, debugsrcdir) > (retval, output) = oe.utils.getstatusoutput(cmd) > # Can "fail" if internal headers/transient sources are attempted > #if retval: > Is there a way we can fix this without adding a reference to externalsrc in package.bbclass? Cheers, Paul -- Paul Eggleton Intel Open Source Technology Centre ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages 2018-05-20 22:26 ` Paul Eggleton 2018-05-21 4:50 ` Vignesh Rajendran (RBEI/ECF3) 2018-06-18 6:38 ` Vignesh Rajendran (RBEI/ECF3) @ 2018-06-18 17:43 ` Khem Raj 2018-06-19 4:54 ` Vignesh Rajendran (RBEI/ECF3) 2018-07-06 4:29 ` Vignesh Rajendran (RBEI/ECF3) 2 siblings, 2 replies; 16+ messages in thread From: Khem Raj @ 2018-06-18 17:43 UTC (permalink / raw) To: Paul Eggleton; +Cc: Patches and discussions about the oe-core layer On Sun, May 20, 2018 at 3:26 PM Paul Eggleton <paul.eggleton@linux.intel.com> wrote: > > Hi Vignesh, > > Thanks for the patch, a question below. > > On Thursday, 17 May 2018 5:50:00 PM NZST Vignesh Rajendran wrote: > > The recipes which are using externalsrc method doesn't contain the > > debug sources in their -dbg packages. > > > > Add a handling in copydebugsources function to copy the debugsources for > > externalsrc -dbg packages. > > > > Signed-off-by: Vignesh Rajendran <vignesh.rajendran@in.bosch.com> > > --- > > meta/classes/externalsrc.bbclass | 3 +++ > > meta/classes/package.bbclass | 12 ++++++++++-- > > 2 files changed, 13 insertions(+), 2 deletions(-) > > > > diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass > > index c9f5cf7..135670d 100644 > > --- a/meta/classes/externalsrc.bbclass > > +++ b/meta/classes/externalsrc.bbclass > > @@ -129,6 +129,9 @@ python () { > > d.setVar('CONFIGURESTAMPFILE', configstamp) > > d.setVar('STAMP', '${STAMPS_DIR}/work-shared/${PN}/${EXTENDPE}${PV}-${PR}') > > d.setVar('STAMPCLEAN', '${STAMPS_DIR}/work-shared/${PN}/*-*') > > + > > + # set DEBUG_PREFIX_MAP to external source path > > + d.appendVar("DEBUG_PREFIX_MAP", "-fdebug-prefix-map=${EXTERNALSRC}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}") > > } > > > > python externalsrc_configure_prefunc() { > > diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass > > index edeffa9..f071a2e 100644 > > --- a/meta/classes/package.bbclass > > +++ b/meta/classes/package.bbclass > > @@ -420,6 +420,7 @@ def copydebugsources(debugsrcdir, d): > > workdir = d.getVar("WORKDIR") > > workparentdir = os.path.dirname(os.path.dirname(workdir)) > > workbasedir = os.path.basename(os.path.dirname(workdir)) + "/" + os.path.basename(workdir) > > + externalsrc = d.getVar('EXTERNALSRC', True) > > > > # If build path exists in sourcefile, it means toolchain did not use > > # -fdebug-prefix-map to compile > > @@ -444,9 +445,16 @@ def copydebugsources(debugsrcdir, d): > > processdebugsrc += "fgrep -zw '%s' | " > > # Remove prefix in the source paths > > processdebugsrc += "sed 's#%s##g' | " > > - processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s' 2>/dev/null)" > > + # handle external sources to provide sources in -dbg packages > > + if externalsrc: > > + localsrc_prefix = "/usr/src/debug/" > > + processdebugsrc += "sed 's#%s/##g' | " > > + processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s/%s' 2>/dev/null)" > > + cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workbasedir, externalsrc, dvar, debugsrcdir, workbasedir) > > + else: > > + processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s' 2>/dev/null)" > > + cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workparentdir, dvar, debugsrcdir) > > > > - cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workparentdir, dvar, debugsrcdir) > > (retval, output) = oe.utils.getstatusoutput(cmd) > > # Can "fail" if internal headers/transient sources are attempted > > #if retval: > > > > Is there a way we can fix this without adding a reference to externalsrc in > package.bbclass? > perhaps setting DEBUG_PREFIX_MAP relative to S instead of WORKDIR is going to take care of this > Cheers, > Paul > > -- > > Paul Eggleton > Intel Open Source Technology Centre > > > -- > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.openembedded.org/mailman/listinfo/openembedded-core ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages 2018-06-18 17:43 ` Khem Raj @ 2018-06-19 4:54 ` Vignesh Rajendran (RBEI/ECF3) 2018-07-06 4:29 ` Vignesh Rajendran (RBEI/ECF3) 1 sibling, 0 replies; 16+ messages in thread From: Vignesh Rajendran (RBEI/ECF3) @ 2018-06-19 4:54 UTC (permalink / raw) To: Khem Raj, Paul Eggleton; +Cc: Patches and discussions about the oe-core layer Hello Khem, >> perhaps setting DEBUG_PREFIX_MAP relative to S instead of WORKDIR is >> going to take care of this Do you mean to change it at bitbake.conf ? Mit freundlichen Grüßen / Best regards Rajendran Vignesh RBEI/ECF33 Tel. +91 422 67-65103 -----Original Message----- From: Khem Raj [mailto:raj.khem@gmail.com] Sent: Monday, June 18, 2018 11:13 PM To: Paul Eggleton <paul.eggleton@linux.intel.com> Cc: Vignesh Rajendran (RBEI/ECF3) <Vignesh.Rajendran@in.bosch.com>; Patches and discussions about the oe-core layer <openembedded-core@lists.openembedded.org> Subject: Re: [OE-core] [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages On Sun, May 20, 2018 at 3:26 PM Paul Eggleton <paul.eggleton@linux.intel.com> wrote: > > Hi Vignesh, > > Thanks for the patch, a question below. > > On Thursday, 17 May 2018 5:50:00 PM NZST Vignesh Rajendran wrote: > > The recipes which are using externalsrc method doesn't contain the > > debug sources in their -dbg packages. > > > > Add a handling in copydebugsources function to copy the debugsources for > > externalsrc -dbg packages. > > > > Signed-off-by: Vignesh Rajendran <vignesh.rajendran@in.bosch.com> > > --- > > meta/classes/externalsrc.bbclass | 3 +++ > > meta/classes/package.bbclass | 12 ++++++++++-- > > 2 files changed, 13 insertions(+), 2 deletions(-) > > > > diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass > > index c9f5cf7..135670d 100644 > > --- a/meta/classes/externalsrc.bbclass > > +++ b/meta/classes/externalsrc.bbclass > > @@ -129,6 +129,9 @@ python () { > > d.setVar('CONFIGURESTAMPFILE', configstamp) > > d.setVar('STAMP', '${STAMPS_DIR}/work-shared/${PN}/${EXTENDPE}${PV}-${PR}') > > d.setVar('STAMPCLEAN', '${STAMPS_DIR}/work-shared/${PN}/*-*') > > + > > + # set DEBUG_PREFIX_MAP to external source path > > + d.appendVar("DEBUG_PREFIX_MAP", "-fdebug-prefix-map=${EXTERNALSRC}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}") > > } > > > > python externalsrc_configure_prefunc() { > > diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass > > index edeffa9..f071a2e 100644 > > --- a/meta/classes/package.bbclass > > +++ b/meta/classes/package.bbclass > > @@ -420,6 +420,7 @@ def copydebugsources(debugsrcdir, d): > > workdir = d.getVar("WORKDIR") > > workparentdir = os.path.dirname(os.path.dirname(workdir)) > > workbasedir = os.path.basename(os.path.dirname(workdir)) + "/" + os.path.basename(workdir) > > + externalsrc = d.getVar('EXTERNALSRC', True) > > > > # If build path exists in sourcefile, it means toolchain did not use > > # -fdebug-prefix-map to compile > > @@ -444,9 +445,16 @@ def copydebugsources(debugsrcdir, d): > > processdebugsrc += "fgrep -zw '%s' | " > > # Remove prefix in the source paths > > processdebugsrc += "sed 's#%s##g' | " > > - processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s' 2>/dev/null)" > > + # handle external sources to provide sources in -dbg packages > > + if externalsrc: > > + localsrc_prefix = "/usr/src/debug/" > > + processdebugsrc += "sed 's#%s/##g' | " > > + processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s/%s' 2>/dev/null)" > > + cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workbasedir, externalsrc, dvar, debugsrcdir, workbasedir) > > + else: > > + processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s' 2>/dev/null)" > > + cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workparentdir, dvar, debugsrcdir) > > > > - cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workparentdir, dvar, debugsrcdir) > > (retval, output) = oe.utils.getstatusoutput(cmd) > > # Can "fail" if internal headers/transient sources are attempted > > #if retval: > > > > Is there a way we can fix this without adding a reference to externalsrc in > package.bbclass? > perhaps setting DEBUG_PREFIX_MAP relative to S instead of WORKDIR is going to take care of this > Cheers, > Paul > > -- > > Paul Eggleton > Intel Open Source Technology Centre > > > -- > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.openembedded.org/mailman/listinfo/openembedded-core ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages 2018-06-18 17:43 ` Khem Raj 2018-06-19 4:54 ` Vignesh Rajendran (RBEI/ECF3) @ 2018-07-06 4:29 ` Vignesh Rajendran (RBEI/ECF3) 2018-07-06 4:50 ` Khem Raj 1 sibling, 1 reply; 16+ messages in thread From: Vignesh Rajendran (RBEI/ECF3) @ 2018-07-06 4:29 UTC (permalink / raw) To: Khem Raj, Paul Eggleton; +Cc: Patches and discussions about the oe-core layer Hello Khem, Can you clarify your idea and my question? Mit freundlichen Grüßen / Best regards Rajendran Vignesh RBEI/ECF33 Tel. +91 422 67-65103 -----Original Message----- From: Vignesh Rajendran (RBEI/ECF3) Sent: Tuesday, June 19, 2018 10:24 AM To: 'Khem Raj' <raj.khem@gmail.com>; Paul Eggleton <paul.eggleton@linux.intel.com> Cc: Patches and discussions about the oe-core layer <openembedded-core@lists.openembedded.org> Subject: RE: [OE-core] [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages Hello Khem, >> perhaps setting DEBUG_PREFIX_MAP relative to S instead of WORKDIR is >> going to take care of this Do you mean to change it at bitbake.conf ? Mit freundlichen Grüßen / Best regards Rajendran Vignesh RBEI/ECF33 Tel. +91 422 67-65103 -----Original Message----- From: Khem Raj [mailto:raj.khem@gmail.com] Sent: Monday, June 18, 2018 11:13 PM To: Paul Eggleton <paul.eggleton@linux.intel.com> Cc: Vignesh Rajendran (RBEI/ECF3) <Vignesh.Rajendran@in.bosch.com>; Patches and discussions about the oe-core layer <openembedded-core@lists.openembedded.org> Subject: Re: [OE-core] [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages On Sun, May 20, 2018 at 3:26 PM Paul Eggleton <paul.eggleton@linux.intel.com> wrote: > > Hi Vignesh, > > Thanks for the patch, a question below. > > On Thursday, 17 May 2018 5:50:00 PM NZST Vignesh Rajendran wrote: > > The recipes which are using externalsrc method doesn't contain the > > debug sources in their -dbg packages. > > > > Add a handling in copydebugsources function to copy the debugsources for > > externalsrc -dbg packages. > > > > Signed-off-by: Vignesh Rajendran <vignesh.rajendran@in.bosch.com> > > --- > > meta/classes/externalsrc.bbclass | 3 +++ > > meta/classes/package.bbclass | 12 ++++++++++-- > > 2 files changed, 13 insertions(+), 2 deletions(-) > > > > diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass > > index c9f5cf7..135670d 100644 > > --- a/meta/classes/externalsrc.bbclass > > +++ b/meta/classes/externalsrc.bbclass > > @@ -129,6 +129,9 @@ python () { > > d.setVar('CONFIGURESTAMPFILE', configstamp) > > d.setVar('STAMP', '${STAMPS_DIR}/work-shared/${PN}/${EXTENDPE}${PV}-${PR}') > > d.setVar('STAMPCLEAN', '${STAMPS_DIR}/work-shared/${PN}/*-*') > > + > > + # set DEBUG_PREFIX_MAP to external source path > > + d.appendVar("DEBUG_PREFIX_MAP", "-fdebug-prefix-map=${EXTERNALSRC}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}") > > } > > > > python externalsrc_configure_prefunc() { > > diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass > > index edeffa9..f071a2e 100644 > > --- a/meta/classes/package.bbclass > > +++ b/meta/classes/package.bbclass > > @@ -420,6 +420,7 @@ def copydebugsources(debugsrcdir, d): > > workdir = d.getVar("WORKDIR") > > workparentdir = os.path.dirname(os.path.dirname(workdir)) > > workbasedir = os.path.basename(os.path.dirname(workdir)) + "/" + os.path.basename(workdir) > > + externalsrc = d.getVar('EXTERNALSRC', True) > > > > # If build path exists in sourcefile, it means toolchain did not use > > # -fdebug-prefix-map to compile > > @@ -444,9 +445,16 @@ def copydebugsources(debugsrcdir, d): > > processdebugsrc += "fgrep -zw '%s' | " > > # Remove prefix in the source paths > > processdebugsrc += "sed 's#%s##g' | " > > - processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s' 2>/dev/null)" > > + # handle external sources to provide sources in -dbg packages > > + if externalsrc: > > + localsrc_prefix = "/usr/src/debug/" > > + processdebugsrc += "sed 's#%s/##g' | " > > + processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s/%s' 2>/dev/null)" > > + cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workbasedir, externalsrc, dvar, debugsrcdir, workbasedir) > > + else: > > + processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s' 2>/dev/null)" > > + cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workparentdir, dvar, debugsrcdir) > > > > - cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workparentdir, dvar, debugsrcdir) > > (retval, output) = oe.utils.getstatusoutput(cmd) > > # Can "fail" if internal headers/transient sources are attempted > > #if retval: > > > > Is there a way we can fix this without adding a reference to externalsrc in > package.bbclass? > perhaps setting DEBUG_PREFIX_MAP relative to S instead of WORKDIR is going to take care of this > Cheers, > Paul > > -- > > Paul Eggleton > Intel Open Source Technology Centre > > > -- > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.openembedded.org/mailman/listinfo/openembedded-core ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages 2018-07-06 4:29 ` Vignesh Rajendran (RBEI/ECF3) @ 2018-07-06 4:50 ` Khem Raj 2018-07-12 7:00 ` Vignesh Rajendran (RBEI/ECF3) ` (3 more replies) 0 siblings, 4 replies; 16+ messages in thread From: Khem Raj @ 2018-07-06 4:50 UTC (permalink / raw) To: Vignesh Rajendran (RBEI/ECF3) Cc: Paul Eggleton, Patches and discussions about the oe-core layer [-- Attachment #1: Type: text/plain, Size: 5635 bytes --] Yes, you can try that On Thu, Jul 5, 2018 at 9:29 PM Vignesh Rajendran (RBEI/ECF3) < Vignesh.Rajendran@in.bosch.com> wrote: > Hello Khem, > > Can you clarify your idea and my question? > > Mit freundlichen Grüßen / Best regards > > Rajendran Vignesh > RBEI/ECF33 > > Tel. +91 422 67-65103 > > > -----Original Message----- > From: Vignesh Rajendran (RBEI/ECF3) > Sent: Tuesday, June 19, 2018 10:24 AM > To: 'Khem Raj' <raj.khem@gmail.com>; Paul Eggleton < > paul.eggleton@linux.intel.com> > Cc: Patches and discussions about the oe-core layer < > openembedded-core@lists.openembedded.org> > Subject: RE: [OE-core] [meta-oe][PATCH] package.bbclass: provide debug > sources in externalsrc -dbg packages > > Hello Khem, > > >> perhaps setting DEBUG_PREFIX_MAP relative to S instead of WORKDIR is > >> going to take care of this > > Do you mean to change it at bitbake.conf ? > > Mit freundlichen Grüßen / Best regards > > Rajendran Vignesh > RBEI/ECF33 > > Tel. +91 422 67-65103 > > > -----Original Message----- > From: Khem Raj [mailto:raj.khem@gmail.com] > Sent: Monday, June 18, 2018 11:13 PM > To: Paul Eggleton <paul.eggleton@linux.intel.com> > Cc: Vignesh Rajendran (RBEI/ECF3) <Vignesh.Rajendran@in.bosch.com>; > Patches and discussions about the oe-core layer < > openembedded-core@lists.openembedded.org> > Subject: Re: [OE-core] [meta-oe][PATCH] package.bbclass: provide debug > sources in externalsrc -dbg packages > > On Sun, May 20, 2018 at 3:26 PM Paul Eggleton > <paul.eggleton@linux.intel.com> wrote: > > > > Hi Vignesh, > > > > Thanks for the patch, a question below. > > > > On Thursday, 17 May 2018 5:50:00 PM NZST Vignesh Rajendran wrote: > > > The recipes which are using externalsrc method doesn't contain the > > > debug sources in their -dbg packages. > > > > > > Add a handling in copydebugsources function to copy the debugsources > for > > > externalsrc -dbg packages. > > > > > > Signed-off-by: Vignesh Rajendran <vignesh.rajendran@in.bosch.com> > > > --- > > > meta/classes/externalsrc.bbclass | 3 +++ > > > meta/classes/package.bbclass | 12 ++++++++++-- > > > 2 files changed, 13 insertions(+), 2 deletions(-) > > > > > > diff --git a/meta/classes/externalsrc.bbclass > b/meta/classes/externalsrc.bbclass > > > index c9f5cf7..135670d 100644 > > > --- a/meta/classes/externalsrc.bbclass > > > +++ b/meta/classes/externalsrc.bbclass > > > @@ -129,6 +129,9 @@ python () { > > > d.setVar('CONFIGURESTAMPFILE', configstamp) > > > d.setVar('STAMP', > '${STAMPS_DIR}/work-shared/${PN}/${EXTENDPE}${PV}-${PR}') > > > d.setVar('STAMPCLEAN', > '${STAMPS_DIR}/work-shared/${PN}/*-*') > > > + > > > + # set DEBUG_PREFIX_MAP to external source path > > > + d.appendVar("DEBUG_PREFIX_MAP", > "-fdebug-prefix-map=${EXTERNALSRC}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}") > > > } > > > > > > python externalsrc_configure_prefunc() { > > > diff --git a/meta/classes/package.bbclass > b/meta/classes/package.bbclass > > > index edeffa9..f071a2e 100644 > > > --- a/meta/classes/package.bbclass > > > +++ b/meta/classes/package.bbclass > > > @@ -420,6 +420,7 @@ def copydebugsources(debugsrcdir, d): > > > workdir = d.getVar("WORKDIR") > > > workparentdir = os.path.dirname(os.path.dirname(workdir)) > > > workbasedir = os.path.basename(os.path.dirname(workdir)) + > "/" + os.path.basename(workdir) > > > + externalsrc = d.getVar('EXTERNALSRC', True) > > > > > > # If build path exists in sourcefile, it means toolchain did > not use > > > # -fdebug-prefix-map to compile > > > @@ -444,9 +445,16 @@ def copydebugsources(debugsrcdir, d): > > > processdebugsrc += "fgrep -zw '%s' | " > > > # Remove prefix in the source paths > > > processdebugsrc += "sed 's#%s##g' | " > > > - processdebugsrc += "(cd '%s' ; cpio -pd0mlL > --no-preserve-owner '%s%s' 2>/dev/null)" > > > + # handle external sources to provide sources in -dbg packages > > > + if externalsrc: > > > + localsrc_prefix = "/usr/src/debug/" > > > + processdebugsrc += "sed 's#%s/##g' | " > > > + processdebugsrc += "(cd '%s' ; cpio -pd0mlL > --no-preserve-owner '%s%s/%s' 2>/dev/null)" > > > + cmd = processdebugsrc % (sourcefile, workbasedir, > localsrc_prefix, workbasedir, externalsrc, dvar, debugsrcdir, workbasedir) > > > + else: > > > + processdebugsrc += "(cd '%s' ; cpio -pd0mlL > --no-preserve-owner '%s%s' 2>/dev/null)" > > > + cmd = processdebugsrc % (sourcefile, workbasedir, > localsrc_prefix, workparentdir, dvar, debugsrcdir) > > > > > > - cmd = processdebugsrc % (sourcefile, workbasedir, > localsrc_prefix, workparentdir, dvar, debugsrcdir) > > > (retval, output) = oe.utils.getstatusoutput(cmd) > > > # Can "fail" if internal headers/transient sources are > attempted > > > #if retval: > > > > > > > Is there a way we can fix this without adding a reference to externalsrc > in > > package.bbclass? > > > > perhaps setting DEBUG_PREFIX_MAP relative to S instead of WORKDIR is > going to take care of this > > > Cheers, > > Paul > > > > -- > > > > Paul Eggleton > > Intel Open Source Technology Centre > > > > > > -- > > _______________________________________________ > > Openembedded-core mailing list > > Openembedded-core@lists.openembedded.org > > http://lists.openembedded.org/mailman/listinfo/openembedded-core > [-- Attachment #2: Type: text/html, Size: 7819 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages 2018-07-06 4:50 ` Khem Raj @ 2018-07-12 7:00 ` Vignesh Rajendran (RBEI/ECF3) 2018-07-23 10:02 ` Vignesh Rajendran (RBEI/ECF3) ` (2 subsequent siblings) 3 siblings, 0 replies; 16+ messages in thread From: Vignesh Rajendran (RBEI/ECF3) @ 2018-07-12 7:00 UTC (permalink / raw) To: Khem Raj; +Cc: Paul Eggleton, Patches and discussions about the oe-core layer [-- Attachment #1: Type: text/plain, Size: 6700 bytes --] Hello Khem, Paul, The approach suggested by is not possible due to the package.bbclass approach. https://github.com/openembedded/openembedded-core/blob/f9324af88a99eca28b160fa31aa4516fd397e44b/meta/classes/package.bbclass#L449 the sources are explicitly copied from workparentdir path cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workparentdir, dvar, debugsrcdir) This approach won’t work for externalsrc. Mit freundlichen Grüßen / Best regards Rajendran Vignesh RBEI/ECF33 Tel. +91 422 67-65103 From: Khem Raj [mailto:raj.khem@gmail.com] Sent: Friday, July 06, 2018 10:21 AM To: Vignesh Rajendran (RBEI/ECF3) <Vignesh.Rajendran@in.bosch.com> Cc: Patches and discussions about the oe-core layer <openembedded-core@lists.openembedded.org>; Paul Eggleton <paul.eggleton@linux.intel.com> Subject: Re: [OE-core] [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages Yes, you can try that On Thu, Jul 5, 2018 at 9:29 PM Vignesh Rajendran (RBEI/ECF3) <Vignesh.Rajendran@in.bosch.com<mailto:Vignesh.Rajendran@in.bosch.com>> wrote: Hello Khem, Can you clarify your idea and my question? Mit freundlichen Grüßen / Best regards Rajendran Vignesh RBEI/ECF33 Tel. +91 422 67-65103 -----Original Message----- From: Vignesh Rajendran (RBEI/ECF3) Sent: Tuesday, June 19, 2018 10:24 AM To: 'Khem Raj' <raj.khem@gmail.com<mailto:raj.khem@gmail.com>>; Paul Eggleton <paul.eggleton@linux.intel.com<mailto:paul.eggleton@linux.intel.com>> Cc: Patches and discussions about the oe-core layer <openembedded-core@lists.openembedded.org<mailto:openembedded-core@lists.openembedded.org>> Subject: RE: [OE-core] [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages Hello Khem, >> perhaps setting DEBUG_PREFIX_MAP relative to S instead of WORKDIR is >> going to take care of this Do you mean to change it at bitbake.conf ? Mit freundlichen Grüßen / Best regards Rajendran Vignesh RBEI/ECF33 Tel. +91 422 67-65103 -----Original Message----- From: Khem Raj [mailto:raj.khem@gmail.com<mailto:raj.khem@gmail.com>] Sent: Monday, June 18, 2018 11:13 PM To: Paul Eggleton <paul.eggleton@linux.intel.com<mailto:paul.eggleton@linux.intel.com>> Cc: Vignesh Rajendran (RBEI/ECF3) <Vignesh.Rajendran@in.bosch.com<mailto:Vignesh.Rajendran@in.bosch.com>>; Patches and discussions about the oe-core layer <openembedded-core@lists.openembedded.org<mailto:openembedded-core@lists.openembedded.org>> Subject: Re: [OE-core] [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages On Sun, May 20, 2018 at 3:26 PM Paul Eggleton <paul.eggleton@linux.intel.com<mailto:paul.eggleton@linux.intel.com>> wrote: > > Hi Vignesh, > > Thanks for the patch, a question below. > > On Thursday, 17 May 2018 5:50:00 PM NZST Vignesh Rajendran wrote: > > The recipes which are using externalsrc method doesn't contain the > > debug sources in their -dbg packages. > > > > Add a handling in copydebugsources function to copy the debugsources for > > externalsrc -dbg packages. > > > > Signed-off-by: Vignesh Rajendran <vignesh.rajendran@in.bosch.com<mailto:vignesh.rajendran@in.bosch.com>> > > --- > > meta/classes/externalsrc.bbclass | 3 +++ > > meta/classes/package.bbclass | 12 ++++++++++-- > > 2 files changed, 13 insertions(+), 2 deletions(-) > > > > diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass > > index c9f5cf7..135670d 100644 > > --- a/meta/classes/externalsrc.bbclass > > +++ b/meta/classes/externalsrc.bbclass > > @@ -129,6 +129,9 @@ python () { > > d.setVar('CONFIGURESTAMPFILE', configstamp) > > d.setVar('STAMP', '${STAMPS_DIR}/work-shared/${PN}/${EXTENDPE}${PV}-${PR}') > > d.setVar('STAMPCLEAN', '${STAMPS_DIR}/work-shared/${PN}/*-*') > > + > > + # set DEBUG_PREFIX_MAP to external source path > > + d.appendVar("DEBUG_PREFIX_MAP", "-fdebug-prefix-map=${EXTERNALSRC}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}") > > } > > > > python externalsrc_configure_prefunc() { > > diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass > > index edeffa9..f071a2e 100644 > > --- a/meta/classes/package.bbclass > > +++ b/meta/classes/package.bbclass > > @@ -420,6 +420,7 @@ def copydebugsources(debugsrcdir, d): > > workdir = d.getVar("WORKDIR") > > workparentdir = os.path.dirname(os.path.dirname(workdir)) > > workbasedir = os.path.basename(os.path.dirname(workdir)) + "/" + os.path.basename(workdir) > > + externalsrc = d.getVar('EXTERNALSRC', True) > > > > # If build path exists in sourcefile, it means toolchain did not use > > # -fdebug-prefix-map to compile > > @@ -444,9 +445,16 @@ def copydebugsources(debugsrcdir, d): > > processdebugsrc += "fgrep -zw '%s' | " > > # Remove prefix in the source paths > > processdebugsrc += "sed 's#%s##g' | " > > - processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s' 2>/dev/null)" > > + # handle external sources to provide sources in -dbg packages > > + if externalsrc: > > + localsrc_prefix = "/usr/src/debug/" > > + processdebugsrc += "sed 's#%s/##g' | " > > + processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s/%s' 2>/dev/null)" > > + cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workbasedir, externalsrc, dvar, debugsrcdir, workbasedir) > > + else: > > + processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s' 2>/dev/null)" > > + cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workparentdir, dvar, debugsrcdir) > > > > - cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workparentdir, dvar, debugsrcdir) > > (retval, output) = oe.utils.getstatusoutput(cmd) > > # Can "fail" if internal headers/transient sources are attempted > > #if retval: > > > > Is there a way we can fix this without adding a reference to externalsrc in > package.bbclass? > perhaps setting DEBUG_PREFIX_MAP relative to S instead of WORKDIR is going to take care of this > Cheers, > Paul > > -- > > Paul Eggleton > Intel Open Source Technology Centre > > > -- > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org<mailto:Openembedded-core@lists.openembedded.org> > http://lists.openembedded.org/mailman/listinfo/openembedded-core [-- Attachment #2: Type: text/html, Size: 13363 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages 2018-07-06 4:50 ` Khem Raj 2018-07-12 7:00 ` Vignesh Rajendran (RBEI/ECF3) @ 2018-07-23 10:02 ` Vignesh Rajendran (RBEI/ECF3) 2018-07-30 4:46 ` Vignesh Rajendran (RBEI/ECF3) 2018-08-10 5:36 ` Vignesh Rajendran (RBEI/ECF3) 3 siblings, 0 replies; 16+ messages in thread From: Vignesh Rajendran (RBEI/ECF3) @ 2018-07-23 10:02 UTC (permalink / raw) To: Khem Raj; +Cc: Paul Eggleton, Patches and discussions about the oe-core layer [-- Attachment #1: Type: text/plain, Size: 7353 bytes --] Hello Khem, Paul, Gentle reminder for any feedback.. Mit freundlichen Grüßen / Best regards Rajendran Vignesh RBEI/ECF33 Tel. +91 422 67-65103 From: Vignesh Rajendran (RBEI/ECF3) Sent: Thursday, July 12, 2018 12:30 PM To: 'Khem Raj' <raj.khem@gmail.com> Cc: Patches and discussions about the oe-core layer <openembedded-core@lists.openembedded.org>; Paul Eggleton <paul.eggleton@linux.intel.com> Subject: RE: [OE-core] [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages Hello Khem, Paul, The approach suggested by is not possible due to the package.bbclass approach. https://github.com/openembedded/openembedded-core/blob/f9324af88a99eca28b160fa31aa4516fd397e44b/meta/classes/package.bbclass#L449 the sources are explicitly copied from workparentdir path cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workparentdir, dvar, debugsrcdir) This approach won’t work for externalsrc. Mit freundlichen Grüßen / Best regards Rajendran Vignesh RBEI/ECF33 Tel. +91 422 67-65103 From: Khem Raj [mailto:raj.khem@gmail.com] Sent: Friday, July 06, 2018 10:21 AM To: Vignesh Rajendran (RBEI/ECF3) <Vignesh.Rajendran@in.bosch.com<mailto:Vignesh.Rajendran@in.bosch.com>> Cc: Patches and discussions about the oe-core layer <openembedded-core@lists.openembedded.org<mailto:openembedded-core@lists.openembedded.org>>; Paul Eggleton <paul.eggleton@linux.intel.com<mailto:paul.eggleton@linux.intel.com>> Subject: Re: [OE-core] [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages Yes, you can try that On Thu, Jul 5, 2018 at 9:29 PM Vignesh Rajendran (RBEI/ECF3) <Vignesh.Rajendran@in.bosch.com<mailto:Vignesh.Rajendran@in.bosch.com>> wrote: Hello Khem, Can you clarify your idea and my question? Mit freundlichen Grüßen / Best regards Rajendran Vignesh RBEI/ECF33 Tel. +91 422 67-65103 -----Original Message----- From: Vignesh Rajendran (RBEI/ECF3) Sent: Tuesday, June 19, 2018 10:24 AM To: 'Khem Raj' <raj.khem@gmail.com<mailto:raj.khem@gmail.com>>; Paul Eggleton <paul.eggleton@linux.intel.com<mailto:paul.eggleton@linux.intel.com>> Cc: Patches and discussions about the oe-core layer <openembedded-core@lists.openembedded.org<mailto:openembedded-core@lists.openembedded.org>> Subject: RE: [OE-core] [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages Hello Khem, >> perhaps setting DEBUG_PREFIX_MAP relative to S instead of WORKDIR is >> going to take care of this Do you mean to change it at bitbake.conf ? Mit freundlichen Grüßen / Best regards Rajendran Vignesh RBEI/ECF33 Tel. +91 422 67-65103 -----Original Message----- From: Khem Raj [mailto:raj.khem@gmail.com<mailto:raj.khem@gmail.com>] Sent: Monday, June 18, 2018 11:13 PM To: Paul Eggleton <paul.eggleton@linux.intel.com<mailto:paul.eggleton@linux.intel.com>> Cc: Vignesh Rajendran (RBEI/ECF3) <Vignesh.Rajendran@in.bosch.com<mailto:Vignesh.Rajendran@in.bosch.com>>; Patches and discussions about the oe-core layer <openembedded-core@lists.openembedded.org<mailto:openembedded-core@lists.openembedded.org>> Subject: Re: [OE-core] [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages On Sun, May 20, 2018 at 3:26 PM Paul Eggleton <paul.eggleton@linux.intel.com<mailto:paul.eggleton@linux.intel.com>> wrote: > > Hi Vignesh, > > Thanks for the patch, a question below. > > On Thursday, 17 May 2018 5:50:00 PM NZST Vignesh Rajendran wrote: > > The recipes which are using externalsrc method doesn't contain the > > debug sources in their -dbg packages. > > > > Add a handling in copydebugsources function to copy the debugsources for > > externalsrc -dbg packages. > > > > Signed-off-by: Vignesh Rajendran <vignesh.rajendran@in.bosch.com<mailto:vignesh.rajendran@in.bosch.com>> > > --- > > meta/classes/externalsrc.bbclass | 3 +++ > > meta/classes/package.bbclass | 12 ++++++++++-- > > 2 files changed, 13 insertions(+), 2 deletions(-) > > > > diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass > > index c9f5cf7..135670d 100644 > > --- a/meta/classes/externalsrc.bbclass > > +++ b/meta/classes/externalsrc.bbclass > > @@ -129,6 +129,9 @@ python () { > > d.setVar('CONFIGURESTAMPFILE', configstamp) > > d.setVar('STAMP', '${STAMPS_DIR}/work-shared/${PN}/${EXTENDPE}${PV}-${PR}') > > d.setVar('STAMPCLEAN', '${STAMPS_DIR}/work-shared/${PN}/*-*') > > + > > + # set DEBUG_PREFIX_MAP to external source path > > + d.appendVar("DEBUG_PREFIX_MAP", "-fdebug-prefix-map=${EXTERNALSRC}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}") > > } > > > > python externalsrc_configure_prefunc() { > > diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass > > index edeffa9..f071a2e 100644 > > --- a/meta/classes/package.bbclass > > +++ b/meta/classes/package.bbclass > > @@ -420,6 +420,7 @@ def copydebugsources(debugsrcdir, d): > > workdir = d.getVar("WORKDIR") > > workparentdir = os.path.dirname(os.path.dirname(workdir)) > > workbasedir = os.path.basename(os.path.dirname(workdir)) + "/" + os.path.basename(workdir) > > + externalsrc = d.getVar('EXTERNALSRC', True) > > > > # If build path exists in sourcefile, it means toolchain did not use > > # -fdebug-prefix-map to compile > > @@ -444,9 +445,16 @@ def copydebugsources(debugsrcdir, d): > > processdebugsrc += "fgrep -zw '%s' | " > > # Remove prefix in the source paths > > processdebugsrc += "sed 's#%s##g' | " > > - processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s' 2>/dev/null)" > > + # handle external sources to provide sources in -dbg packages > > + if externalsrc: > > + localsrc_prefix = "/usr/src/debug/" > > + processdebugsrc += "sed 's#%s/##g' | " > > + processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s/%s' 2>/dev/null)" > > + cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workbasedir, externalsrc, dvar, debugsrcdir, workbasedir) > > + else: > > + processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s' 2>/dev/null)" > > + cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workparentdir, dvar, debugsrcdir) > > > > - cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workparentdir, dvar, debugsrcdir) > > (retval, output) = oe.utils.getstatusoutput(cmd) > > # Can "fail" if internal headers/transient sources are attempted > > #if retval: > > > > Is there a way we can fix this without adding a reference to externalsrc in > package.bbclass? > perhaps setting DEBUG_PREFIX_MAP relative to S instead of WORKDIR is going to take care of this > Cheers, > Paul > > -- > > Paul Eggleton > Intel Open Source Technology Centre > > > -- > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org<mailto:Openembedded-core@lists.openembedded.org> > http://lists.openembedded.org/mailman/listinfo/openembedded-core [-- Attachment #2: Type: text/html, Size: 15456 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages 2018-07-06 4:50 ` Khem Raj 2018-07-12 7:00 ` Vignesh Rajendran (RBEI/ECF3) 2018-07-23 10:02 ` Vignesh Rajendran (RBEI/ECF3) @ 2018-07-30 4:46 ` Vignesh Rajendran (RBEI/ECF3) 2018-08-10 5:36 ` Vignesh Rajendran (RBEI/ECF3) 3 siblings, 0 replies; 16+ messages in thread From: Vignesh Rajendran (RBEI/ECF3) @ 2018-07-30 4:46 UTC (permalink / raw) To: Khem Raj; +Cc: Paul Eggleton, Patches and discussions about the oe-core layer [-- Attachment #1: Type: text/plain, Size: 7969 bytes --] Hello Khem, Any feedback ? Mit freundlichen Grüßen / Best regards Rajendran Vignesh RBEI/ECF33 Tel. +91 422 67-65103 From: Vignesh Rajendran (RBEI/ECF3) Sent: Monday, July 23, 2018 3:33 PM To: 'Khem Raj' <raj.khem@gmail.com> Cc: 'Patches and discussions about the oe-core layer' <openembedded-core@lists.openembedded.org>; 'Paul Eggleton' <paul.eggleton@linux.intel.com> Subject: RE: [OE-core] [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages Hello Khem, Paul, Gentle reminder for any feedback.. Mit freundlichen Grüßen / Best regards Rajendran Vignesh RBEI/ECF33 Tel. +91 422 67-65103 From: Vignesh Rajendran (RBEI/ECF3) Sent: Thursday, July 12, 2018 12:30 PM To: 'Khem Raj' <raj.khem@gmail.com<mailto:raj.khem@gmail.com>> Cc: Patches and discussions about the oe-core layer <openembedded-core@lists.openembedded.org<mailto:openembedded-core@lists.openembedded.org>>; Paul Eggleton <paul.eggleton@linux.intel.com<mailto:paul.eggleton@linux.intel.com>> Subject: RE: [OE-core] [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages Hello Khem, Paul, The approach suggested by is not possible due to the package.bbclass approach. https://github.com/openembedded/openembedded-core/blob/f9324af88a99eca28b160fa31aa4516fd397e44b/meta/classes/package.bbclass#L449 the sources are explicitly copied from workparentdir path cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workparentdir, dvar, debugsrcdir) This approach won’t work for externalsrc. Mit freundlichen Grüßen / Best regards Rajendran Vignesh RBEI/ECF33 Tel. +91 422 67-65103 From: Khem Raj [mailto:raj.khem@gmail.com] Sent: Friday, July 06, 2018 10:21 AM To: Vignesh Rajendran (RBEI/ECF3) <Vignesh.Rajendran@in.bosch.com<mailto:Vignesh.Rajendran@in.bosch.com>> Cc: Patches and discussions about the oe-core layer <openembedded-core@lists.openembedded.org<mailto:openembedded-core@lists.openembedded.org>>; Paul Eggleton <paul.eggleton@linux.intel.com<mailto:paul.eggleton@linux.intel.com>> Subject: Re: [OE-core] [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages Yes, you can try that On Thu, Jul 5, 2018 at 9:29 PM Vignesh Rajendran (RBEI/ECF3) <Vignesh.Rajendran@in.bosch.com<mailto:Vignesh.Rajendran@in.bosch.com>> wrote: Hello Khem, Can you clarify your idea and my question? Mit freundlichen Grüßen / Best regards Rajendran Vignesh RBEI/ECF33 Tel. +91 422 67-65103 -----Original Message----- From: Vignesh Rajendran (RBEI/ECF3) Sent: Tuesday, June 19, 2018 10:24 AM To: 'Khem Raj' <raj.khem@gmail.com<mailto:raj.khem@gmail.com>>; Paul Eggleton <paul.eggleton@linux.intel.com<mailto:paul.eggleton@linux.intel.com>> Cc: Patches and discussions about the oe-core layer <openembedded-core@lists.openembedded.org<mailto:openembedded-core@lists.openembedded.org>> Subject: RE: [OE-core] [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages Hello Khem, >> perhaps setting DEBUG_PREFIX_MAP relative to S instead of WORKDIR is >> going to take care of this Do you mean to change it at bitbake.conf ? Mit freundlichen Grüßen / Best regards Rajendran Vignesh RBEI/ECF33 Tel. +91 422 67-65103 -----Original Message----- From: Khem Raj [mailto:raj.khem@gmail.com<mailto:raj.khem@gmail.com>] Sent: Monday, June 18, 2018 11:13 PM To: Paul Eggleton <paul.eggleton@linux.intel.com<mailto:paul.eggleton@linux.intel.com>> Cc: Vignesh Rajendran (RBEI/ECF3) <Vignesh.Rajendran@in.bosch.com<mailto:Vignesh.Rajendran@in.bosch.com>>; Patches and discussions about the oe-core layer <openembedded-core@lists.openembedded.org<mailto:openembedded-core@lists.openembedded.org>> Subject: Re: [OE-core] [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages On Sun, May 20, 2018 at 3:26 PM Paul Eggleton <paul.eggleton@linux.intel.com<mailto:paul.eggleton@linux.intel.com>> wrote: > > Hi Vignesh, > > Thanks for the patch, a question below. > > On Thursday, 17 May 2018 5:50:00 PM NZST Vignesh Rajendran wrote: > > The recipes which are using externalsrc method doesn't contain the > > debug sources in their -dbg packages. > > > > Add a handling in copydebugsources function to copy the debugsources for > > externalsrc -dbg packages. > > > > Signed-off-by: Vignesh Rajendran <vignesh.rajendran@in.bosch.com<mailto:vignesh.rajendran@in.bosch.com>> > > --- > > meta/classes/externalsrc.bbclass | 3 +++ > > meta/classes/package.bbclass | 12 ++++++++++-- > > 2 files changed, 13 insertions(+), 2 deletions(-) > > > > diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass > > index c9f5cf7..135670d 100644 > > --- a/meta/classes/externalsrc.bbclass > > +++ b/meta/classes/externalsrc.bbclass > > @@ -129,6 +129,9 @@ python () { > > d.setVar('CONFIGURESTAMPFILE', configstamp) > > d.setVar('STAMP', '${STAMPS_DIR}/work-shared/${PN}/${EXTENDPE}${PV}-${PR}') > > d.setVar('STAMPCLEAN', '${STAMPS_DIR}/work-shared/${PN}/*-*') > > + > > + # set DEBUG_PREFIX_MAP to external source path > > + d.appendVar("DEBUG_PREFIX_MAP", "-fdebug-prefix-map=${EXTERNALSRC}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}") > > } > > > > python externalsrc_configure_prefunc() { > > diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass > > index edeffa9..f071a2e 100644 > > --- a/meta/classes/package.bbclass > > +++ b/meta/classes/package.bbclass > > @@ -420,6 +420,7 @@ def copydebugsources(debugsrcdir, d): > > workdir = d.getVar("WORKDIR") > > workparentdir = os.path.dirname(os.path.dirname(workdir)) > > workbasedir = os.path.basename(os.path.dirname(workdir)) + "/" + os.path.basename(workdir) > > + externalsrc = d.getVar('EXTERNALSRC', True) > > > > # If build path exists in sourcefile, it means toolchain did not use > > # -fdebug-prefix-map to compile > > @@ -444,9 +445,16 @@ def copydebugsources(debugsrcdir, d): > > processdebugsrc += "fgrep -zw '%s' | " > > # Remove prefix in the source paths > > processdebugsrc += "sed 's#%s##g' | " > > - processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s' 2>/dev/null)" > > + # handle external sources to provide sources in -dbg packages > > + if externalsrc: > > + localsrc_prefix = "/usr/src/debug/" > > + processdebugsrc += "sed 's#%s/##g' | " > > + processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s/%s' 2>/dev/null)" > > + cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workbasedir, externalsrc, dvar, debugsrcdir, workbasedir) > > + else: > > + processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s' 2>/dev/null)" > > + cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workparentdir, dvar, debugsrcdir) > > > > - cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workparentdir, dvar, debugsrcdir) > > (retval, output) = oe.utils.getstatusoutput(cmd) > > # Can "fail" if internal headers/transient sources are attempted > > #if retval: > > > > Is there a way we can fix this without adding a reference to externalsrc in > package.bbclass? > perhaps setting DEBUG_PREFIX_MAP relative to S instead of WORKDIR is going to take care of this > Cheers, > Paul > > -- > > Paul Eggleton > Intel Open Source Technology Centre > > > -- > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org<mailto:Openembedded-core@lists.openembedded.org> > http://lists.openembedded.org/mailman/listinfo/openembedded-core [-- Attachment #2: Type: text/html, Size: 17451 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages 2018-07-06 4:50 ` Khem Raj ` (2 preceding siblings ...) 2018-07-30 4:46 ` Vignesh Rajendran (RBEI/ECF3) @ 2018-08-10 5:36 ` Vignesh Rajendran (RBEI/ECF3) 3 siblings, 0 replies; 16+ messages in thread From: Vignesh Rajendran (RBEI/ECF3) @ 2018-08-10 5:36 UTC (permalink / raw) To: Khem Raj; +Cc: Paul Eggleton, Patches and discussions about the oe-core layer [-- Attachment #1: Type: text/plain, Size: 6305 bytes --] Hello Khem, Long-wait for any feedback !!! Mit freundlichen Grüßen / Best regards Rajendran Vignesh RBEI/ECF33 Tel. +91 422 67-65103 From: Khem Raj [mailto:raj.khem@gmail.com] Sent: Friday, July 06, 2018 10:21 AM To: Vignesh Rajendran (RBEI/ECF3) <Vignesh.Rajendran@in.bosch.com> Cc: Patches and discussions about the oe-core layer <openembedded-core@lists.openembedded.org>; Paul Eggleton <paul.eggleton@linux.intel.com> Subject: Re: [OE-core] [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages Yes, you can try that On Thu, Jul 5, 2018 at 9:29 PM Vignesh Rajendran (RBEI/ECF3) <Vignesh.Rajendran@in.bosch.com<mailto:Vignesh.Rajendran@in.bosch.com>> wrote: Hello Khem, Can you clarify your idea and my question? Mit freundlichen Grüßen / Best regards Rajendran Vignesh RBEI/ECF33 Tel. +91 422 67-65103 -----Original Message----- From: Vignesh Rajendran (RBEI/ECF3) Sent: Tuesday, June 19, 2018 10:24 AM To: 'Khem Raj' <raj.khem@gmail.com<mailto:raj.khem@gmail.com>>; Paul Eggleton <paul.eggleton@linux.intel.com<mailto:paul.eggleton@linux.intel.com>> Cc: Patches and discussions about the oe-core layer <openembedded-core@lists.openembedded.org<mailto:openembedded-core@lists.openembedded.org>> Subject: RE: [OE-core] [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages Hello Khem, >> perhaps setting DEBUG_PREFIX_MAP relative to S instead of WORKDIR is >> going to take care of this Do you mean to change it at bitbake.conf ? Mit freundlichen Grüßen / Best regards Rajendran Vignesh RBEI/ECF33 Tel. +91 422 67-65103 -----Original Message----- From: Khem Raj [mailto:raj.khem@gmail.com<mailto:raj.khem@gmail.com>] Sent: Monday, June 18, 2018 11:13 PM To: Paul Eggleton <paul.eggleton@linux.intel.com<mailto:paul.eggleton@linux.intel.com>> Cc: Vignesh Rajendran (RBEI/ECF3) <Vignesh.Rajendran@in.bosch.com<mailto:Vignesh.Rajendran@in.bosch.com>>; Patches and discussions about the oe-core layer <openembedded-core@lists.openembedded.org<mailto:openembedded-core@lists.openembedded.org>> Subject: Re: [OE-core] [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages On Sun, May 20, 2018 at 3:26 PM Paul Eggleton <paul.eggleton@linux.intel.com<mailto:paul.eggleton@linux.intel.com>> wrote: > > Hi Vignesh, > > Thanks for the patch, a question below. > > On Thursday, 17 May 2018 5:50:00 PM NZST Vignesh Rajendran wrote: > > The recipes which are using externalsrc method doesn't contain the > > debug sources in their -dbg packages. > > > > Add a handling in copydebugsources function to copy the debugsources for > > externalsrc -dbg packages. > > > > Signed-off-by: Vignesh Rajendran <vignesh.rajendran@in.bosch.com<mailto:vignesh.rajendran@in.bosch.com>> > > --- > > meta/classes/externalsrc.bbclass | 3 +++ > > meta/classes/package.bbclass | 12 ++++++++++-- > > 2 files changed, 13 insertions(+), 2 deletions(-) > > > > diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass > > index c9f5cf7..135670d 100644 > > --- a/meta/classes/externalsrc.bbclass > > +++ b/meta/classes/externalsrc.bbclass > > @@ -129,6 +129,9 @@ python () { > > d.setVar('CONFIGURESTAMPFILE', configstamp) > > d.setVar('STAMP', '${STAMPS_DIR}/work-shared/${PN}/${EXTENDPE}${PV}-${PR}') > > d.setVar('STAMPCLEAN', '${STAMPS_DIR}/work-shared/${PN}/*-*') > > + > > + # set DEBUG_PREFIX_MAP to external source path > > + d.appendVar("DEBUG_PREFIX_MAP", "-fdebug-prefix-map=${EXTERNALSRC}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}") > > } > > > > python externalsrc_configure_prefunc() { > > diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass > > index edeffa9..f071a2e 100644 > > --- a/meta/classes/package.bbclass > > +++ b/meta/classes/package.bbclass > > @@ -420,6 +420,7 @@ def copydebugsources(debugsrcdir, d): > > workdir = d.getVar("WORKDIR") > > workparentdir = os.path.dirname(os.path.dirname(workdir)) > > workbasedir = os.path.basename(os.path.dirname(workdir)) + "/" + os.path.basename(workdir) > > + externalsrc = d.getVar('EXTERNALSRC', True) > > > > # If build path exists in sourcefile, it means toolchain did not use > > # -fdebug-prefix-map to compile > > @@ -444,9 +445,16 @@ def copydebugsources(debugsrcdir, d): > > processdebugsrc += "fgrep -zw '%s' | " > > # Remove prefix in the source paths > > processdebugsrc += "sed 's#%s##g' | " > > - processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s' 2>/dev/null)" > > + # handle external sources to provide sources in -dbg packages > > + if externalsrc: > > + localsrc_prefix = "/usr/src/debug/" > > + processdebugsrc += "sed 's#%s/##g' | " > > + processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s/%s' 2>/dev/null)" > > + cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workbasedir, externalsrc, dvar, debugsrcdir, workbasedir) > > + else: > > + processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s' 2>/dev/null)" > > + cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workparentdir, dvar, debugsrcdir) > > > > - cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workparentdir, dvar, debugsrcdir) > > (retval, output) = oe.utils.getstatusoutput(cmd) > > # Can "fail" if internal headers/transient sources are attempted > > #if retval: > > > > Is there a way we can fix this without adding a reference to externalsrc in > package.bbclass? > perhaps setting DEBUG_PREFIX_MAP relative to S instead of WORKDIR is going to take care of this > Cheers, > Paul > > -- > > Paul Eggleton > Intel Open Source Technology Centre > > > -- > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org<mailto:Openembedded-core@lists.openembedded.org> > http://lists.openembedded.org/mailman/listinfo/openembedded-core [-- Attachment #2: Type: text/html, Size: 12024 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
* [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages @ 2018-05-07 5:50 Vignesh Rajendran 2018-05-16 12:11 ` Vignesh Rajendran (RBEI/ECF3) 0 siblings, 1 reply; 16+ messages in thread From: Vignesh Rajendran @ 2018-05-07 5:50 UTC (permalink / raw) To: openembedded-core The recipes which are using externalsrc method doesn't contain the debug sources in their -dbg packages. Add a handling in copydebugsources function to copy the debugsources for externalsrc -dbg packages. Signed-off-by: Vignesh Rajendran <vignesh.rajendran@in.bosch.com> --- meta/classes/externalsrc.bbclass | 3 +++ meta/classes/package.bbclass | 14 +++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass index c9f5cf7..135670d 100644 --- a/meta/classes/externalsrc.bbclass +++ b/meta/classes/externalsrc.bbclass @@ -129,6 +129,9 @@ python () { d.setVar('CONFIGURESTAMPFILE', configstamp) d.setVar('STAMP', '${STAMPS_DIR}/work-shared/${PN}/${EXTENDPE}${PV}-${PR}') d.setVar('STAMPCLEAN', '${STAMPS_DIR}/work-shared/${PN}/*-*') + + # set DEBUG_PREFIX_MAP to external source path + d.appendVar("DEBUG_PREFIX_MAP", "-fdebug-prefix-map=${EXTERNALSRC}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}") } python externalsrc_configure_prefunc() { diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index edeffa9..2c4472d 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass @@ -420,6 +420,7 @@ def copydebugsources(debugsrcdir, d): workdir = d.getVar("WORKDIR") workparentdir = os.path.dirname(os.path.dirname(workdir)) workbasedir = os.path.basename(os.path.dirname(workdir)) + "/" + os.path.basename(workdir) + externalsrc = d.getVar('EXTERNALSRC', True) # If build path exists in sourcefile, it means toolchain did not use # -fdebug-prefix-map to compile @@ -444,10 +445,17 @@ def copydebugsources(debugsrcdir, d): processdebugsrc += "fgrep -zw '%s' | " # Remove prefix in the source paths processdebugsrc += "sed 's#%s##g' | " - processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s' 2>/dev/null)" + # handle external sources to provide sources in -dbg packages + if externalsrc: + localsrc_prefix = "/usr/src/debug/" + processdebugsrc += "sed 's#%s/##g' | " + processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s/%s' 2>/dev/null)" + cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workbasedir, externalsrc, dvar, debugsrcdir, workbasedir) + else: + processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s' 2>/dev/null)" + cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workparentdir, dvar, debugsrcdir) - cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workparentdir, dvar, debugsrcdir) - (retval, output) = oe.utils.getstatusoutput(cmd) + (retval, output) = oe.utils.getstatusoutput(cmd) # Can "fail" if internal headers/transient sources are attempted #if retval: # bb.fatal("debug source copy failed with exit code %s (cmd was %s)" % (retval, cmd)) -- 2.7.4 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages 2018-05-07 5:50 Vignesh Rajendran @ 2018-05-16 12:11 ` Vignesh Rajendran (RBEI/ECF3) 2018-05-16 12:53 ` Alexander Kanavin 0 siblings, 1 reply; 16+ messages in thread From: Vignesh Rajendran (RBEI/ECF3) @ 2018-05-16 12:11 UTC (permalink / raw) To: openembedded-core [-- Attachment #1: Type: text/plain, Size: 4743 bytes --] Hello OE-Core Members, As I am new to the patch submission, anyone can explain how long this process will take for acceptance in master/next release? After several days of waiting by watching OE-mailing thread for any reply for the patch, Now I had a feeling like the patch may have been missed. From the below reference, I am just giving a ping back to the community. https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded If your patch has not had any feedback after a few days it may have been missed or the appropriate reviewers may not currently be around; it is perfectly fine to reply to it yourself with a "ping" / reminder request for feedback. NOTE: patch review for feature / recipe upgrade patches will likely be delayed during a feature freeze because these types of patches aren't merged during this time - you may have to wait until after the freeze is lifted. Any feedback/acceptance will be highly appreciated. Mit freundlichen Grüßen / Best regards Rajendran Vignesh RBEI/ECF33 Tel. +91 422 67-65103 -----Original Message----- From: Vignesh Rajendran (RBEI/ECF3) Sent: Monday, May 07, 2018 11:21 AM To: openembedded-core@lists.openembedded.org Cc: Vignesh Rajendran (RBEI/ECF3) <Vignesh.Rajendran@in.bosch.com> Subject: [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages The recipes which are using externalsrc method doesn't contain the debug sources in their -dbg packages. Add a handling in copydebugsources function to copy the debugsources for externalsrc -dbg packages. Signed-off-by: Vignesh Rajendran <vignesh.rajendran@in.bosch.com<mailto:vignesh.rajendran@in.bosch.com>> --- meta/classes/externalsrc.bbclass | 3 +++ meta/classes/package.bbclass | 14 +++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass index c9f5cf7..135670d 100644 --- a/meta/classes/externalsrc.bbclass +++ b/meta/classes/externalsrc.bbclass @@ -129,6 +129,9 @@ python () { d.setVar('CONFIGURESTAMPFILE', configstamp) d.setVar('STAMP', '${STAMPS_DIR}/work-shared/${PN}/${EXTENDPE}${PV}-${PR}') d.setVar('STAMPCLEAN', '${STAMPS_DIR}/work-shared/${PN}/*-*') + + # set DEBUG_PREFIX_MAP to external source path + d.appendVar("DEBUG_PREFIX_MAP", "-fdebug-prefix-map=${EXTERNALSRC}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}") } python externalsrc_configure_prefunc() { diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index edeffa9..2c4472d 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass @@ -420,6 +420,7 @@ def copydebugsources(debugsrcdir, d): workdir = d.getVar("WORKDIR") workparentdir = os.path.dirname(os.path.dirname(workdir)) workbasedir = os.path.basename(os.path.dirname(workdir)) + "/" + os.path.basename(workdir) + externalsrc = d.getVar('EXTERNALSRC', True) # If build path exists in sourcefile, it means toolchain did not use # -fdebug-prefix-map to compile @@ -444,10 +445,17 @@ def copydebugsources(debugsrcdir, d): processdebugsrc += "fgrep -zw '%s' | " # Remove prefix in the source paths processdebugsrc += "sed 's#%s##g' | " - processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s' 2>/dev/null)" + # handle external sources to provide sources in -dbg packages + if externalsrc: + localsrc_prefix = "/usr/src/debug/" + processdebugsrc += "sed 's#%s/##g' | " + processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s/%s' 2>/dev/null)" + cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workbasedir, externalsrc, dvar, debugsrcdir, workbasedir) + else: + processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s' 2>/dev/null)" + cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workparentdir, dvar, debugsrcdir) - cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workparentdir, dvar, debugsrcdir) - (retval, output) = oe.utils.getstatusoutput(cmd) + (retval, output) = oe.utils.getstatusoutput(cmd) # Can "fail" if internal headers/transient sources are attempted #if retval: # bb.fatal("debug source copy failed with exit code %s (cmd was %s)" % (retval, cmd)) -- 2.7.4 [-- Attachment #2: Type: text/html, Size: 11994 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages 2018-05-16 12:11 ` Vignesh Rajendran (RBEI/ECF3) @ 2018-05-16 12:53 ` Alexander Kanavin 0 siblings, 0 replies; 16+ messages in thread From: Alexander Kanavin @ 2018-05-16 12:53 UTC (permalink / raw) To: Vignesh Rajendran (RBEI/ECF3), openembedded-core On 05/16/2018 03:11 PM, Vignesh Rajendran (RBEI/ECF3) wrote: > As I am new to the patch submission, anyone can explain how long this > process will take for acceptance in master/next release? > > After several days of waiting by watching OE-mailing thread for any > reply for the patch, Now I had a feeling like the patch may have been > missed. Generally we don't positively acknowledge the patches, to reduce the amount of noise on the mailing list. If the patch doesn't show up in master after a week or two, do ping or resend. Alex ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2018-08-10 5:37 UTC | newest] Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-05-17 5:50 [meta-oe][PATCH] package.bbclass: provide debug sources in externalsrc -dbg packages Vignesh Rajendran 2018-05-17 5:55 ` Vignesh Rajendran (RBEI/ECF3) 2018-05-20 22:26 ` Paul Eggleton 2018-05-21 4:50 ` Vignesh Rajendran (RBEI/ECF3) 2018-06-18 6:38 ` Vignesh Rajendran (RBEI/ECF3) 2018-06-18 17:43 ` Khem Raj 2018-06-19 4:54 ` Vignesh Rajendran (RBEI/ECF3) 2018-07-06 4:29 ` Vignesh Rajendran (RBEI/ECF3) 2018-07-06 4:50 ` Khem Raj 2018-07-12 7:00 ` Vignesh Rajendran (RBEI/ECF3) 2018-07-23 10:02 ` Vignesh Rajendran (RBEI/ECF3) 2018-07-30 4:46 ` Vignesh Rajendran (RBEI/ECF3) 2018-08-10 5:36 ` Vignesh Rajendran (RBEI/ECF3) -- strict thread matches above, loose matches on Subject: below -- 2018-05-07 5:50 Vignesh Rajendran 2018-05-16 12:11 ` Vignesh Rajendran (RBEI/ECF3) 2018-05-16 12:53 ` Alexander Kanavin
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.