Skip to contentSkip to conversation

qemu.inc: Use '=' for IMAGE_FSTYPES

PATCH Superseded Tom Rini 5 participants 11 messages Mar 23, 2012 – Mar 29, 2012

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 qemu.inc: Use '=' for IMAGE_FSTYPES

As per
http://lists.linuxtogo.org/pipermail/openembedded-core/2012-March/019772.html
a machine conf file should use '=' to set IMAGE_FSTYPES.

---
 meta/conf/machine/include/qemu.inc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
meta/conf/machine/include/qemu.inc +1 -1
index 10ab76e..b613287 100644
@@ -3,7 +3,7 @@ PREFERRED_PROVIDER_virtual/xserver ?= "xserver-kdrive"
 
 MACHINE_FEATURES = "apm alsa pcmcia bluetooth irda usbgadget screen"
 
-IMAGE_FSTYPES ?= "tar.bz2 ext3"
+IMAGE_FSTYPES = "tar.bz2 ext3"
 
 ROOT_FLASH_SIZE = "280"
 
Signature · 1 line
1.7.0.4
#1 lore raw
Quoted 8 lines · Tom Rini

As per
http://lists.linuxtogo.org/pipermail/openembedded-core/2012-March/019772.html
a machine conf file should use '=' to set IMAGE_FSTYPES.

---
 meta/conf/machine/include/qemu.inc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

As someone pointed out, what I mentioned in that email sadly doesn't work although it would be nice if they did. I suspect this is why we're using += since:

Quoted 1 line

- The machine needs to say 'I need or support the following formats'

so the machine ensures those formats exist at a minimum:

IMAGE_FSTYPES += "xxxx"

Quoted 1 line

- The distro needs to say 'I always want format X'

so the distro can do:

IMAGE_FSTYPES += " yyy"

Quoted 1 line

- The user needs to say 'I know best, give me only format X'

This one is the problem case so the user has to use overrides:

IMAGE_FSTYPES_override = "X"

(where override can be MACHINE or forcevariable)

Quoted 1 line

- The user needs to say 'I know best, give me what you support + X'

IMAGE_FSTYPES += " X"

Whilst I think that is less than ideal since it forces use of overrides in local.conf to override, changing the += in machine conf files doesn't gain us much, it just breaks += in local.conf.

I'm open to other feedback though...

Cheers,

Richard

#2 lore raw
Quoted 5 lines · Richard Purdie
Quoted 4 lines · Tom Rini

As per
http://lists.linuxtogo.org/pipermail/openembedded-core/2012-March/019772.html
a machine conf file should use '=' to set IMAGE_FSTYPES.

Quoted 8 lines
Quoted 4 lines
---
 meta/conf/machine/include/qemu.inc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

As someone pointed out, what I mentioned in that email sadly doesn't work although it would be nice if they did. I suspect this is why we're using += since:

We aren't using += today. We (openembedded-core) use ?=. meta-intel uses += and meta-ti is mixed (and I don't have meta-fsl-* handy).

Quoted 22 lines
Quoted 1 line

- The machine needs to say 'I need or support the following formats'

so the machine ensures those formats exist at a minimum:

IMAGE_FSTYPES += "xxxx"

Quoted 1 line

- The distro needs to say 'I always want format X'

so the distro can do:

IMAGE_FSTYPES += " yyy"

Quoted 1 line

- The user needs to say 'I know best, give me only format X'

This one is the problem case so the user has to use overrides:

IMAGE_FSTYPES_override = "X"

(where override can be MACHINE or forcevariable)

Quoted 1 line

- The user needs to say 'I know best, give me what you support + X'

Quoted 8 lines

IMAGE_FSTYPES += " X"

Whilst I think that is less than ideal since it forces use of overrides in local.conf to override, changing the += in machine conf files doesn't gain us much, it just breaks += in local.conf.

I'm open to other feedback though...

Well, I suggested ??= / ?= and posted some results from bitbake -e...

Signature · 1 line
Tom
#3 lore raw
Quoted 43 lines · Tom Rini
Quoted 5 lines · Richard Purdie
Quoted 4 lines · Tom Rini

As per
http://lists.linuxtogo.org/pipermail/openembedded-core/2012-March/019772.html
a machine conf file should use '=' to set IMAGE_FSTYPES.

Quoted 8 lines
Quoted 4 lines
---
 meta/conf/machine/include/qemu.inc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

As someone pointed out, what I mentioned in that email sadly doesn't work although it would be nice if they did. I suspect this is why we're using += since:

We aren't using += today. We (openembedded-core) use ?=. meta-intel uses += and meta-ti is mixed (and I don't have meta-fsl-* handy).

Quoted 25 lines
Quoted 1 line

- The machine needs to say 'I need or support the following formats'

so the machine ensures those formats exist at a minimum:

IMAGE_FSTYPES += "xxxx"

Quoted 1 line

- The distro needs to say 'I always want format X'

so the distro can do:

IMAGE_FSTYPES += " yyy"

Quoted 1 line

- The user needs to say 'I know best, give me only format X'

This one is the problem case so the user has to use overrides:

IMAGE_FSTYPES_override = "X"

(where override can be MACHINE or forcevariable)

Quoted 1 line

- The user needs to say 'I know best, give me what you support + X'

IMAGE_FSTYPES += " X"

Quoted 7 lines
Quoted 5 lines

Whilst I think that is less than ideal since it forces use of overrides in local.conf to override, changing the += in machine conf files doesn't gain us much, it just breaks += in local.conf.

I'm open to other feedback though...

Well, I suggested ??= / ?= and posted some results from bitbake -e...

Ok. += plays out as above. I realise its not what is in qemu.inc, it is used in meta-intel though which I looked at after qemu.inc and I guess has confused me.

With ?= in machine.conf:

The user defined IMAGE_FSTYPES would override the machine ones. Distro can still append to it. The downside is a user append would not work out as expected.

So the question is which is the more user expected behaviour?

=+ makes overwriting IMAGE_FSTYPES hard

?= makes appending IMAGE_FSTYPES hard

I suspect a user is more likely to want to append than overwrite. Getting an append to work with ?= is extremely non-obvious, even worse syntax than the =+ overwriting case with overrides.

So bottom line, I'm tempted to recommend we use =+.

Further thoughts?

Cheers,

Richard

#4 lore raw
Quoted 66 lines · Richard Purdie
Quoted 43 lines · Tom Rini
Quoted 5 lines · Richard Purdie
Quoted 4 lines · Tom Rini

As per
http://lists.linuxtogo.org/pipermail/openembedded-core/2012-March/019772.html
a machine conf file should use '=' to set IMAGE_FSTYPES.

Quoted 8 lines
Quoted 4 lines
---
 meta/conf/machine/include/qemu.inc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

As someone pointed out, what I mentioned in that email sadly doesn't work although it would be nice if they did. I suspect this is why we're using += since:

We aren't using += today. We (openembedded-core) use ?=. meta-intel uses += and meta-ti is mixed (and I don't have meta-fsl-* handy).

Quoted 25 lines
Quoted 1 line

- The machine needs to say 'I need or support the following formats'

so the machine ensures those formats exist at a minimum:

IMAGE_FSTYPES += "xxxx"

Quoted 1 line

- The distro needs to say 'I always want format X'

so the distro can do:

IMAGE_FSTYPES += " yyy"

Quoted 1 line

- The user needs to say 'I know best, give me only format X'

This one is the problem case so the user has to use overrides:

IMAGE_FSTYPES_override = "X"

(where override can be MACHINE or forcevariable)

Quoted 1 line

- The user needs to say 'I know best, give me what you support + X'

IMAGE_FSTYPES += " X"

Quoted 7 lines
Quoted 5 lines

Whilst I think that is less than ideal since it forces use of overrides in local.conf to override, changing the += in machine conf files doesn't gain us much, it just breaks += in local.conf.

I'm open to other feedback though...

Well, I suggested ??= / ?= and posted some results from bitbake -e...

Ok. += plays out as above. I realise its not what is in qemu.inc, it is used in meta-intel though which I looked at after qemu.inc and I guess has confused me.

With ?= in machine.conf:

The user defined IMAGE_FSTYPES would override the machine ones. Distro can still append to it. The downside is a user append would not work out as expected.

So the question is which is the more user expected behaviour?

=+ makes overwriting IMAGE_FSTYPES hard

Quoted 7 lines

?= makes appending IMAGE_FSTYPES hard

I suspect a user is more likely to want to append than overwrite. Getting an append to work with ?= is extremely non-obvious, even worse syntax than the =+ overwriting case with overrides.

So bottom line, I'm tempted to recommend we use =+.

I think for the upcoming release, =+ is good enough and we can talk about adding further variables after if it's still too complicated. So, now where's the repo that documenting these examples should go in?

Signature · 1 line
Tom
#5 lore raw
Quoted 5 lines · Tom Rini

I think for the upcoming release, =+ is good enough and we can talk about adding further variables after if it's still too complicated. So, now where's the repo that documenting these examples should go in?

You want to talk to Scott Rifenbark, on CC.

Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
#6 lore raw
In reply to Tom Rini
Quoted 73 lines · Tom Rini
Quoted 72 lines · Richard Purdie
Quoted 43 lines · Tom Rini
Quoted 5 lines · Richard Purdie
Quoted 4 lines · Tom Rini

As per
http://lists.linuxtogo.org/pipermail/openembedded-core/2012-March/019772.html
a machine conf file should use '=' to set IMAGE_FSTYPES.

Quoted 8 lines
Quoted 4 lines
---
 meta/conf/machine/include/qemu.inc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

As someone pointed out, what I mentioned in that email sadly doesn't work although it would be nice if they did. I suspect this is why we're using += since:

We aren't using += today. We (openembedded-core) use ?=. meta-intel uses += and meta-ti is mixed (and I don't have meta-fsl-* handy).

Quoted 25 lines
Quoted 1 line

- The machine needs to say 'I need or support the following formats'

so the machine ensures those formats exist at a minimum:

IMAGE_FSTYPES += "xxxx"

Quoted 1 line

- The distro needs to say 'I always want format X'

so the distro can do:

IMAGE_FSTYPES += " yyy"

Quoted 1 line

- The user needs to say 'I know best, give me only format X'

This one is the problem case so the user has to use overrides:

IMAGE_FSTYPES_override = "X"

(where override can be MACHINE or forcevariable)

Quoted 1 line

- The user needs to say 'I know best, give me what you support + X'

IMAGE_FSTYPES += " X"

Quoted 7 lines
Quoted 5 lines

Whilst I think that is less than ideal since it forces use of overrides in local.conf to override, changing the += in machine conf files doesn't gain us much, it just breaks += in local.conf.

I'm open to other feedback though...

Well, I suggested ??= / ?= and posted some results from bitbake -e...

Ok. += plays out as above. I realise its not what is in qemu.inc, it is used in meta-intel though which I looked at after qemu.inc and I guess has confused me.

With ?= in machine.conf:

The user defined IMAGE_FSTYPES would override the machine ones. Distro can still append to it. The downside is a user append would not work out as expected.

So the question is which is the more user expected behaviour?

=+ makes overwriting IMAGE_FSTYPES hard

?= makes appending IMAGE_FSTYPES hard

I suspect a user is more likely to want to append than overwrite. Getting an append to work with ?= is extremely non-obvious, even worse syntax than the =+ overwriting case with overrides.

Quoted 5 lines
Quoted 1 line

So bottom line, I'm tempted to recommend we use =+.

I think for the upcoming release, =+ is good enough and we can talk about adding further variables after if it's still too complicated. So, now where's the repo that documenting these examples should go in?

So, did we come full circle on this? :) Started here:
https://lists.yoctoproject.org/pipermail/meta-ti/2012-March/000779.html

I'm fine changing it for meta-ti, if we agree on a unified solution. Having an EXTRA/MACHINE var for that in the future might simplify things...

Signature · 1 line
Denys
#7 lore raw
In reply to Richard Purdie
Quoted 68 lines · Richard Purdie
Quoted 43 lines · Tom Rini
Quoted 5 lines · Richard Purdie
Quoted 4 lines · Tom Rini

As per
http://lists.linuxtogo.org/pipermail/openembedded-core/2012-March/019772.html
a machine conf file should use '=' to set IMAGE_FSTYPES.

Quoted 8 lines
Quoted 4 lines
---
 meta/conf/machine/include/qemu.inc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

As someone pointed out, what I mentioned in that email sadly doesn't work although it would be nice if they did. I suspect this is why we're using += since:

We aren't using += today. We (openembedded-core) use ?=. meta-intel uses += and meta-ti is mixed (and I don't have meta-fsl-* handy).

Quoted 25 lines
Quoted 1 line

- The machine needs to say 'I need or support the following formats'

so the machine ensures those formats exist at a minimum:

IMAGE_FSTYPES += "xxxx"

Quoted 1 line

- The distro needs to say 'I always want format X'

so the distro can do:

IMAGE_FSTYPES += " yyy"

Quoted 1 line

- The user needs to say 'I know best, give me only format X'

This one is the problem case so the user has to use overrides:

IMAGE_FSTYPES_override = "X"

(where override can be MACHINE or forcevariable)

Quoted 1 line

- The user needs to say 'I know best, give me what you support + X'

IMAGE_FSTYPES += " X"

Quoted 7 lines
Quoted 5 lines

Whilst I think that is less than ideal since it forces use of overrides in local.conf to override, changing the += in machine conf files doesn't gain us much, it just breaks += in local.conf.

I'm open to other feedback though...

Well, I suggested ??= / ?= and posted some results from bitbake -e...

Ok. += plays out as above. I realise its not what is in qemu.inc, it is used in meta-intel though which I looked at after qemu.inc and I guess has confused me.

With ?= in machine.conf:

The user defined IMAGE_FSTYPES would override the machine ones. Distro can still append to it. The downside is a user append would not work out as expected.

So the question is which is the more user expected behaviour?

=+ makes overwriting IMAGE_FSTYPES hard

?= makes appending IMAGE_FSTYPES hard

Quoted 7 lines

I suspect a user is more likely to want to append than overwrite. Getting an append to work with ?= is extremely non-obvious, even worse syntax than the =+ overwriting case with overrides.

So bottom line, I'm tempted to recommend we use =+.

Further thoughts?

Richard,

So, what is the subtle difference between += that we started with and =+ that you recommended at the end? I realize those are for append and prepend, but are they handled any different? Was your recommendation to use =+ at the end, instead of += that was used originally, based on some specifics? Thanks.

Signature · 1 line
Denys
#8 lore raw
Quoted 75 lines · Denys Dmytriyenko
Quoted 74 lines · Richard Purdie
Quoted 43 lines · Tom Rini
Quoted 5 lines · Richard Purdie
Quoted 4 lines · Tom Rini

As per
http://lists.linuxtogo.org/pipermail/openembedded-core/2012-March/019772.html
a machine conf file should use '=' to set IMAGE_FSTYPES.

Quoted 8 lines
Quoted 4 lines
---
 meta/conf/machine/include/qemu.inc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

As someone pointed out, what I mentioned in that email sadly doesn't work although it would be nice if they did. I suspect this is why we're using += since:

We aren't using += today. We (openembedded-core) use ?=. meta-intel uses += and meta-ti is mixed (and I don't have meta-fsl-* handy).

Quoted 25 lines
Quoted 1 line

- The machine needs to say 'I need or support the following formats'

so the machine ensures those formats exist at a minimum:

IMAGE_FSTYPES += "xxxx"

Quoted 1 line

- The distro needs to say 'I always want format X'

so the distro can do:

IMAGE_FSTYPES += " yyy"

Quoted 1 line

- The user needs to say 'I know best, give me only format X'

This one is the problem case so the user has to use overrides:

IMAGE_FSTYPES_override = "X"

(where override can be MACHINE or forcevariable)

Quoted 1 line

- The user needs to say 'I know best, give me what you support + X'

IMAGE_FSTYPES += " X"

Quoted 7 lines
Quoted 5 lines

Whilst I think that is less than ideal since it forces use of overrides in local.conf to override, changing the += in machine conf files doesn't gain us much, it just breaks += in local.conf.

I'm open to other feedback though...

Well, I suggested ??= / ?= and posted some results from bitbake -e...

Ok. += plays out as above. I realise its not what is in qemu.inc, it is used in meta-intel though which I looked at after qemu.inc and I guess has confused me.

With ?= in machine.conf:

The user defined IMAGE_FSTYPES would override the machine ones. Distro can still append to it. The downside is a user append would not work out as expected.

So the question is which is the more user expected behaviour?

=+ makes overwriting IMAGE_FSTYPES hard

?= makes appending IMAGE_FSTYPES hard

I suspect a user is more likely to want to append than overwrite. Getting an append to work with ?= is extremely non-obvious, even worse syntax than the =+ overwriting case with overrides.

So bottom line, I'm tempted to recommend we use =+.

Quoted 8 lines
Quoted 1 line

Further thoughts?

Richard,

So, what is the subtle difference between += that we started with and =+ that you recommended at the end? I realize those are for append and prepend, but are they handled any different? Was your recommendation to use =+ at the end, instead of += that was used originally, based on some specifics? Thanks.

I'm using += and =+ interchangeably. The contrast was with ?= which I argued against. Order in this case doesn't matter and I have no preference over += or =+, it simply doesn't matter.

Cheers,

Richard

#9 lore raw
Quoted 80 lines · Richard Purdie
Quoted 79 lines · Denys Dmytriyenko
Quoted 68 lines · Richard Purdie
Quoted 43 lines · Tom Rini
Quoted 5 lines · Richard Purdie
Quoted 4 lines · Tom Rini

As per
http://lists.linuxtogo.org/pipermail/openembedded-core/2012-March/019772.html
a machine conf file should use '=' to set IMAGE_FSTYPES.

Quoted 8 lines
Quoted 4 lines
---
 meta/conf/machine/include/qemu.inc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

As someone pointed out, what I mentioned in that email sadly doesn't work although it would be nice if they did. I suspect this is why we're using += since:

We aren't using += today. We (openembedded-core) use ?=. meta-intel uses += and meta-ti is mixed (and I don't have meta-fsl-* handy).

Quoted 25 lines
Quoted 1 line

- The machine needs to say 'I need or support the following formats'

so the machine ensures those formats exist at a minimum:

IMAGE_FSTYPES += "xxxx"

Quoted 1 line

- The distro needs to say 'I always want format X'

so the distro can do:

IMAGE_FSTYPES += " yyy"

Quoted 1 line

- The user needs to say 'I know best, give me only format X'

This one is the problem case so the user has to use overrides:

IMAGE_FSTYPES_override = "X"

(where override can be MACHINE or forcevariable)

Quoted 1 line

- The user needs to say 'I know best, give me what you support + X'

IMAGE_FSTYPES += " X"

Quoted 7 lines
Quoted 5 lines

Whilst I think that is less than ideal since it forces use of overrides in local.conf to override, changing the += in machine conf files doesn't gain us much, it just breaks += in local.conf.

I'm open to other feedback though...

Well, I suggested ??= / ?= and posted some results from bitbake -e...

Ok. += plays out as above. I realise its not what is in qemu.inc, it is used in meta-intel though which I looked at after qemu.inc and I guess has confused me.

With ?= in machine.conf:

The user defined IMAGE_FSTYPES would override the machine ones. Distro can still append to it. The downside is a user append would not work out as expected.

So the question is which is the more user expected behaviour?

=+ makes overwriting IMAGE_FSTYPES hard

?= makes appending IMAGE_FSTYPES hard

Quoted 7 lines

I suspect a user is more likely to want to append than overwrite. Getting an append to work with ?= is extremely non-obvious, even worse syntax than the =+ overwriting case with overrides.

So bottom line, I'm tempted to recommend we use =+.

Further thoughts?

Richard,

Quoted 8 lines
Quoted 4 lines

So, what is the subtle difference between += that we started with and =+ that you recommended at the end? I realize those are for append and prepend, but are they handled any different? Was your recommendation to use =+ at the end, instead of += that was used originally, based on some specifics? Thanks.

I'm using += and =+ interchangeably. The contrast was with ?= which I argued against. Order in this case doesn't matter and I have no preference over += or =+, it simply doesn't matter.

So I guess I'll spin everything one more time and drop the meta-intel version and we'll just use += since that's the common one.

Signature · 1 line
Tom
#10 lore raw
Quoted 9 lines · Tom Rini
Quoted 8 lines · Richard Purdie
Quoted 6 lines · Denys Dmytriyenko
Quoted 1 line · Richard Purdie

On Mon, 2012-03-26 at 09:25 -0700, Tom Rini wrote:

So, what is the subtle difference between += that we started with and =+ that you recommended at the end? I realize those are for append and prepend, but are they handled any different? Was your recommendation to use =+ at the end, instead of += that was used originally, based on some specifics? Thanks.

Quoted 6 lines
Quoted 3 lines

I'm using += and =+ interchangeably. The contrast was with ?= which I argued against. Order in this case doesn't matter and I have no preference over += or =+, it simply doesn't matter.

So I guess I'll spin everything one more time and drop the meta-intel version and we'll just use += since that's the common one.

Sounds good. Sorry about the churn on this one, I thought it was clear += and =+ were equivalent in this context.

Cheers,

Richard