Patchwork [1/1] image.bbclass: add ROOTFS_POSTPROCESS_COMMAND to rootfs[vardeps]

login
register
mail settings
Submitter Roxana
Date July 9, 2014, 9:08 a.m.
Message ID <fc1e780d3862d570820104c388a20e2b6d832c89.1404896873.git.roxana.ciobanu@intel.com>
Download mbox | patch
Permalink /patch/75227/
State New
Headers show

Comments

Roxana - July 9, 2014, 9:08 a.m.
Changes to ROOTFS_POSTPROCESS_COMMAND require the rootfs
    for the image to be rebuilt.

    [YOCTO #6502]

Signed-off-by: Roxana Ciobanu <roxana.ciobanu@intel.com>
---
 meta/classes/image.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Richard Purdie - July 9, 2014, 8:42 p.m.
On Wed, 2014-07-09 at 12:08 +0300, Roxana Ciobanu wrote:
>     Changes to ROOTFS_POSTPROCESS_COMMAND require the rootfs
>     for the image to be rebuilt.
> 
>     [YOCTO #6502]
> 
> Signed-off-by: Roxana Ciobanu <roxana.ciobanu@intel.com>
> ---
>  meta/classes/image.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> index a03b880..e088bdb 100644
> --- a/meta/classes/image.bbclass
> +++ b/meta/classes/image.bbclass
> @@ -75,7 +75,7 @@ LDCONFIGDEPEND_libc-musl = ""
>  do_rootfs[depends] += "makedevs-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot ${LDCONFIGDEPEND}"
>  do_rootfs[depends] += "virtual/update-alternatives-native:do_populate_sysroot update-rc.d-native:do_populate_sysroot"
>  do_rootfs[recrdeptask] += "do_packagedata"
> -do_rootfs[vardeps] += "BAD_RECOMMENDATIONS NO_RECOMMENDATIONS"
> +do_rootfs[vardeps] += "BAD_RECOMMENDATIONS NO_RECOMMENDATIONS ROOTFS_POSTPROCESS_COMMAND"
>  
>  do_build[depends] += "virtual/kernel:do_deploy"

Are there other variables we look at in the rootfs process we also need
to list here?

As background, the move to lib/oe has moved the variables outside the
scope of bitbake's function parsing code so we need to handle that
manually now...

Cheers,

Richard
Jacob Kroon - July 13, 2014, 11:48 p.m.
On Wed, 9 Jul 2014, Richard Purdie wrote:

> On Wed, 2014-07-09 at 12:08 +0300, Roxana Ciobanu wrote:
>>     Changes to ROOTFS_POSTPROCESS_COMMAND require the rootfs
>>     for the image to be rebuilt.
>>
>>     [YOCTO #6502]
>>
>> Signed-off-by: Roxana Ciobanu <roxana.ciobanu@intel.com>
>> ---
>>  meta/classes/image.bbclass | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
>> index a03b880..e088bdb 100644
>> --- a/meta/classes/image.bbclass
>> +++ b/meta/classes/image.bbclass
>> @@ -75,7 +75,7 @@ LDCONFIGDEPEND_libc-musl = ""
>>  do_rootfs[depends] += "makedevs-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot ${LDCONFIGDEPEND}"
>>  do_rootfs[depends] += "virtual/update-alternatives-native:do_populate_sysroot update-rc.d-native:do_populate_sysroot"
>>  do_rootfs[recrdeptask] += "do_packagedata"
>> -do_rootfs[vardeps] += "BAD_RECOMMENDATIONS NO_RECOMMENDATIONS"
>> +do_rootfs[vardeps] += "BAD_RECOMMENDATIONS NO_RECOMMENDATIONS ROOTFS_POSTPROCESS_COMMAND"
>>
>>  do_build[depends] += "virtual/kernel:do_deploy"
>
> Are there other variables we look at in the rootfs process we also need
> to list here?
>
> As background, the move to lib/oe has moved the variables outside the
> scope of bitbake's function parsing code so we need to handle that
> manually now...
>

I was hit by this recently, and talked to kergoth on IRC about it.
As he suggested, perhaps we should also do

ROOTFS_POSTPROCESS_COMMAND[func] = "1"

to inform bitbake that it is a shell script, so that it invokes its 
shell dependency parsing. I would guess most people add a function, 
and append this to ROOTFS_POSTPROCESS_COMMAND. Without marking it as a 
function, changes in the actual function body would not trigger rootfs 
rebuilds.

/Jacob

Patch

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index a03b880..e088bdb 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -75,7 +75,7 @@  LDCONFIGDEPEND_libc-musl = ""
 do_rootfs[depends] += "makedevs-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot ${LDCONFIGDEPEND}"
 do_rootfs[depends] += "virtual/update-alternatives-native:do_populate_sysroot update-rc.d-native:do_populate_sysroot"
 do_rootfs[recrdeptask] += "do_packagedata"
-do_rootfs[vardeps] += "BAD_RECOMMENDATIONS NO_RECOMMENDATIONS"
+do_rootfs[vardeps] += "BAD_RECOMMENDATIONS NO_RECOMMENDATIONS ROOTFS_POSTPROCESS_COMMAND"
 
 do_build[depends] += "virtual/kernel:do_deploy"