[OE-core] [RFC] opkg: avoid running postinst scripts twice when using systemd

Alexander Kanavin alexander.kanavin at linux.intel.com
Thu Dec 14 17:28:12 UTC 2017


On 12/14/2017 07:16 PM, Stefan Agner wrote:

> Are you sure that rpm has no such facility? Maybe there is some other
> mechanism around...

You are welcome to find it. rpm does not distinguish between unpacking 
and configuring steps, and just does everything in a single installation 
step.

> If rpm really does not handle it, would mean that delayed postinst would
> have been broken back when we did not ship /etc/*-postinsts:
> http://git.openembedded.org/openembedded-core/commit/meta/lib/oe/rootfs.py?id=5aae19959a443c6ac4b0feef10715c8acf3c6376

Rpm had a special way to save postinstall scripts (due to the same 
problem I described just above), and still does, which means 
_save_postinsts() did (and does) nothing in rpm case.

> If there is special case handling needed it is not particularly nice due
> to the additional condition.
> 
> But IMHO still better, it can easily be explained in rootfs.py with a
> comment like:
> 
>      # deb/ipk package management is able to handle postinsts on first
> boot.

Please no; the class in question is the generic Rootfs(), and I do not 
want to add packagemanager-specific clauses there.

Alex



More information about the Openembedded-core mailing list