[OE-core] Cherry-pick postinstallation script refactoring to rocko

Diaz de Grenu, Jose Jose.DiazdeGrenu at digi.com
Fri Feb 9 14:33:23 UTC 2018


Recently, the mechanism for defining post installation scripts that have to run on the first boot (on the target) was refactored in the following commits:

ff4835470bc4 rootfs.py: change the notice about deferring scripts to first boot from warning to a note
a2b7260f791e package_rpm.bbclass: run pre/post installation scriptlets using sh -e
7bc55b296097 meta/lib/oe/package_manager.py: deprecate 'exit 1' as a way to defer to first boot
6ca669105ff7 package.bbclass: add support for pkg_postinst_ontarget()
32c500b8ea2c meta/lib/oe/rootfs.py: do not execute defer_to_first_boot when processing postinst_intercept hooks
4c808e31ea35 meta/lib/oe/rootfs.py: separate first boot deferral logic into a separate function

This makes it easier and clearer to define post installation scripts that have to run on the target, and it also clears the warnings that you currently get in rocko when trying to define post installation scripts that have to run on the target:

> [log_check] warning: %post(u-boot-fw-utils-1:2017.09-r0.0.ccimx6sbc) scriptlet failed, exit status 1

I think these warnings are quite confusing, as they seem to indicate that some scriptlet failed, when that is not the case at all. The exit status 1 is the result of the idiom (or hacky method) that you have to use in order to define post installation scripts that run on the target, as documented in rocko [1].

Note that this patchset would not break anything, it would just change confusing warnings (like shown above) to a specific warning telling users about using this new method.

Would it be possible to cherry-pick this patchset to rocko, in order to fix this?

Thanks.

[1] http://www.yoctoproject.org/docs/2.4/mega-manual/mega-manual.html#new-recipe-post-installation-scripts 



More information about the Openembedded-core mailing list