[OE-core] [PATCH] run-postinsts: Print message before running deferred postinst scripts
Haris Okanovic
haris.okanovic at ni.com
Tue Dec 6 19:01:45 UTC 2016
On 12/05/2016 04:51 PM, Burton, Ross wrote:
>
> On 5 December 2016 at 21:48, Haris Okanovic <haris.okanovic at ni.com
> <mailto:haris.okanovic at ni.com>> wrote:
>
> Opkg can defer running postinst scripts to first boot, which can take
> a while on some systems. The output of `opkg configure` (or whatever pm
> is used) is redirected to a file when logging is enabled
> (I.e. $POSTINST_LOGGING == 1), making the machine appear hung during
> this process. This change simply prints a wait message on the console
> to inform the user of this potentially long and silent operation so
> that they do not mistakenly reboot their machine.
>
>
> This isn't opkg specific, all backends can do it.
I wrote a more generic commit message in V2.
>
>
> Why not simply `tee` the output instead?
> Tee might be provided by BusyBox in some distros, which may need to run
> update-alternatives in the very postinst scripts being executed by this
> process. It's therefore not safe to assume Tee (or any other packaged
> util) is available until the configure process finishes.
>
>
> Are the alternatives not configured at rootfs time, so it should be fine
> to run tee? (as if tee isn't safe, then neither is sed).
`tee` wasn't configured in Fido builds of NI Linux RT -- I.e.
Busybox.postinst got deferred. I'm not sure if that's the OE default or
the result of some distro-specific tweaks we made, but I decided not to
rely on it for that reason. It's possible tee might work on some
configurations.
I'm not sure why sed is significant. The only non-builtins in
run-postinsts are update-rc.d, rm, and $pm.
>
> Ross
More information about the Openembedded-core
mailing list