[Openembedded-architecture] Changes that switching from smart to dnf will cause

Alexander Kanavin alexander.kanavin at linux.intel.com
Tue Feb 14 21:18:44 UTC 2017


On 02/14/2017 08:49 PM, Richard Purdie wrote:
>
> I think there is an assumption that these postinstalls are run under
> set -e which may or may not be the case, I really don't remember.
>
> I do agree that if these are not run under -e, they are broken and that
> they do indeed need fixing. What I think needs more discussion is how
> we fix them. We have the set -e issue in more than just postinstalls.

I checked this with the master branch (e.g. current rpm5/smart 
behavior). They are *not* run under set -e, and no amount of bogus 
failing nonsense prior to that last chown command will make the 
do_rootfs fail or trigger a first boot defer. So I think both need to be 
fixed:

1) postinst scriptlets need to run under -e

2) deferral to first boot needs to be an explicit call in the scriptlets 
(and not an implicit non-zero exit), so that actual script errors can be 
reported and intercepted as errors.

Then the postinst_ontarget() can be a nice bonus to these two. There's 
plenty of recipes where it would be enough - as a syntactic sugar that 
prepends an unconditional first boot defer call during cross-install.

Alex



More information about the Openembedded-architecture mailing list