]> code.ossystems Code Review - openembedded-core.git/commitdiff
recipes: pre/post actions
authorMark Hatle <mark.hatle@windriver.com>
Thu, 10 Feb 2011 00:13:50 +0000 (18:13 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 12 Feb 2011 00:31:43 +0000 (00:31 +0000)
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>
15 files changed:
meta/recipes-bsp/hostap/hostap-conf_1.0.bb
meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb
meta/recipes-bsp/orinoco/orinoco-conf_1.0.bb
meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb
meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb
meta/recipes-core/base-passwd/base-passwd_3.5.22.bb
meta/recipes-core/dropbear/dropbear.inc
meta/recipes-devtools/sgml-common/sgml-common_0.6.3.bb
meta/recipes-extended/bash/bash.inc
meta/recipes-extended/bash/bash_3.2.48.bb
meta/recipes-extended/sudo/sudo.inc
meta/recipes-graphics/ttf-fonts/liberation-fonts_1.04.bb
meta/recipes-graphics/ttf-fonts/liberation-fonts_1.06.bb
meta/recipes-graphics/ttf-fonts/ttf-bitstream-vera_1.10.bb
meta/recipes-kernel/update-modules/update-modules_1.0.bb

index fa294704859ce8c657ef52723ffdad48a05fc9e8..de72b769a952b3d2231b06b2934ec2f0ab4e4236 100644 (file)
@@ -19,13 +19,13 @@ do_install() {
        install -m 0644 ${WORKDIR}/hostap_cs.modalias ${D}${sysconfdir}/modutils/hostap_cs.conf
 }
 
-pkg_postinst () {
+pkg_postinst_${PN} () {
        if [ -n "$D" ]; then
                exit 1
        fi
        update-modules || true
 }
 
-pkg_postrm () {
+pkg_postrm_${PN} () {
        update-modules || true
 }
index 6d08084b1944ddf9674caae5f60ecfcb3f5eeaa2..4cefdb79667c4c1f9f8e24b6fb8e6a6afd1e85a1 100644 (file)
@@ -28,13 +28,13 @@ do_install() {
        install -m 0755 src/lrz src/lsz ${D}${bindir}/
 }
 
-pkg_postinst() {
+pkg_postinst_${PN}() {
        for util in rz rx rb sz sx sb; do
                update-alternatives --install ${bindir}/$util $util lrz 100
        done
 }
 
-pkg_postrm() {
+pkg_postrm_${PN}() {
        for util in rz rx rb sz sx sb; do
                update-alternatives --remove $util ${bindir}/lrz
        done
index a24d004adbd0b8a10f8221595bab59e8f5e70b23..1c25e02dccf55b271c68708619f5463b0030b2c8 100644 (file)
@@ -15,13 +15,13 @@ do_install() {
         install -m 0644 ${WORKDIR}/orinoco_cs.conf ${D}${sysconfdir}/modutils/
 }
 
-pkg_postinst () {
+pkg_postinst_${PN} () {
        if [ -n "$D" ]; then
                exit 1
        fi
        update-modules || true
 }
 
-pkg_postrm () {
+pkg_postrm_${PN} () {
        update-modules || true
 }
index 4c94d2aeaf8e1ced581a7dfd2dd5db8863b2f71b..b04b20abee2764a2220a5b7f496831dffa00938f 100644 (file)
@@ -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
index aa3684a440c212c1d012522cacda070a0de2e6df..f57597d80c8a8e19c27e8da49cf18410138e3bf1 100644 (file)
@@ -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
index b8263671de217c653551c6da5c28c68a25df33e9..aed84914bf2bf1fbb016e2756f5310383b8d4c05 100644 (file)
@@ -40,7 +40,7 @@ do_install_append_openmn() {
 }
 
 
-pkg_postinst () {
+pkg_postinst_${PN} () {
        set -e
 
        if [ ! -e $D${sysconfdir}/passwd ] ; then
index dd2f0c5b5308fcbe091df3fc0e65b1fb10d7f7a4..ab7719c46918d822250bd459a12bfdd76c27b304 100644 (file)
@@ -63,12 +63,12 @@ do_install() {
        chmod 755 ${D}${sysconfdir}/init.d/dropbear
 }
 
-pkg_postinst () {
+pkg_postinst_${PN} () {
        update-alternatives --install ${bindir}/scp scp ${sbindir}/dropbearmulti 20
        update-alternatives --install ${bindir}/ssh ssh ${sbindir}/dropbearmulti 20
 }
 
-pkg_postrm_append () {
+pkg_postrm_append_${PN} () {
   if [ -f "${sysconfdir}/dropbear/dropbear_rsa_host_key" ]; then
         rm ${sysconfdir}/dropbear/dropbear_rsa_host_key
   fi
index 92014a80eee97dc5f9d922672c7d80ab3751a2ea..63e0acdba7907102bd4e1ec1f26bca1f58a5cf17 100644 (file)
@@ -31,7 +31,7 @@ do_compile_append() {
 
 FILES_sgml-common_append = " ${datadir}/sgml"
 
-pkg_postinst() {
+pkg_postinst_${PN}() {
        install-catalog \
                --add ${sysconfdir}/sgml/sgml-ent.cat \
                ${datadir}/sgml/sgml-iso-entities-8879.1986/catalog
@@ -41,7 +41,7 @@ pkg_postinst() {
                ${sysconfdir}/sgml/sgml-ent.cat
 }
 
-pkg_postrm() {
+pkg_postrm_${PN}() {
        install-catalog \
                --remove ${sysconfdir}/sgml/sgml-ent.cat \
                ${datadir}/sgml/sgml-iso-entities-8879.1986/catalog
index a87b87ff4b9c360f477f9c866b0b67dcab9574c6..ecbd75dadd16064858eb65b1090e732fb97d07bc 100644 (file)
@@ -27,7 +27,7 @@ do_configure () {
        oe_runconf
 }
 
-pkg_postinst () {
+pkg_postinst_${PN} () {
        touch $D${sysconfdir}/shells
        grep -q "bin/bash" $D${sysconfdir}/shells || echo /bin/bash >> $D${sysconfdir}/shells
        grep -q "bin/sh" $D${sysconfdir}/shells || echo /bin/sh >> $D${sysconfdir}/shells
index e5a3e3643d17f150f4eb17851f1a2089cbea6bb0..0912ad6aa8c79b7a332137740e5f7f2d6d7c359d 100644 (file)
@@ -28,7 +28,7 @@ do_configure () {
        oe_runconf
 }
 
-pkg_postinst () {
+pkg_postinst_${PN} () {
        touch $D${sysconfdir}/shells
        grep -q "bin/bash" $D${sysconfdir}/shells || echo /bin/bash >> $D${sysconfdir}/shells
        grep -q "bin/sh" $D${sysconfdir}/shells || echo /bin/sh >> $D${sysconfdir}/shells
index 1407bf10c58096f53128832778977a5e5660f5f5..6a04a9c0b09bc3854da0fa26a1a9851daee58ede 100644 (file)
@@ -23,7 +23,7 @@ do_configure_prepend () {
        fi
 }
 
-pkg_postinst() {
+pkg_postinst_${PN} () {
        if [ "x$D" != "x" ]; then
                exit 1
        fi
index 12d9d867219857ccb809ceb4eea3023131f38c09..c50d6eb3ffa6183bdf2fa012b9a324d0ad30c9bd 100644 (file)
@@ -32,7 +32,7 @@ do_install () {
        install -m 0644 License.txt ${D}${datadir}/doc/${PN}/
 }
 
-pkg_postinst () {
+pkg_postinst_${PN} () {
 #!/bin/sh
 fc-cache
 }
index 887536a4f007105d909e651bad896b6c41849893..f6bf0ce66fd25efbfde7115f7321f87c46eca6f3 100644 (file)
@@ -33,7 +33,7 @@ do_install () {
        install -m 0644 License.txt ${D}${datadir}/doc/${PN}/
 }
 
-pkg_postinst () {
+pkg_postinst_${PN} () {
 #!/bin/sh
 fc-cache
 }
index b9a75a77bbab732945bfb54ae5d418fb1dfd8202..bdeb4c19b5f8dec2460d22b3942066bf2794c1ee 100644 (file)
@@ -31,7 +31,7 @@ do_install () {
         done 
 } 
 
-pkg_postinst () {
+pkg_postinst_${PN} () {
 #!/bin/sh
 fc-cache
 }
index a473bb58c7a99ea8a7e4cb3f178285a4e94b99fe..a8ebbdaebd1dd5975b32809a3f6f0e3d87556f18 100644 (file)
@@ -10,7 +10,7 @@ PR = "r8"
 SRC_URI = "file://update-modules \
            file://COPYING.GPL"
 
-pkg_postinst() {
+pkg_postinst_${PN} () {
 if [ "x$D" != "x" ]; then
        exit 1
 fi