Skip to contentSkip to conversation

care when using remove_packaging_data_files

DISCUSSION Chatre, Reinette 2 participants 5 messages Mar 29, 2012 – Mar 30, 2012

lore
Share & tools
lore
#0 lore raw

Hi,

I am building an image using ipk packages. The minimal images all seem to set ROOTFS_POSTPROCESS_COMMAND to remove_packaging_data_files, which (for all package management systems) recursively removes the packages directory in /var/lib. This seems a bit harsh considering that some packages may still be in the unpacked state and thus have a script in that directory that needs to be run when the image boots.

ipk seems to cleanup without the need of remove_packaging_data_files - rootfs_ipk.bbclass:rootfs_ipk_do_rootfs() checks if any packages are in unpacked state and then will delete the packages directory in /var/lib if nothing there is needed. I could not find similar actions in rootfs_deb.bbclass or rootfs_rpm.bbclass

I am thus planning on proceeding with my minimal image without setting ROOTFS_POSTPROCESS_COMMAND, but it seems that minimal images based on rpm and deb may need some changes to avoid surprises.

Reinette

#1 lore raw
Quoted 8 lines · Reinette

Hi,

I am building an image using ipk packages. The minimal images all seem to set ROOTFS_POSTPROCESS_COMMAND to remove_packaging_data_files, which (for all package management systems) recursively removes the packages directory in /var/lib. This seems a bit harsh considering that some packages may still be in the unpacked state and thus have a script in that directory that needs to be run when the image boots.

hmmm what cased did you find ? is it possible to fix the recipe itself to have those scripts post processed offline

Quoted 16 lines

ipk seems to cleanup without the need of remove_packaging_data_files - rootfs_ipk.bbclass:rootfs_ipk_do_rootfs() checks if any packages are in unpacked state and then will delete the packages directory in /var/lib if nothing there is needed. I could not find similar actions in rootfs_deb.bbclass or rootfs_rpm.bbclass

I am thus planning on proceeding with my minimal image without setting ROOTFS_POSTPROCESS_COMMAND, but it seems that minimal images based on rpm and deb may need some changes to avoid surprises.

Reinette
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

#2 lore raw
Quoted 11 lines · Khem Raj
Quoted 8 lines · Reinette

Hi,

I am building an image using ipk packages. The minimal images all seem to set ROOTFS_POSTPROCESS_COMMAND to remove_packaging_data_files, which (for all package management systems) recursively removes the packages directory in /var/lib. This seems a bit harsh considering that some packages may still be in the unpacked state and thus have a script in that directory that needs to be run when the image boots.

Quoted 2 lines

hmmm what cased did you find ? is it possible to fix the recipe itself to have those scripts post processed offline

Absolutely, an option is indeed to look if recipe can do everything when image is created. I was just surprised to learn that these minimal images by default prevent all first boot post install scripts from running.

Reinette

#3 lore raw
Quoted 4 lines · Reinette

Absolutely, an option is indeed to look if recipe can do everything when image is created. I was just surprised to learn that these minimal images by default prevent all first boot post install scripts from running.

remember the name has "minimal" in it.

#4 lore raw
Quoted 8 lines · Khem Raj
Quoted 4 lines · Reinette

Absolutely, an option is indeed to look if recipe can do everything when image is created. I was just surprised to learn that these minimal images by default prevent all first boot post install scripts from running.

remember the name has "minimal" in it.

Good point, but what I wanted to point out is that the behavior among the different package management systems when dealing with this is different.

Reinette