Remove packagegroup from image recipes
Hi,
I am trying to remove a package group (pacakgegroup-core-rauc) from a custom image but it fails with error:
"package packagegroup-base requires packagegroup-base-rauc, but none of the providers can be installed".
We use Rauc for our "standard" image, but I want to remove it from the "recovery" image. "rauc" is in DISTRO_FEATURES which is fine for all images except for "recovery" image.
The only way I managed to remove it is using post-process command, but I am wondering if there is a more elegant way to remove it?
Any ideas?
Regards,
Ivan
I suppose you need to make an image recipe where the unneeded packagegroup is not listed? Can you show the existing recipes?
Alex
Quoted 22 lines · Ivan Stojanovic
Hi,
I am trying to remove a package group (pacakgegroup-core-rauc) from a custom image but it fails with error:
"package packagegroup-base requires packagegroup-base-rauc, but none of the providers can be installed".We use Rauc for our "standard" image, but I want to remove it from the "recovery" image. "rauc" is in
DISTRO_FEATURESwhich is fine for all images except for "recovery" image.The only way I managed to remove it is using post-process command, but I am wondering if there is a more elegant way to remove it?
Any ideas?
Regards,
Ivan
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#61388): https://lists.yoctoproject.org/g/yocto/message/61388
Mute This Topic: https://lists.yoctoproject.org/mt/102035396/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
We have 2 images, adios-image-standard and adios-image-recovery.
In adios-image-standard, I want to have rauc.
In adios-image-recovery due to lack of space, I want to remove it. It is a part of it since it is in DISTRO_FEATURES.
In meta-rauc layer, they add rauc to pacakgegroup-base: https://github.com/rauc/meta-rauc/blob/kirkstone/recipes-core/packagegroups/packagegroup-base.bbappend via https://github.com/rauc/meta-rauc/blob/kirkstone/recipes-core/packagegroups/packagegroup-base_rauc.inc. ( https://github.com/rauc/meta-rauc/blob/kirkstone/recipes-core/packagegroups/packagegroup-base_rauc.inc )
I tried removing it with PACKAGE_EXCLUDE:PACKAGE_EXCLUDE = "\
packagegroup-base-rauc \
"
as well asPACKAGE_EXCLUDE = "\
rauc \
rauc-mark-good \
rauc-service \
"
I also tried with:
RDEPENDS:packagegroup-base:remove "packagegroup-base-rauc"
But in both cases I get that error.
I do not have any idea how I could remove it from DISTRO_FEATURES for that image. I think that is not possible.
If I remove it "manually" using ROOTFS_POSTPROCESS_COMMAND, I have to take care of all dependencies as well and it would be still be visible in .manifest file that it is there although it is not.
That is why I am looking for a more elegant way to achive it.
Thanks!
Ugh, that's a really ugly hack in meta-rauc. They shouldn't force themselves into all images that way. You should file a ticket.
I would suggest either dropping rauc from DISTRO_FEATURES globally (that may have unwanted side effects though and you should check what else that affects), or using BBMASK as shown in reference manual to blacklist the offending bbappend, e.g. something like:
BBMASK += "/meta-ti/recipes-misc/ meta-ti/recipes-ti/packagegroup/"
Alex
Quoted 37 lines · Ivan Stojanovic
We have 2 images, adios-image-standard and adios-image-recovery.
In adios-image-standard, I want to have rauc.
In adios-image-recovery due to lack of space, I want to remove it. It is a part of it since it is inDISTRO_FEATURES.In meta-rauc layer, they add rauc to pacakgegroup-base: https://github.com/rauc/meta-rauc/blob/kirkstone/recipes-core/packagegroups/packagegroup-base.bbappend via https://github.com/rauc/meta-rauc/blob/kirkstone/recipes-core/packagegroups/packagegroup-base_rauc.inc.
I tried removing it with
PACKAGE_EXCLUDE:PACKAGE_EXCLUDE= "\
packagegroup-base-rauc \
"
as well asPACKAGE_EXCLUDE= "\
rauc \
rauc-mark-good \
rauc-service \
"
I also tried with:
RDEPENDS:packagegroup-base:remove "packagegroup-base-rauc"But in both cases I get that error.
I do not have any idea how I could remove it fromDISTRO_FEATURESfor that image. I think that is not possible.If I remove it "manually" using
ROOTFS_POSTPROCESS_COMMAND, I have to take care of all dependencies as well and it would be still be visible in .manifest file that it is there although it is not.That is why I am looking for a more elegant way to achive it.
Thanks!
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#61390): https://lists.yoctoproject.org/g/yocto/message/61390
Mute This Topic: https://lists.yoctoproject.org/mt/102035396/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Hi,
Am Mittwoch, dem 18.10.2023 um 11:08 +0200 schrieb Alexander Kanavin:
Quoted 2 lines
Ugh, that's a really ugly hack in meta-rauc. They shouldn't force themselves into all images that way. You should file a ticket.
it's not really that it's 'forced' into all image. The .bbappend just says:
Quoted 1 line
require ${@bb.utils.contains('DISTRO_FEATURES', 'rauc', '${BPN}_rauc.inc', '', d)}
The assumption was that if you have 'rauc' in you DISTRO_FEATURES, you want to install it. And this was just the best way I saw to automatically end up in base images for this case while ensuring that we do not modify the base packagegroup unconditionally.
A step back: I would expect that a recovery image is exactly where you would want RAUC to be available to recover you rootfs by installing a valid bundle, or?
Anyway, feel free to file an issue or a discussion at
https://github.com/rauc/meta-rauc 🙂
Regards, Enrico
Quoted 59 lines
I would suggest either dropping rauc from
DISTRO_FEATURESglobally (that may have unwanted side effects though and you should check what else that affects), or using BBMASK as shown in reference manual to blacklist the offending bbappend, e.g. something like:BBMASK += "/meta-ti/recipes-misc/ meta-ti/recipes-ti/packagegroup/"
Alex
Quoted 29 lines · Ivan Stojanovic
We have 2 images, adios-image-standard and adios-image-recovery.
In adios-image-standard, I want to have rauc.
In adios-image-recovery due to lack of space, I want to remove it. It is a part of it since it is inDISTRO_FEATURES.In meta-rauc layer, they add rauc to pacakgegroup-base:
https://github.com/rauc/meta-rauc/blob/kirkstone/recipes-core/packagegroups/packagegroup-base.bbappend
via
https://github.com/rauc/meta-rauc/blob/kirkstone/recipes-core/packagegroups/packagegroup-base_rauc.inc
.I tried removing it with
PACKAGE_EXCLUDE:PACKAGE_EXCLUDE= "\
packagegroup-base-rauc \
"
as well asPACKAGE_EXCLUDE= "\
rauc \
rauc-mark-good \
rauc-service \
"
I also tried with:
RDEPENDS:packagegroup-base:remove "packagegroup-base-rauc"But in both cases I get that error.
I do not have any idea how I could remove it fromDISTRO_FEATURESfor that image. I think that is not possible.Quoted 10 lines
If I remove it "manually" using
ROOTFS_POSTPROCESS_COMMAND, I have to take care of all dependencies as well and it would be still be visible in .manifest file that it is there although it is not.That is why I am looking for a more elegant way to achive it.
Thanks!
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#61391): https://lists.yoctoproject.org/g/yocto/message/61391
Mute This Topic: https://lists.yoctoproject.org/mt/102035396/3616721
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 4 lines
Pengutronix e.K. | Enrico Jörns | Embedded Linux Consulting & Support | https://www.pengutronix.de/ | Steuerwalder Str. 21 | Phone: +49-5121-206917-180 | 31137 Hildesheim, Germany | Fax: +49-5121-206917-9 |
Quoted 6 lines · Enrico Jörns
it's not really that it's 'forced' into all image. The .bbappend just says:
Quoted 1 line
require ${@bb.utils.contains('DISTRO_FEATURES', 'rauc', '${BPN}_rauc.inc', '', d)}
The assumption was that if you have 'rauc' in you
DISTRO_FEATURES, you want to install it. And this was just the best way I saw to automatically end up in base images for this case while ensuring that we do not modify the base packagegroup unconditionally.
You should provide a packagegroup-rauc recipe, a sample rauc-image recipe (or set of recipes) that uses that packagegroup, and leave it at that. Users of meta-rauc will figure out the rest, particularly when and how they want to install rauc. You've just seen a specific case where it is *not* wanted in some images.
Forcing your way into base packagegroups from oe-core via bbappends is really not the right way to go about things.
Alex
Hi Alex,
Am Mittwoch, dem 18.10.2023 um 12:09 +0200 schrieb Alexander Kanavin:
Quoted 8 lines · Enrico Jörns
Quoted 6 lines
it's not really that it's 'forced' into all image. The .bbappend just says:
Quoted 1 line
require ${@bb.utils.contains('DISTRO_FEATURES', 'rauc', '${BPN}_rauc.inc', '', d)}
The assumption was that if you have 'rauc' in you
DISTRO_FEATURES, you want to install it. And this was just the best way I saw to automatically end up in base images for this case while ensuring that we do not modify the base packagegroup unconditionally.
Quoted 8 lines
You should provide a packagegroup-rauc recipe, a sample rauc-image recipe (or set of recipes) that uses that packagegroup, and leave it at that. Users of meta-rauc will figure out the rest, particularly when and how they want to install rauc. You've just seen a specific case where it is *not* wanted in some images.
Forcing your way into base packagegroups from oe-core via bbappends is really not the right way to go about things.
In how is this different to the default packagegroup handling in oe-core where package 'force themself' into images based on specific DISTRO_FEATURE or MACHINE_FEATURE settings?
Thus this is a mechanism that is explicitly designed to be used by oe-core exclusively?
Regards, Enrico
Quoted 2 lines
Alex
Signature · 4 lines
Pengutronix e.K. | Enrico Jörns | Embedded Linux Consulting & Support | https://www.pengutronix.de/ | Steuerwalder Str. 21 | Phone: +49-5121-206917-180 | 31137 Hildesheim, Germany | Fax: +49-5121-206917-9 |
Quoted 4 lines · Enrico Jörns
In how is this different to the default packagegroup handling in oe-core where package 'force themself' into images based on specific
DISTRO_FEATUREorMACHINE_FEATUREsettings?Thus this is a mechanism that is explicitly designed to be used by oe-core exclusively?
I see that as something of a historical mis-feature. I would take those things out of the packagegroup recipe and into a class used by images if I had a bit of time (core-image.bbclass most likely).
That's what you could do as well, define a class that pulls in rauc for those images that inherit it.
Alex
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 5 lines · Alexander Kanavin via lists.yoctoproject.org
Quoted 3 lines · Enrico Jörns
In how is this different to the default packagegroup handling in oe-core where package 'force themself' into images based on specific
DISTRO_FEATUREorMACHINE_FEATUREsettings?
Quoted 8 lines
Quoted 1 line
Thus this is a mechanism that is explicitly designed to be used by oe-core exclusively?
I see that as something of a historical mis-feature. I would take those things out of the packagegroup recipe and into a class used by images if I had a bit of time (core-image.bbclass most likely).
That's what you could do as well, define a class that pulls in rauc for those images that inherit it.
You can see how core-image-weston.bb does it:
IMAGE_FEATURES += "splash package-management ssh-server-dropbear hwcodecs weston"
and then in core-image class:
FEATURE_PACKAGES_weston = "packagegroup-core-weston" ... etc
Alex
Am Mittwoch, dem 18.10.2023 um 12:50 +0200 schrieb Alexander Kanavin:
Quoted 19 lines
Quoted 5 lines · Alexander Kanavin via lists.yoctoproject.org
Quoted 3 lines · Enrico Jörns
In how is this different to the default packagegroup handling in oe-core where package 'force themself' into images based on specific
DISTRO_FEATUREorMACHINE_FEATUREsettings?Quoted 8 lines
Quoted 1 line
Thus this is a mechanism that is explicitly designed to be used by oe-core exclusively?
I see that as something of a historical mis-feature. I would take those things out of the packagegroup recipe and into a class used by images if I had a bit of time (core-image.bbclass most likely).
That's what you could do as well, define a class that pulls in rauc for those images that inherit it.
You can see how core-image-weston.bb does it:
Quoted 7 lines
IMAGE_FEATURES+= "splash package-management ssh-server-dropbear hwcodecs weston"and then in core-image class:
FEATURE_PACKAGES_weston= "packagegroup-core-weston" ... etc
Oh yes, I came across this feature a few weeks ago for the first time.
Before I had never noticed that the FEATURE_PACKAGES mechanism exists.
Maybe this could be an alternative to 'hacking' rauc into the base packagegroup. Thanks for the hint.
My original intention was to reduce the number of manual variable switches required for building a rauc-compatible image. But maybe this sort of 'over-optimized'.
Enrico
Quoted 2 lines
Alex
Signature · 4 lines
Pengutronix e.K. | Enrico Jörns | Embedded Linux Consulting & Support | https://www.pengutronix.de/ | Steuerwalder Str. 21 | Phone: +49-5121-206917-180 | 31137 Hildesheim, Germany | Fax: +49-5121-206917-9 |