care when using remove_packaging_data_files
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
Quoted 8 lines · Reinette
Hi,
I am building an image using ipk packages. The minimal images all seem to set
ROOTFS_POSTPROCESS_COMMANDtoremove_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/libif nothing there is needed. I could not find similar actions in rootfs_deb.bbclass or rootfs_rpm.bbclassI 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
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_COMMANDtoremove_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
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.
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