[poky] [PULL] package.bbclass: provide debug sources in externalsrc -dbg packages
Peter Kjellerstedt
peter.kjellerstedt at axis.com
Tue Apr 24 03:29:23 PDT 2018
I am in no way responsible for integrating anything to Poky. That
will be handled by the maintainers. However, OE-Core (and thus
Poky) is currently near its next release and because of that
integrations are limited to a bare minimum.
Additionally, this patch belongs on the
openembedded-core at lists.openembedded.org list as it modifies a
file in OE-Core.
//Peter
> -----Original Message-----
> From: Vignesh Rajendran (RBEI/ECF3)
> [mailto:Vignesh.Rajendran at in.bosch.com]
> Sent: den 24 april 2018 06:39
> To: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
> Cc: poky at yoctoproject.org
> Subject: RE: [poky] [PULL] package.bbclass: provide debug sources in
> externalsrc -dbg packages
>
> Hi Peter,
>
> I couldn't see my changes not merged to poky-contrib master yet.
> http://git.yoctoproject.org/cgit.cgi/poky-
> contrib/log/?h=vrajendran/externalsrc-debugsrc
>
> As an external developer, I am unaware of Yocto QA process to intake
> changes to master branch.
>
> Do I missing something 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: Thursday, April 19, 2018 2:54 PM
> To: 'Peter Kjellerstedt' <peter.kjellerstedt at axis.com>
> Cc: poky at yoctoproject.org; Vignesh Rajendran (RBEI/ECF3)
> (Vignesh.Rajendran at in.bosch.com) <Vignesh.Rajendran at in.bosch.com>
> Subject: RE: [poky] [PULL] package.bbclass: provide debug sources in
> externalsrc -dbg packages
>
> Hi Peter,
>
> I have removed the tabs and applied spaces in the mentioned lines.
>
> Please see the changes here,
> http://git.yoctoproject.org/cgit.cgi/poky-
> contrib/commit/?h=vrajendran/externalsrc-
> debugsrc&id=d835e41e35160941debaad4beff80b322ff60664
>
> Patch:
> package.bbclass: copydebugsources: remove tabs and apply
> spacevrajendran/externalsrc-debugsrc
> Signed-off-by: Vignesh Rajendran <vignesh.rajendran at in.bosch.com>
> Diffstat
> -rw-r--r-- meta/classes/package.bbclass 4
>
> 1 files changed, 2 insertions, 2 deletions
> diff --git a/meta/classes/package.bbclass
> b/meta/classes/package.bbclass
> index 9466a4b..c76f6e4 100644
> --- a/meta/classes/package.bbclass
> +++ b/meta/classes/package.bbclass
> @@ -414,7 +414,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)
> + externalsrc = d.getVar('EXTERNALSRC', True)
>
> # If build path exists in sourcefile, it means toolchain did
> not use
> # -fdebug-prefix-map to compile
> @@ -449,7 +449,7 @@ def copydebugsources(debugsrcdir, d):
> processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-
> owner '%s%s' 2>/dev/null)"
> 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))
>
> Thank You.
>
> Mit freundlichen Grüßen / Best regards
>
> Rajendran Vignesh
> RBEI/ECF33
>
> Tel. +91 422 67-65103
>
>
> -----Original Message-----
> From: Peter Kjellerstedt [mailto:peter.kjellerstedt at axis.com]
> Sent: Thursday, April 19, 2018 12:57 PM
> To: Vignesh Rajendran (RBEI/ECF3) <Vignesh.Rajendran at in.bosch.com>;
> poky at yoctoproject.org
> Subject: RE: [poky] [PULL] package.bbclass: provide debug sources in
> externalsrc -dbg packages
>
> > -----Original Message-----
> > From: poky-bounces at yoctoproject.org [mailto:poky-
> > bounces at yoctoproject.org] On Behalf Of Vignesh Rajendran
> > Sent: den 19 april 2018 06:27
> > To: poky at yoctoproject.org
> > Subject: [poky] [PULL] 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 at 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 3f1d396..042f935 100644
> > --- a/meta/classes/externalsrc.bbclass
> > +++ b/meta/classes/externalsrc.bbclass
> > @@ -126,6 +126,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 504c023..9466a4b 100644
> > --- a/meta/classes/package.bbclass
> > +++ b/meta/classes/package.bbclass
> > @@ -414,6 +414,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)
>
> Change the tab to spaces.
>
> >
> > # If build path exists in sourcefile, it means toolchain did
> not use
> > # -fdebug-prefix-map to compile
> > @@ -438,10 +439,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)
>
> Change the tab to spaces.
>
> > # 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
>
> //Peter
More information about the poky
mailing list