trying (again) to clarify pkg_postinst[_ontarget]
On Fri, 17 Dec 2021, Robert P. J. Day wrote:
... snip ...
Quoted 10 lines
i ask as i see this in base-passwd_3.5.29.bb:
pkg_postinst:${PN}-update () { #!/bin/sh if [ -n "$D" ]; then exit 0 fi ${sbindir}/update-passwd }
Quoted 4 lines
how does one interpret that? or is just a holdover from the old
days? certainly that section in the docs is not going to help a reader understand the (still) numerous references to ${D} in some of those scripts.
as another obvious example of this, here's wpa-supplicant_2.9.bb:
pkg_postinst:${PN} () {
# If we're offline, we don't need to do this.
if [ "x$D" = "x" ]; then
killall -q -HUP dbus-daemon || true
fi
}is there some rationale for the above awkwardness?
rday