Quoting Phil Blundell <pb@pbcl.net>:
> That's testing for offline installation. If $D is not set, it's
> running on the target.
>
> p.
one last query before i head off for dinner ... so what about
pkg_postinst() routines that do double duty, like this one from
dbus_1.12.20.bb:
PACKAGE_WRITE_DEPS += "${@bb.utils.contains('DISTRO_FEATURES','systemd
sysvinit','systemd-systemctl-native','',d)}"
pkg_postinst:dbus() {
# If both systemd and sysvinit are enabled, mask the dbus-1
init script
if ${@bb.utils.contains('DISTRO_FEATURES','systemd
sysvinit','true','false',d)}; then
if [ -n "$D" ]; then
OPTS="--root=$D"
fi
systemctl $OPTS mask dbus-1.service
fi
if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
/etc/init.d/populate-volatile.sh update
fi
}
note how that routine checks its context and, as i recall (but
it's not documented in the docs i'm looking at), i'd swear that
i read somewhere that if a pkg_postinst() routine fails at image
creation time, it was deferred until boot time, which would
explain the above routine checking its runtime context.
anyway, off for food.
rday