Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IMAGE_FSTYPES should not use _append but ?= #61

Closed
dl9pf opened this issue Feb 22, 2018 · 12 comments
Closed

IMAGE_FSTYPES should not use _append but ?= #61

dl9pf opened this issue Feb 22, 2018 · 12 comments

Comments

@dl9pf
Copy link

dl9pf commented Feb 22, 2018

We should not _append to IMAGE_FSTYPES but use ?= to let the user choose the output format w/o us adding another item on-top (unconditionally).

The current setting of IMAGE_FSTYPES_append breaks initrd builds here.

@ndechesne
Copy link
Contributor

you might be right.. but ... several other BSP layers do similar things meta-ti, meta-intel and even meta-yocto-bsp.. so it's not very clear what we should do..

@dl9pf
Copy link
Author

dl9pf commented Feb 22, 2018

The problem is that _append will unconditionally add it to the IMAGE_FSTYPES.
Distros will have a hard time to specify their desired output image (if it is not the wic.gz for whatever reason).
In this particular case the _append gets even added for an initrd build (which has its own IMAGE_FSTYPE = "foo" in the recipe).

IIRC the last consent is that the BSP should not set those vars. You might have an accompanying meta-qcom-example layer as in this example: https://github.com/siemens/meta-iot2000 .

@dl9pf
Copy link
Author

dl9pf commented Mar 7, 2018

See #62 .
I think it is mainly the late processing of the _append that is causing this.

I think ?= should be used as a default.

Situation might be better if you do a IMAGE_FSTYPES += as this is not postprocessed and can be overridden easily by distros using your layer. We should try this.

This applies to
`
meta-qcom/conf/machine/dragonboard-410c.conf:#IMAGE_FSTYPES_append = " wic.gz"

meta-qcom/conf/machine/include/qcom-apq8016.inc:IMAGE_FSTYPES_append = " ext4.gz"

meta-qcom/conf/machine/include/qcom-apq8064.inc:IMAGE_FSTYPES_append = " ext4.gz"

meta-qcom/conf/machine/include/qcom-apq8096.inc:IMAGE_FSTYPES_append = " ext4.gz"
`

@dl9pf
Copy link
Author

dl9pf commented Mar 7, 2018

To explain the issue:
In our distro configuration we set IMAGE_FSTYPES := "${OUR_DEFAULT_IMAGE_FSTYPES}"

So we expect this to win. But _append will be processed after our redefinition happens.
Moreover the append also applies to initrd recipes that set their own IMAGE_FSTYPES in the recipe already and we add an unsupported IMAGE_FSTYPES there, too.

@dl9pf
Copy link
Author

dl9pf commented Mar 7, 2018

Please review the attached patch.
0001-Change-IMAGE_FSTYPES-to-not-use-_append.patch.txt

@ndechesne
Copy link
Contributor

hi, i've been out of office for some time. will get back to this issue at some point. i want to check the impact on our builds first.

@dl9pf
Copy link
Author

dl9pf commented Mar 27, 2018

Hi !
Have you been able to test it ?

@dl9pf
Copy link
Author

dl9pf commented Mar 27, 2018

@dl9pf
Copy link
Author

dl9pf commented Apr 10, 2018

Any chance to test ?

@ndechesne
Copy link
Contributor

hi, i am looking into right now.. sorry about the delay.. at first sight it looks like using ?= should work fine.. i need to check a bit more, but i might just do that..

ndechesne added a commit that referenced this issue Apr 10, 2018
As discussed on #61, using _append
will modify IMAGE_FSTYPES unconditionnally and won't give DISTRO a chance to
override.

Let's set sane, default settings using ?= (or +=). If a DISTRO wants to change
them, we suppose they know what they do, and overwrite correctly.

Reported-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
@ndechesne
Copy link
Contributor

how about #67?

@ndechesne
Copy link
Contributor

@alimon , care to have a look?

ndechesne added a commit that referenced this issue Apr 12, 2018
As discussed on #61, using _append
will modify IMAGE_FSTYPES unconditionnally and won't give DISTRO a chance to
override.

Let's set sane, default settings using ?= (or +=). If a DISTRO wants to change
them, we suppose they know what they do, and overwrite correctly.

Reported-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
(cherry picked from commit 53ab0ec)
drewmoseley pushed a commit to drewmoseley/meta-mender that referenced this issue Aug 16, 2019
Using _append breaks initramfs builds and attempts to build Mender style
images for them.  Basically, the initramfs image files set a new value
of IMAGE_FSTYPES but when we use _append we are applied _after_ that;
using += makes sure that the override done in the image recipe takes
place.

More details can be seen in this discussion:
    Linaro/meta-qcom#61

Changelog: Title
Signed-off-by: Drew Moseley <drew.moseley@northern.tech>
drewmoseley pushed a commit to drewmoseley/meta-mender that referenced this issue Aug 16, 2019
Using _append breaks initramfs builds and attempts to build Mender style
images for them.  Basically, the initramfs image files set a new value
of IMAGE_FSTYPES but when we use _append we are applied _after_ that;
using += makes sure that the override done in the image recipe takes
place.

More details can be seen in this discussion:
    Linaro/meta-qcom#61

Changelog: Title
Signed-off-by: Drew Moseley <drew.moseley@northern.tech>
drewmoseley pushed a commit to drewmoseley/meta-mender that referenced this issue Aug 19, 2019
Using _append breaks initramfs builds and attempts to build Mender style
images for them.  Basically, the initramfs image files set a new value
of IMAGE_FSTYPES but when we use _append we are applied _after_ that;
using += makes sure that the override done in the image recipe takes
place.

More details can be seen in this discussion:
    Linaro/meta-qcom#61

Changelog: Title
Signed-off-by: Drew Moseley <drew.moseley@northern.tech>
drewmoseley pushed a commit to drewmoseley/meta-mender that referenced this issue Aug 19, 2019
Using _append breaks initramfs builds and attempts to build Mender style
images for them.  Basically, the initramfs image files set a new value
of IMAGE_FSTYPES but when we use _append we are applied _after_ that;
using += makes sure that the override done in the image recipe takes
place.

More details can be seen in this discussion:
    Linaro/meta-qcom#61

Changelog: Title
Signed-off-by: Drew Moseley <drew.moseley@northern.tech>
drewmoseley pushed a commit to drewmoseley/meta-mender that referenced this issue Aug 19, 2019
Using _append breaks initramfs builds and attempts to build Mender style
images for them.  Basically, the initramfs image files set a new value
of IMAGE_FSTYPES but when we use _append we are applied _after_ that;
using += makes sure that the override done in the image recipe takes
place.

More details can be seen in this discussion:
    Linaro/meta-qcom#61

Changelog: Title
Signed-off-by: Drew Moseley <drew.moseley@northern.tech>
drewmoseley pushed a commit to drewmoseley/meta-mender that referenced this issue Sep 16, 2019
Using _append breaks initramfs builds and attempts to build Mender style
images for them.  Basically, the initramfs image files set a new value
of IMAGE_FSTYPES but when we use _append we are applied _after_ that;
using += makes sure that the override done in the image recipe takes
place.

More details can be seen in this discussion:
    Linaro/meta-qcom#61

Changelog: Fix initramfs builds when using meta-mender layer

Signed-off-by: Drew Moseley <drew.moseley@northern.tech>
drewmoseley pushed a commit to drewmoseley/meta-mender that referenced this issue Sep 16, 2019
Using _append breaks initramfs builds and attempts to build Mender style
images for them.  Basically, the initramfs image files set a new value
of IMAGE_FSTYPES but when we use _append we are applied _after_ that;
using += makes sure that the override done in the image recipe takes
place.

More details can be seen in this discussion:
    Linaro/meta-qcom#61

Changelog: Fix initramfs builds when using meta-mender layer

Signed-off-by: Drew Moseley <drew.moseley@northern.tech>
drewmoseley pushed a commit to drewmoseley/meta-mender that referenced this issue Sep 16, 2019
Use += rather than _append for IMAGE_FSTYPES.

Using _append breaks initramfs builds and attempts to build Mender style
images for them.  Basically, the initramfs image files set a new value
of IMAGE_FSTYPES but when we use _append we are applied _after_ that;
using += makes sure that the override done in the image recipe takes
place.

More details can be seen in this discussion:
    Linaro/meta-qcom#61

Changelog: Fix initramfs builds when using meta-mender layer

Signed-off-by: Drew Moseley <drew.moseley@northern.tech>
drewmoseley pushed a commit to drewmoseley/meta-mender that referenced this issue Sep 16, 2019
Use += rather than _append for IMAGE_FSTYPES.

Using _append breaks initramfs builds and attempts to build Mender style
images for them.  Basically, the initramfs image files set a new value
of IMAGE_FSTYPES but when we use _append we are applied _after_ that;
using += makes sure that the override done in the image recipe takes
place.

More details can be seen in this discussion:
    Linaro/meta-qcom#61

Changelog: Fix initramfs builds when using meta-mender layer

Signed-off-by: Drew Moseley <drew.moseley@northern.tech>
drewmoseley pushed a commit to drewmoseley/meta-mender that referenced this issue Sep 27, 2019
Use += rather than _append for IMAGE_FSTYPES.

Using _append breaks initramfs builds and attempts to build Mender style
images for them.  Basically, the initramfs image files set a new value
of IMAGE_FSTYPES but when we use _append we are applied _after_ that;
using += makes sure that the override done in the image recipe takes
place.

More details can be seen in this discussion:
    Linaro/meta-qcom#61

Changelog: Fix initramfs builds when using meta-mender layer

Signed-off-by: Drew Moseley <drew.moseley@northern.tech>
(cherry picked from commit a944df8)
drewmoseley pushed a commit to drewmoseley/meta-mender that referenced this issue Sep 30, 2019
Use += rather than _append for IMAGE_FSTYPES.

Using _append breaks initramfs builds and attempts to build Mender style
images for them.  Basically, the initramfs image files set a new value
of IMAGE_FSTYPES but when we use _append we are applied _after_ that;
using += makes sure that the override done in the image recipe takes
place.

More details can be seen in this discussion:
    Linaro/meta-qcom#61

Changelog: Fix initramfs builds when using meta-mender layer

Signed-off-by: Drew Moseley <drew.moseley@northern.tech>
(cherry picked from commit a944df8)
drewmoseley pushed a commit to drewmoseley/meta-mender that referenced this issue Dec 5, 2019
Using _append breaks initramfs builds and attempts to build Mender style
images for them.  Basically, the initramfs image files set a new value
of IMAGE_FSTYPES but when we use _append we are applied _after_ that;
using += makes sure that the override done in the image recipe takes
place.

More details can be seen in this discussion:
    Linaro/meta-qcom#61

Changelog: Title
Signed-off-by: Drew Moseley <drew.moseley@northern.tech>
drewmoseley pushed a commit to drewmoseley/meta-mender that referenced this issue Dec 30, 2019
Use += rather than _append for IMAGE_FSTYPES.

Using _append breaks initramfs builds and attempts to build Mender style
images for them.  Basically, the initramfs image files set a new value
of IMAGE_FSTYPES but when we use _append we are applied _after_ that;
using += makes sure that the override done in the image recipe takes
place.

More details can be seen in this discussion:
    Linaro/meta-qcom#61

Changelog: Fix initramfs builds when using meta-mender layer

Signed-off-by: Drew Moseley <drew.moseley@northern.tech>
drewmoseley pushed a commit to drewmoseley/meta-mender that referenced this issue Dec 30, 2019
Use += rather than _append for IMAGE_FSTYPES.

Using _append breaks initramfs builds and attempts to build Mender style
images for them.  Basically, the initramfs image files set a new value
of IMAGE_FSTYPES but when we use _append we are applied _after_ that;
using += makes sure that the override done in the image recipe takes
place.

More details can be seen in this discussion:
    Linaro/meta-qcom#61

Changelog: Fix initramfs builds when using meta-mender layer

Signed-off-by: Drew Moseley <drew.moseley@northern.tech>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants