[OE-core] [morty][PATCH] kernelsrc/perf: fix dependency on non existant task when using externalsrc

Stefan Stanacar sstncr at gmail.com
Fri Jan 12 17:01:52 UTC 2018


On Fri, Jan 12, 2018 at 6:21 PM, Joshua Watt <jpewhacker at gmail.com> wrote:

> On Thu, 2018-01-11 at 16:07 +0000, Stefan Stanacar wrote:
> > When externalsrc is enabled for kernel, do_patch doesn't exist since
> > is in
> > SRCTREECOVEREDTASKS, so make these depend on a real task.
> >
> > Fixes:
> >     ERROR: Task do_unpack in /data/yocto/poky/meta/recipes-
> > kernel/perf/perf.bb
> >     depends upon non-existent task do_patch in
> > /data/yocto/poky/meta/recipes-kernel/linux/linux-yocto_4.8.bb
> >
> > Signed-off-by: Stefan Stanacar <sstncr at gmail.com>
> > ---
> >  meta/classes/kernelsrc.bbclass   | 2 +-
> >  meta/recipes-kernel/perf/perf.bb | 2 +-
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/meta/classes/kernelsrc.bbclass
> > b/meta/classes/kernelsrc.bbclass
> > index 9efd46a..ce6c999 100644
> > --- a/meta/classes/kernelsrc.bbclass
> > +++ b/meta/classes/kernelsrc.bbclass
> > @@ -1,6 +1,6 @@
> >  S = "${STAGING_KERNEL_DIR}"
> >  do_fetch[noexec] = "1"
> > -do_unpack[depends] += "virtual/kernel:do_patch"
> > +do_unpack[depends] += "virtual/kernel:do_configure"
>
> I was looking at fixing this as well, but I had another approach.
> Instead of perpetually changing these to handle externalsrc corner
> cases, perhaps externalsrc.bbclass should not delete the tasks, but
> instead mark them as noexec as follows (I'll push this up for real if
> in a moment...). Then recipes should be able to work transparently
> regardless of externalsrc being used or not.
>
>

+1
Yup, I like this, it's a better fix. I've sent another patch for
kernel.bbclass (both for master and morty) which I think is still needed
even with your patch.

Cheers,
Stefan



> diff --git a/meta/classes/externalsrc.bbclass
> b/meta/classes/externalsrc.bbclass
> index 65dd13ddc1f..12046d74e17 100644
> --- a/meta/classes/externalsrc.bbclass
> +++ b/meta/classes/externalsrc.bbclass
> @@ -102,7 +102,7 @@ python () {
>          for task in d.getVar("SRCTREECOVEREDTASKS").split():
>              if local_srcuri and task in fetch_tasks:
>                  continue
> -            bb.build.deltask(task, d)
> +            d.setVarFlag(task, 'noexec', '1')
>
>          d.prependVarFlag('do_compile', 'prefunc
> s', "externalsrc_compile_prefunc ")
>          d.prependVarFlag('do_configure', 'prefuncs',
> "externalsrc_configure_prefunc ")
>
>
> >  do_unpack[noexec] = "1"
> >  do_patch[noexec] = "1"
> >  do_package[depends] += "virtual/kernel:do_populate_sysroot"
> > diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-
> > kernel/perf/perf.bb
> > index 03ae446..145774b 100644
> > --- a/meta/recipes-kernel/perf/perf.bb
> > +++ b/meta/recipes-kernel/perf/perf.bb
> > @@ -47,7 +47,7 @@ export PYTHON_SITEPACKAGES_DIR
> >  #kernel 3.1+ supports WERROR to disable warnings as errors
> >  export WERROR = "0"
> >
> > -do_populate_lic[depends] += "virtual/kernel:do_patch"
> > +do_populate_lic[depends] += "virtual/kernel:do_configure"
> >
> >  # needed for building the tools/perf Perl binding
> >  inherit perlnative cpan-base
> > --
> > 2.7.4
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20180112/30b2dc12/attachment-0002.html>


More information about the Openembedded-core mailing list