[OE-core] can pkg_{pre, post}rm functions be run at all for image creation?

Robert P. J. Day rpjday at crashcourse.ca
Sat Aug 2 16:34:50 UTC 2014


  followup to earlier note, is it true that the pkg_prerm and
pkg_postrm functions cannot be run at all during image creation, but
only on the actual running target? this would seem reasonable as it
doesn't seem to make sense to be running any sort of removal code
during image creation.

  (i'm assuming that it is never the case that any sort of package
removal is done during image creation, and that the creation process
will install *only* those packages that should be part of the final
image, is that correct?)

  however, if the above is correct, then it would make sense that all,
say, pkg_prerm() functions would never be written with respect to the
variable ${D}, which would be relevant only during image creation. but
i can see things like this in sysklogd.inc:

pkg_prerm_${PN} () {
        if test "x$D" = "x"; then
        if test "$1" = "upgrade" -o "$1" = "remove"; then
                /etc/init.d/syslog stop
        fi
        fi
}

so what does that mean?

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================




More information about the Openembedded-core mailing list