mirror of
https://git.yoctoproject.org/poky
synced 2026-09-19 18:49:32 +02:00
recipes: pre/post actions
A number of the recipes did not properly label their pre and post
actions, causing the actions to occur in all split packages. This
was corrected by defaulting to _${PN} in most cases.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
This commit is contained in:
committed by
Richard Purdie
parent
6f6bffe5df
commit
92a9d59fcc
@@ -25,14 +25,14 @@ DEBIANNAME_${PN} = "libnss-mdns"
|
||||
EXTRA_OECONF = "--libdir=/lib --disable-lynx --enable-avahi"
|
||||
|
||||
# TODO: pattern based configuration update
|
||||
pkg_postinst () {
|
||||
pkg_postinst_${PN} () {
|
||||
cat /etc/nsswitch.conf | grep "hosts:\s*files dns$" > /dev/null && {
|
||||
cat /etc/nsswitch.conf | sed 's/hosts:\s*files dns/& mdns4/' > /tmp/nsswitch.conf
|
||||
mv /tmp/nsswitch.conf /etc/nsswitch.conf
|
||||
}
|
||||
}
|
||||
|
||||
pkg_prerm () {
|
||||
pkg_prerm_${PN} () {
|
||||
cat /etc/nsswitch.conf | grep "hosts:\s*files dns mdns4$" > /dev/null && {
|
||||
cat /etc/nsswitch.conf | sed 's/\(hosts:\s*files dns\) mdns4*/\1/' > /tmp/nsswitch.conf
|
||||
mv /tmp/nsswitch.conf /etc/nsswitch.conf
|
||||
|
||||
@@ -20,7 +20,7 @@ do_install() {
|
||||
|
||||
PACKAGE_ARCH = "all"
|
||||
|
||||
pkg_postinst() {
|
||||
pkg_postinst_${PN} () {
|
||||
if test "x$D" != "x"; then
|
||||
exit 1
|
||||
else
|
||||
@@ -28,7 +28,7 @@ else
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
pkg_postrm_${PN} () {
|
||||
if test "x$D" != "x"; then
|
||||
exit 1
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user