All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] license.bbclass: set do_bootimg recrdeptask on do_populate_lic
@ 2018-02-15 12:49 liu.ming50
  2018-02-15 13:34 ` Richard Purdie
  0 siblings, 1 reply; 5+ messages in thread
From: liu.ming50 @ 2018-02-15 12:49 UTC (permalink / raw)
  To: openembedded-core; +Cc: Ming Liu

From: Ming Liu <liu.ming50@gmail.com>

This is needed since the license_deployed_manifest task is referring
the deployed licenses of the depends of do_bootimg task.

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
---
 meta/classes/license.bbclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index d353110..10d2279 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -679,6 +679,7 @@ do_rootfs[recrdeptask] += "do_populate_lic"
 
 IMAGE_POSTPROCESS_COMMAND_prepend = "write_deploy_manifest; "
 do_image[recrdeptask] += "do_populate_lic"
+do_bootimg[recrdeptask] += "do_populate_lic"
 
 python do_populate_lic_setscene () {
     sstate_setscene(d)
-- 
2.7.4



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

* Re: [PATCH] license.bbclass: set do_bootimg recrdeptask on do_populate_lic
  2018-02-15 12:49 [PATCH] license.bbclass: set do_bootimg recrdeptask on do_populate_lic liu.ming50
@ 2018-02-15 13:34 ` Richard Purdie
  2018-02-15 14:11   ` Ming Liu
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Purdie @ 2018-02-15 13:34 UTC (permalink / raw)
  To: liu.ming50, openembedded-core

On Thu, 2018-02-15 at 13:49 +0100, liu.ming50@gmail.com wrote:
> From: Ming Liu <liu.ming50@gmail.com>
> 
> This is needed since the license_deployed_manifest task is referring
> the deployed licenses of the depends of do_bootimg task.
> 
> Signed-off-by: Ming Liu <liu.ming50@gmail.com>
> ---
>  meta/classes/license.bbclass | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/meta/classes/license.bbclass
> b/meta/classes/license.bbclass
> index d353110..10d2279 100644
> --- a/meta/classes/license.bbclass
> +++ b/meta/classes/license.bbclass
> @@ -679,6 +679,7 @@ do_rootfs[recrdeptask] += "do_populate_lic"
>  
>  IMAGE_POSTPROCESS_COMMAND_prepend = "write_deploy_manifest; "
>  do_image[recrdeptask] += "do_populate_lic"
> +do_bootimg[recrdeptask] += "do_populate_lic"
>  
>  python do_populate_lic_setscene () {
>      sstate_setscene(d)

How old is this patch?

The recrdepends handling in bitbake changed recently and these kind of
older issues may have been a bitbake bug. Can you describe a test
scenario and check if master still needs this "fix"?

Cheers,

Richard



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

* Re: [PATCH] license.bbclass: set do_bootimg recrdeptask on do_populate_lic
  2018-02-15 13:34 ` Richard Purdie
@ 2018-02-15 14:11   ` Ming Liu
  2018-02-15 15:07     ` Richard Purdie
  0 siblings, 1 reply; 5+ messages in thread
From: Ming Liu @ 2018-02-15 14:11 UTC (permalink / raw)
  To: Richard Purdie; +Cc: OE-core

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

Hi, Richard:

I observed this issue on rocko branch, but I think upstream also needs it.
Since even recrdepends handling had been changed in bitbake, the problem
here is the "recrdepends" is missing between do_bootimg and do_populate_lic,
actually there was a bug record for it, see:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=9446, but the fix only
considered the missing recrdepends of do_image, but looking
into get_deployed_dependencies->get_boot_dependencies, the do_bootimg also
needs a similar fix.

//Ming Liu

2018-02-15 14:34 GMT+01:00 Richard Purdie <
richard.purdie@linuxfoundation.org>:

> On Thu, 2018-02-15 at 13:49 +0100, liu.ming50@gmail.com wrote:
> > From: Ming Liu <liu.ming50@gmail.com>
> >
> > This is needed since the license_deployed_manifest task is referring
> > the deployed licenses of the depends of do_bootimg task.
> >
> > Signed-off-by: Ming Liu <liu.ming50@gmail.com>
> > ---
> >  meta/classes/license.bbclass | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/meta/classes/license.bbclass
> > b/meta/classes/license.bbclass
> > index d353110..10d2279 100644
> > --- a/meta/classes/license.bbclass
> > +++ b/meta/classes/license.bbclass
> > @@ -679,6 +679,7 @@ do_rootfs[recrdeptask] += "do_populate_lic"
> >
> >  IMAGE_POSTPROCESS_COMMAND_prepend = "write_deploy_manifest; "
> >  do_image[recrdeptask] += "do_populate_lic"
> > +do_bootimg[recrdeptask] += "do_populate_lic"
> >
> >  python do_populate_lic_setscene () {
> >      sstate_setscene(d)
>
> How old is this patch?
>
> The recrdepends handling in bitbake changed recently and these kind of
> older issues may have been a bitbake bug. Can you describe a test
> scenario and check if master still needs this "fix"?
>
> Cheers,
>
> Richard
>
>

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

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

* Re: [PATCH] license.bbclass: set do_bootimg recrdeptask on do_populate_lic
  2018-02-15 14:11   ` Ming Liu
@ 2018-02-15 15:07     ` Richard Purdie
  2018-02-16 12:50       ` Ming Liu
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Purdie @ 2018-02-15 15:07 UTC (permalink / raw)
  To: Ming Liu; +Cc: OE-core

On Thu, 2018-02-15 at 15:11 +0100, Ming Liu wrote:
> I observed this issue on rocko branch, but I think upstream also
> needs it. Since even recrdepends handling had been changed in
> bitbake, the problem here is the "recrdepends" is missing between
> do_bootimg and do_populate_lic, actually there was a bug record for
> it, see: https://bugzilla.yoctoproject.org/show_bug.cgi?id=9446, but
> the fix only considered the missing recrdepends of do_image, but
> looking into get_deployed_dependencies->get_boot_dependencies, the
> do_bootimg also needs a similar fix.

I've looked at this and this patch is not appropriate to be merged, its
a hack, piled on top of other hacks which still don't actually solve
the real problem.

do_bootimg is added before do_image_complete, after do_image, along
with a number of other image processing tasks. Either:

a) license.bbclass requires the do_image dependencies for license
processing.

b) license.bbclass requires the do_image_complete dependencies and
includes the tools used to produce the image.

There is no "in between" state. Creating some kind of mismash of
including some image tasks in the dependency list is simply not
appropriate, its defined as one or the other.

There is already "get_boot_dependencies" in license.bbclass which sets
of alarm bells. Your problem is clearly that you're not getting the
dependencies recursively.

Also, the license deploy manifest creation step is based on do_image
time, *not* do_image_complete. Its thereby defined as the manifest of
the things *in* the image, not the tools used to build the image.
Perhaps it should be at do_image_complete? If it were we might be able
to drop some of these other hacks too...

Cheers,

Richard






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

* Re: [PATCH] license.bbclass: set do_bootimg recrdeptask on do_populate_lic
  2018-02-15 15:07     ` Richard Purdie
@ 2018-02-16 12:50       ` Ming Liu
  0 siblings, 0 replies; 5+ messages in thread
From: Ming Liu @ 2018-02-16 12:50 UTC (permalink / raw)
  To: Richard Purdie; +Cc: OE-core

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

Hi, Richard:

I think the license deploy manifests should be at do_image_complete, since
it not only deal with package licenses, but also licenses of deployed
tools, like u-boot, and so on. So do you think if we set:

do_image_complete[recrdeptask] += "do_populate_lic"

would help fix the problem?

//Ming Liu


2018-02-15 16:07 GMT+01:00 Richard Purdie <
richard.purdie@linuxfoundation.org>:

> On Thu, 2018-02-15 at 15:11 +0100, Ming Liu wrote:
> > I observed this issue on rocko branch, but I think upstream also
> > needs it. Since even recrdepends handling had been changed in
> > bitbake, the problem here is the "recrdepends" is missing between
> > do_bootimg and do_populate_lic, actually there was a bug record for
> > it, see: https://bugzilla.yoctoproject.org/show_bug.cgi?id=9446, but
> > the fix only considered the missing recrdepends of do_image, but
> > looking into get_deployed_dependencies->get_boot_dependencies, the
> > do_bootimg also needs a similar fix.
>
> I've looked at this and this patch is not appropriate to be merged, its
> a hack, piled on top of other hacks which still don't actually solve
> the real problem.
>
> do_bootimg is added before do_image_complete, after do_image, along
> with a number of other image processing tasks. Either:
>
> a) license.bbclass requires the do_image dependencies for license
> processing.
>
> b) license.bbclass requires the do_image_complete dependencies and
> includes the tools used to produce the image.
>
> There is no "in between" state. Creating some kind of mismash of
> including some image tasks in the dependency list is simply not
> appropriate, its defined as one or the other.
>
> There is already "get_boot_dependencies" in license.bbclass which sets
> of alarm bells. Your problem is clearly that you're not getting the
> dependencies recursively.
>
> Also, the license deploy manifest creation step is based on do_image
> time, *not* do_image_complete. Its thereby defined as the manifest of
> the things *in* the image, not the tools used to build the image.
> Perhaps it should be at do_image_complete? If it were we might be able
> to drop some of these other hacks too...
>
> Cheers,
>
> Richard
>
>
>
>
>

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

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

end of thread, other threads:[~2018-02-16 12:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-15 12:49 [PATCH] license.bbclass: set do_bootimg recrdeptask on do_populate_lic liu.ming50
2018-02-15 13:34 ` Richard Purdie
2018-02-15 14:11   ` Ming Liu
2018-02-15 15:07     ` Richard Purdie
2018-02-16 12:50       ` Ming Liu

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.