first time looking closely at pkg_postinst_* routines, so can someone clarify the use of "$D" in those routines? at the moment, i'm *guessing* that those routines need to be able to run in two different contexts (but i could be wrong):
1) at image creation time 2) at later package installation time on a running system i'm aware that bitbake requires the use of curly braces, so always must use "${D}", so in something like this from xorg-font-common.inc, how does OE process this shell function? as in, what context do those routines run in? pkg_postinst_${PN} () { for fontdir in `find $D/usr/lib/X11/fonts -type d`; do mkfontdir $fontdir mkfontscale $fontdir done for fontdir in `find $D/usr/share/fonts/X11 -type d`; do mkfontdir $fontdir mkfontscale $fontdir done } it seems(?) clear that testing $D is the way to tell which of the two contexts one is running in, as in: pkg_postinst_${PN}_class-target () { if [ "x$D" != "x" ]; then rootarg="--root $D" else rootarg="" fi ... snip ... such that if $D is the empty string, then you're in the context of a running system. am i close? rday p.s. i notice there are two ways that $D is used to define the context. in some cases, just using it (as in the first example above) is sufficient, while in other cases (as in the second case), the routine needs to actually test the value.
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#137100): https://lists.openembedded.org/g/openembedded-core/message/137100 Mute This Topic: https://lists.openembedded.org/mt/72858070/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-