Skip to contentSkip to conversation

license.bbclass: set do_bootimg recrdeptask on do_populate_lic

PATCH In review [email protected] 2 participants 5 messages Feb 15, 2018 – Feb 16, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 license.bbclass: set do_bootimg recrdeptask on do_populate_lic

From: Ming Liu <[email protected]>

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

---
 meta/classes/license.bbclass | 1 +
 1 file changed, 1 insertion(+)
meta/classes/license.bbclass +1 -0
index d353110..10d2279 100644
@@ -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)
Signature · 1 line
2.7.4
#1 lore raw
Quoted 16 lines · On Thu, 2018-02-15 at 13:49 +0100, [email protected] wrote:

From: Ming Liu <[email protected]>

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

---
 meta/classes/license.bbclass | 1 +

 1 file changed, 1 insertion(+)
meta/classes/license.bbclass +0 -0
index d353110..10d2279 100644
@@ -679,6 +679,7 @@ do_rootfs[recrdeptask] += "do_populate_lic"
Quoted 7 lines


 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

author
#2 lore raw

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 <
[email protected]>:

Quoted 36 lines · On Thu, 2018-02-15 at 13:49 +0100, [email protected] wrote:
Quoted 16 lines

From: Ming Liu <[email protected]>

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

---
 meta/classes/license.bbclass | 1 +
 1 file changed, 1 insertion(+)
meta/classes/license.bbclass +0 -0
index d353110..10d2279 100644

meta/classes/license.bbclass do_rootfs[recrdeptask] += "do_populate_lic" · line 685

Quoted 7 lines
meta/classes/license.bbclass +1 -0
@@ -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

#3 lore raw
Quoted 8 lines · Ming Liu

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

author
#4 lore raw

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 <
[email protected]>:

Quoted 45 lines · Ming Liu
Quoted 8 lines

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