diff mbox series

license.bbclass: prefere plus singnal over append on IMAGE_CLASSES

Message ID 20231030180413.553254-1-jose.quaresma@foundries.io
State New
Headers show
Series license.bbclass: prefere plus singnal over append on IMAGE_CLASSES | expand

Commit Message

Jose Quaresma Oct. 30, 2023, 6:04 p.m. UTC
The append override is much harder to remove so chnage that.

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
---
 meta/classes-global/license.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Khem Raj Oct. 30, 2023, 6:17 p.m. UTC | #1
On Mon, Oct 30, 2023 at 11:04 AM Jose Quaresma <quaresma.jose@gmail.com> wrote:
>
> The append override is much harder to remove so chnage that.

typo in 'change'
however, I think one can do :remove op to remove it intentionally,
with this change it will
need to be redefined by user who is using license bbclass explicitly,
which is less intuitive.

>
> Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
> ---
>  meta/classes-global/license.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes-global/license.bbclass b/meta/classes-global/license.bbclass
> index b2e0d3faba..b915d39acd 100644
> --- a/meta/classes-global/license.bbclass
> +++ b/meta/classes-global/license.bbclass
> @@ -418,7 +418,7 @@ SSTATETASKS += "do_populate_lic"
>  do_populate_lic[sstate-inputdirs] = "${LICSSTATEDIR}"
>  do_populate_lic[sstate-outputdirs] = "${LICENSE_DIRECTORY}/"
>
> -IMAGE_CLASSES:append = " license_image"
> +IMAGE_CLASSES += "license_image"
>
>  python do_populate_lic_setscene () {
>      sstate_setscene(d)
> --
> 2.42.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#189804): https://lists.openembedded.org/g/openembedded-core/message/189804
> Mute This Topic: https://lists.openembedded.org/mt/102281098/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Jose Quaresma Oct. 30, 2023, 6:53 p.m. UTC | #2
Khem Raj <raj.khem@gmail.com> escreveu no dia segunda, 30/10/2023 à(s)
18:18:

> On Mon, Oct 30, 2023 at 11:04 AM Jose Quaresma <quaresma.jose@gmail.com>
> wrote:
> >
> > The append override is much harder to remove so chnage that.
>
> typo in 'change'
> however, I think one can do :remove op to remove it intentionally,
> with this change it will
> need to be redefined by user who is using license bbclass explicitly,
> which is less intuitive.
>

The :remove is still possible to use and work as before.
One side effect of this patch is the order on IMAGE_CLASSES
where license_image can go from one of the last to one of the first
as well as what you pointed out of redefining the IMAGE_CLASSES.
However this change is not critical at all and can be discarded,
the main reason was because there has been some effort to use + instead of
the :append

Jose



>
> >
> > Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
> > ---
> >  meta/classes-global/license.bbclass | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meta/classes-global/license.bbclass
> b/meta/classes-global/license.bbclass
> > index b2e0d3faba..b915d39acd 100644
> > --- a/meta/classes-global/license.bbclass
> > +++ b/meta/classes-global/license.bbclass
> > @@ -418,7 +418,7 @@ SSTATETASKS += "do_populate_lic"
> >  do_populate_lic[sstate-inputdirs] = "${LICSSTATEDIR}"
> >  do_populate_lic[sstate-outputdirs] = "${LICENSE_DIRECTORY}/"
> >
> > -IMAGE_CLASSES:append = " license_image"
> > +IMAGE_CLASSES += "license_image"
> >
> >  python do_populate_lic_setscene () {
> >      sstate_setscene(d)
> > --
> > 2.42.0
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#189804):
> https://lists.openembedded.org/g/openembedded-core/message/189804
> > Mute This Topic: https://lists.openembedded.org/mt/102281098/1997914
> > Group Owner: openembedded-core+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> raj.khem@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
>
diff mbox series

Patch

diff --git a/meta/classes-global/license.bbclass b/meta/classes-global/license.bbclass
index b2e0d3faba..b915d39acd 100644
--- a/meta/classes-global/license.bbclass
+++ b/meta/classes-global/license.bbclass
@@ -418,7 +418,7 @@  SSTATETASKS += "do_populate_lic"
 do_populate_lic[sstate-inputdirs] = "${LICSSTATEDIR}"
 do_populate_lic[sstate-outputdirs] = "${LICENSE_DIRECTORY}/"
 
-IMAGE_CLASSES:append = " license_image"
+IMAGE_CLASSES += "license_image"
 
 python do_populate_lic_setscene () {
     sstate_setscene(d)