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

Anders Darander anders at chargestorm.se
Wed Feb 15 09:16:53 UTC 2017


* Alexander Kanavin <alexander.kanavin at linux.intel.com> [170215 09:51]:

> On 02/15/2017 09:44 AM, Anders Darander wrote:
> > Do you plan to convert the old pkg_postinst_${PN} to this one?

> Only those that cannot run at cross-install time and defer themselves to
> first boot via 'exit 1' trick. The vast majority of pkg_postinst will stay
> as they are, and will run at cross-install time like now.

Ok, I'm fairly happy with your answers.

Though, I'm still worried, that it might be used more often, eg instead
of trying to write a pkg_post_install_${PN}() that uses qemu,
pkg_postinst_ontarget4{PN}() will be used just because it's a lot easier
to write.

> > I'd say, ensure that the pkg_postinst_${PN} actually fails if something
> > goes wrong, i.e. add `set -e`, and fix up everything that fails during
> > rootfs...

> The problem right now is that there is no way for postinst script to truly
> fail: if it fails, it's taken as a request to defer to first boot. Which may
> not be the intention at all. This is what I am aiming to fix with this
> change, it's not primarily about adding _ontarget, and I should've written
> the commit message and the email to this list differently.

> > Ensure that they're run under `set -e`...

> Not enough; see just above.

I see what you're out to achieve.

Could you add some strong wording in the documentation of
pkg_postinst_ontarget4{PN}(), that it's only to be used as a _last_
resort; when something really needs access to the real HW?

That would make my worry slightly less (only less, as people tend to
skip the docs...)

Again, I'm happy with your explanations!

Cheers,
Anders

-- 
Anders Darander, Senior System Architect
ChargeStorm AB / eStorm AB



More information about the Openembedded-architecture mailing list