Skip to contentSkip to conversation

trying (again) to clarify pkg_postinst[_ontarget]

docs Robert P. J. Day 1 participant 1 message Dec 17, 2021 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

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