All of lore.kernel.org
 help / color / mirror / Atom feed
* [morty][PATCH] kernelsrc/perf: fix dependency on non existant task when using externalsrc
@ 2018-01-11 16:07 Stefan Stanacar
  2018-01-11 16:07 ` [morty][PATCH] kernel.bbclass: Fix symlink creation " Stefan Stanacar
  2018-01-12 16:21 ` [morty][PATCH] kernelsrc/perf: fix dependency on non existant task " Joshua Watt
  0 siblings, 2 replies; 7+ messages in thread
From: Stefan Stanacar @ 2018-01-11 16:07 UTC (permalink / raw)
  To: openembedded-core

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@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"
 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



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [morty][PATCH] kernel.bbclass: Fix symlink creation when using externalsrc
  2018-01-11 16:07 [morty][PATCH] kernelsrc/perf: fix dependency on non existant task when using externalsrc Stefan Stanacar
@ 2018-01-11 16:07 ` Stefan Stanacar
  2018-01-17 19:04   ` akuster808
  2018-01-12 16:21 ` [morty][PATCH] kernelsrc/perf: fix dependency on non existant task " Joshua Watt
  1 sibling, 1 reply; 7+ messages in thread
From: Stefan Stanacar @ 2018-01-11 16:07 UTC (permalink / raw)
  To: openembedded-core

do_unpack is by default in SRCTREECOVEREDTASKS so this append can't run, since
this tasks gets removed by externalsrc when it's enabled.

However this was hidden because externalsrc does run do_fetch and do_unpack if
there are type=kmeta or file:// entries in the SRC_URI value of the kernel recipe.
(e.g linux-yocto).

Make this a separate task so that it actually gets run for kernel recipes with
no file:// or type=kmeta in SRC_URI.

Signed-off-by: Stefan Stanacar <sstncr@gmail.com>
---
 meta/classes/kernel.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index f8318b8..3eaae03 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -102,7 +102,7 @@ inherit ${KERNEL_CLASSES}
 # the symlink.
 do_unpack[cleandirs] += " ${S} ${STAGING_KERNEL_DIR} ${B} ${STAGING_KERNEL_BUILDDIR}"
 do_clean[cleandirs] += " ${S} ${STAGING_KERNEL_DIR} ${B} ${STAGING_KERNEL_BUILDDIR}"
-base_do_unpack_append () {
+python do_symlink_staging_dir () {
     s = d.getVar("S", True)
     if s[-1] == '/':
         # drop trailing slash, so that os.symlink(kernsrc, s) doesn't use s as directory name and fail
@@ -119,6 +119,8 @@ base_do_unpack_append () {
             shutil.move(s, kernsrc)
             os.symlink(kernsrc, s)
 }
+addtask do_symlink_staging_dir after do_unpack before do_patch do_configure
+
 
 inherit kernel-arch deploy
 
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [morty][PATCH] kernelsrc/perf: fix dependency on non existant task when using externalsrc
  2018-01-11 16:07 [morty][PATCH] kernelsrc/perf: fix dependency on non existant task when using externalsrc Stefan Stanacar
  2018-01-11 16:07 ` [morty][PATCH] kernel.bbclass: Fix symlink creation " Stefan Stanacar
@ 2018-01-12 16:21 ` Joshua Watt
  2018-01-12 17:01   ` Stefan Stanacar
  1 sibling, 1 reply; 7+ messages in thread
From: Joshua Watt @ 2018-01-12 16:21 UTC (permalink / raw)
  To: Stefan Stanacar, openembedded-core

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@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.

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
> 


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [morty][PATCH] kernelsrc/perf: fix dependency on non existant task when using externalsrc
  2018-01-12 16:21 ` [morty][PATCH] kernelsrc/perf: fix dependency on non existant task " Joshua Watt
@ 2018-01-12 17:01   ` Stefan Stanacar
  0 siblings, 0 replies; 7+ messages in thread
From: Stefan Stanacar @ 2018-01-12 17:01 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 3161 bytes --]

On Fri, Jan 12, 2018 at 6:21 PM, Joshua Watt <jpewhacker@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@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
> >
>

[-- Attachment #2: Type: text/html, Size: 4924 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [morty][PATCH] kernel.bbclass: Fix symlink creation when using externalsrc
  2018-01-11 16:07 ` [morty][PATCH] kernel.bbclass: Fix symlink creation " Stefan Stanacar
@ 2018-01-17 19:04   ` akuster808
  2018-01-18 16:41     ` Stefan Stanacar
  0 siblings, 1 reply; 7+ messages in thread
From: akuster808 @ 2018-01-17 19:04 UTC (permalink / raw)
  To: Stefan Stanacar, openembedded-core



On 01/11/2018 08:07 AM, Stefan Stanacar wrote:
> do_unpack is by default in SRCTREECOVEREDTASKS so this append can't run, since
> this tasks gets removed by externalsrc when it's enabled.
>
> However this was hidden because externalsrc does run do_fetch and do_unpack if
> there are type=kmeta or file:// entries in the SRC_URI value of the kernel recipe.
> (e.g linux-yocto).
>
> Make this a separate task so that it actually gets run for kernel recipes with
> no file:// or type=kmeta in SRC_URI.

Is this fixed in Master?

- armin
> Signed-off-by: Stefan Stanacar <sstncr@gmail.com>
> ---
>  meta/classes/kernel.bbclass | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index f8318b8..3eaae03 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -102,7 +102,7 @@ inherit ${KERNEL_CLASSES}
>  # the symlink.
>  do_unpack[cleandirs] += " ${S} ${STAGING_KERNEL_DIR} ${B} ${STAGING_KERNEL_BUILDDIR}"
>  do_clean[cleandirs] += " ${S} ${STAGING_KERNEL_DIR} ${B} ${STAGING_KERNEL_BUILDDIR}"
> -base_do_unpack_append () {
> +python do_symlink_staging_dir () {
>      s = d.getVar("S", True)
>      if s[-1] == '/':
>          # drop trailing slash, so that os.symlink(kernsrc, s) doesn't use s as directory name and fail
> @@ -119,6 +119,8 @@ base_do_unpack_append () {
>              shutil.move(s, kernsrc)
>              os.symlink(kernsrc, s)
>  }
> +addtask do_symlink_staging_dir after do_unpack before do_patch do_configure
> +
>  
>  inherit kernel-arch deploy
>  



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [morty][PATCH] kernel.bbclass: Fix symlink creation when using externalsrc
  2018-01-17 19:04   ` akuster808
@ 2018-01-18 16:41     ` Stefan Stanacar
  0 siblings, 0 replies; 7+ messages in thread
From: Stefan Stanacar @ 2018-01-18 16:41 UTC (permalink / raw)
  To: akuster808; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1999 bytes --]

On Wed, Jan 17, 2018 at 9:04 PM, akuster808 <akuster808@gmail.com> wrote:

>
>
> On 01/11/2018 08:07 AM, Stefan Stanacar wrote:
> > do_unpack is by default in SRCTREECOVEREDTASKS so this append can't run,
> since
> > this tasks gets removed by externalsrc when it's enabled.
> >
> > However this was hidden because externalsrc does run do_fetch and
> do_unpack if
> > there are type=kmeta or file:// entries in the SRC_URI value of the
> kernel recipe.
> > (e.g linux-yocto).
> >
> > Make this a separate task so that it actually gets run for kernel
> recipes with
> > no file:// or type=kmeta in SRC_URI.
>
> Is this fixed in Master?
>
>
Nope, I've sent a patch for master as well:
http://lists.openembedded.org/pipermail/openembedded-core/2018-January/146355.html
but it wasn't merged (yet?)

Cheers,
Stefan


> - armin
> > Signed-off-by: Stefan Stanacar <sstncr@gmail.com>
> > ---
> >  meta/classes/kernel.bbclass | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> > index f8318b8..3eaae03 100644
> > --- a/meta/classes/kernel.bbclass
> > +++ b/meta/classes/kernel.bbclass
> > @@ -102,7 +102,7 @@ inherit ${KERNEL_CLASSES}
> >  # the symlink.
> >  do_unpack[cleandirs] += " ${S} ${STAGING_KERNEL_DIR} ${B}
> ${STAGING_KERNEL_BUILDDIR}"
> >  do_clean[cleandirs] += " ${S} ${STAGING_KERNEL_DIR} ${B}
> ${STAGING_KERNEL_BUILDDIR}"
> > -base_do_unpack_append () {
> > +python do_symlink_staging_dir () {
> >      s = d.getVar("S", True)
> >      if s[-1] == '/':
> >          # drop trailing slash, so that os.symlink(kernsrc, s) doesn't
> use s as directory name and fail
> > @@ -119,6 +119,8 @@ base_do_unpack_append () {
> >              shutil.move(s, kernsrc)
> >              os.symlink(kernsrc, s)
> >  }
> > +addtask do_symlink_staging_dir after do_unpack before do_patch
> do_configure
> > +
> >
> >  inherit kernel-arch deploy
> >
>
>

[-- Attachment #2: Type: text/html, Size: 2919 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [morty][PATCH] kernelsrc/perf: fix dependency on non existant task when using externalsrc
@ 2018-01-29 14:39 Stefan Stanacar
  0 siblings, 0 replies; 7+ messages in thread
From: Stefan Stanacar @ 2018-01-29 14:39 UTC (permalink / raw)
  To: openembedded-core

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@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"
 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



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-01-29 14:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-11 16:07 [morty][PATCH] kernelsrc/perf: fix dependency on non existant task when using externalsrc Stefan Stanacar
2018-01-11 16:07 ` [morty][PATCH] kernel.bbclass: Fix symlink creation " Stefan Stanacar
2018-01-17 19:04   ` akuster808
2018-01-18 16:41     ` Stefan Stanacar
2018-01-12 16:21 ` [morty][PATCH] kernelsrc/perf: fix dependency on non existant task " Joshua Watt
2018-01-12 17:01   ` Stefan Stanacar
2018-01-29 14:39 Stefan Stanacar

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.