From e101642a61fc418273c1cd4d58a9564b4bdecc5c Mon Sep 17 00:00:00 2001 From: Kevin Tian Date: Wed, 11 Aug 2010 13:34:54 +0800 Subject: populate-volatile.sh: cleanup duplicated invocations and remove boot warning For one, populate-volatile.sh is itself a rcS script which is invoked earlier than package's own postinst method (last one in rcS). If package has already installed their volatile files correctly, it doesn't make sense to update volatile again in postinst since nothing is changed. On the other hand, dbus/hal are special since their user/group are only created in the target. If they pre-install volatiles like others, populate-volatile.sh will report "undefined user" since at that time their user/group haven't been created. The better way solving this is to generate their volatile in the fly after user/group are created, and then update volatiles. This fix [BUGID #121] Signed-off-by: Kevin Tian --- meta/packages/dbus/dbus-1.2.24/99_dbus | 1 - meta/packages/dbus/dbus.inc | 10 +++++----- meta/packages/dbus/dbus_1.2.24.bb | 2 +- meta/packages/devicekit/devicekit_git.bb | 4 +--- meta/packages/fontconfig/fontconfig_2.8.0.bb | 10 +--------- meta/packages/hal/files/99_hal | 2 -- meta/packages/hal/hal.inc | 6 +++--- meta/packages/hal/hal_0.5.14.bb | 2 +- meta/packages/hal/hal_git.bb | 2 +- meta/packages/networkmanager/networkmanager_svn.bb | 9 +-------- meta/packages/pam/pam_1.1.1.bb | 6 +----- meta/packages/wpa-supplicant/wpa-supplicant-0.7.inc | 2 -- meta/packages/wpa-supplicant/wpa-supplicant_0.7.2.bb | 2 +- meta/packages/yum/yum_3.2.27.bb | 6 +----- 14 files changed, 17 insertions(+), 47 deletions(-) delete mode 100644 meta/packages/dbus/dbus-1.2.24/99_dbus delete mode 100644 meta/packages/hal/files/99_hal diff --git a/meta/packages/dbus/dbus-1.2.24/99_dbus b/meta/packages/dbus/dbus-1.2.24/99_dbus deleted file mode 100644 index 6821ae4dba..0000000000 --- a/meta/packages/dbus/dbus-1.2.24/99_dbus +++ /dev/null @@ -1 +0,0 @@ -d messagebus messagebus 0755 /var/run/dbus none diff --git a/meta/packages/dbus/dbus.inc b/meta/packages/dbus/dbus.inc index a085287fc4..90a38e66a9 100644 --- a/meta/packages/dbus/dbus.inc +++ b/meta/packages/dbus/dbus.inc @@ -9,8 +9,7 @@ DEPENDS = "expat glib-2.0 virtual/libintl virtual/libx11 libsm" SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \ file://tmpdir.patch; \ file://fix-install-daemon.patch; \ - file://dbus-1.init \ - file://99_dbus" + file://dbus-1.init" inherit autotools pkgconfig gettext update-rc.d @@ -54,6 +53,10 @@ pkg_postinst_dbus() { grep -q netdev: /etc/group || addgroup netdev chmod u+s /usr/libexec/dbus-daemon-launch-helper + + # add volatile after new user/grp are created + echo "d messagebus messagebus 0755 /var/run/dbus none" > /etc/default/volatiles/99_dbus + /etc/init.d/populate-volatile.sh update } EXTRA_OECONF_X = "--with-x" @@ -70,9 +73,6 @@ EXTRA_OECONF = "--disable-tests \ do_install() { autotools_do_install - install -d ${D}/etc/default/volatiles - install -m 0644 ${WORKDIR}/99_dbus ${D}/etc/default/volatiles/ - install -d ${D}${sysconfdir}/init.d install -m 0755 ${WORKDIR}/dbus-1.init ${D}${sysconfdir}/init.d/dbus-1 } diff --git a/meta/packages/dbus/dbus_1.2.24.bb b/meta/packages/dbus/dbus_1.2.24.bb index f331b140aa..8e3e329fde 100644 --- a/meta/packages/dbus/dbus_1.2.24.bb +++ b/meta/packages/dbus/dbus_1.2.24.bb @@ -1,3 +1,3 @@ include dbus.inc -PR = "r0" +PR = "r1" diff --git a/meta/packages/devicekit/devicekit_git.bb b/meta/packages/devicekit/devicekit_git.bb index 06bcfd3f12..74b639f6c1 100644 --- a/meta/packages/devicekit/devicekit_git.bb +++ b/meta/packages/devicekit/devicekit_git.bb @@ -5,7 +5,7 @@ SRC_URI = "git://anongit.freedesktop.org/DeviceKit/DeviceKit;protocol=git \ file://volatile" PV = "002+git${SRCREV}" -PR = "r1" +PR = "r2" SRCREV = "014d168ba4bf40c9bae487bacff8bf2aa054b5f6" S = "${WORKDIR}/git" @@ -25,8 +25,6 @@ pkg_postinst_devicekit () { exit 1 fi - /etc/init.d/populate-volatile.sh update - DBUSPID=`pidof dbus-daemon` if [ "x$DBUSPID" != "x" ]; then diff --git a/meta/packages/fontconfig/fontconfig_2.8.0.bb b/meta/packages/fontconfig/fontconfig_2.8.0.bb index f83d72cdda..e0403ecb3c 100644 --- a/meta/packages/fontconfig/fontconfig_2.8.0.bb +++ b/meta/packages/fontconfig/fontconfig_2.8.0.bb @@ -11,7 +11,7 @@ SECTION = "libs" DEPENDS = "expat freetype zlib" -PR = "r0" +PR = "r1" SRC_URI = "http://fontconfig.org/release/fontconfig-${PV}.tar.gz \ file://fix-pkgconfig.patch \ @@ -73,17 +73,9 @@ do_configure_append () { } -do_install () { - autotools_do_install -} - do_install_append() { install -d ${D}${sysconfdir}/default/volatiles install -m 0644 ${WORKDIR}/97_fontconfig ${D}${sysconfdir}/default/volatiles rmdir ${D}${localstatedir}/cache/fontconfig rmdir ${D}${localstatedir}/cache/ } - -pkg_postinst_hal () { - /etc/init.d/populate-volatile.sh update -} diff --git a/meta/packages/hal/files/99_hal b/meta/packages/hal/files/99_hal deleted file mode 100644 index c82da990ba..0000000000 --- a/meta/packages/hal/files/99_hal +++ /dev/null @@ -1,2 +0,0 @@ -d root root 0700 /var/run/hald none -d haldaemon haldaemon 0755 /var/cache/hald none diff --git a/meta/packages/hal/hal.inc b/meta/packages/hal/hal.inc index 29ceadcfa6..839dfd0652 100644 --- a/meta/packages/hal/hal.inc +++ b/meta/packages/hal/hal.inc @@ -10,7 +10,6 @@ DEPENDS = "virtual/kernel dbus-glib udev util-linux intltool intltool-native exp RDEPENDS += "udev hal-info" SRC_URI = "http://hal.freedesktop.org/releases/hal-${PV}.tar.gz \ - file://99_hal \ file://20hal" inherit autotools pkgconfig @@ -37,8 +36,6 @@ PACKAGE_ARCH = "${@base_contains('MACHINE_FEATURES', 'pci', '${MACHINE_ARCH}', ' PACKAGE_ARCH_emenlow := "${PACKAGE_ARCH}" do_install_append() { - install -d ${D}/etc/default/volatiles - install -m 0644 ${WORKDIR}/99_hal ${D}/etc/default/volatiles install -d ${D}/etc/dbus-1/event.d install -m 0755 ${WORKDIR}/20hal ${D}/etc/dbus-1/event.d } @@ -53,6 +50,9 @@ pkg_postinst_hal () { grep haldaemon /etc/group || addgroup haldaemon grep haldaemon /etc/passwd || adduser --disabled-password --system --home /var/run/hald --no-create-home haldaemon --ingroup haldaemon -g HAL + # add volatile after new user/grp are created + echo "d root root 0700 /var/run/hald none" > /etc/default/volatiles/99_hal + echo "d haldaemon haldaemon 0755 /var/cache/hald none" >> /etc/default/volatiles/99_hal /etc/init.d/populate-volatile.sh update DBUSPID=`pidof dbus-daemon` diff --git a/meta/packages/hal/hal_0.5.14.bb b/meta/packages/hal/hal_0.5.14.bb index 470934a43e..a12be729cb 100644 --- a/meta/packages/hal/hal_0.5.14.bb +++ b/meta/packages/hal/hal_0.5.14.bb @@ -1,6 +1,6 @@ require hal.inc -PR = "r1" +PR = "r2" EXTRA_OECONF += "--with-linux-input-header=${STAGING_INCDIR}/linux/input.h" EXTRA_OEMAKE += "-e 'udevrulesdir=$(sysconfdir)/udev/rules.d'" diff --git a/meta/packages/hal/hal_git.bb b/meta/packages/hal/hal_git.bb index d9205ec945..baed472375 100644 --- a/meta/packages/hal/hal_git.bb +++ b/meta/packages/hal/hal_git.bb @@ -1,7 +1,7 @@ require hal.inc PV = "0.5.9.1+git${SRCDATE}" -PR = "r6" +PR = "r7" SRC_URI = "git://anongit.freedesktop.org/hal/;protocol=git \ file://20hal \ diff --git a/meta/packages/networkmanager/networkmanager_svn.bb b/meta/packages/networkmanager/networkmanager_svn.bb index f60496db70..40f04e497c 100644 --- a/meta/packages/networkmanager/networkmanager_svn.bb +++ b/meta/packages/networkmanager/networkmanager_svn.bb @@ -8,7 +8,7 @@ DEPENDS = "libnl dbus dbus-glib hal gconf-dbus wireless-tools ppp gnome-common p RDEPENDS = "hal wpa-supplicant iproute2 dhcp-client" PV = "0.7+svnr${SRCREV}" -PR = "r9" +PR = "r10" SRC_URI="svn://svn.gnome.org/svn/NetworkManager/;module=trunk;proto=http \ file://no-restarts.diff;patch=1;pnum=0 \ @@ -38,13 +38,6 @@ do_install_append () { rmdir ${D}/var/run } -pkg_postinst_${PN} () { - if [ "x$D" != "x" ]; then - exit 1 - fi - /etc/init.d/populate-volatile.sh update -} - PACKAGES =+ "libnmutil libnmglib" FILES_libnmutil += "${libdir}/libnm-util.so.*" diff --git a/meta/packages/pam/pam_1.1.1.bb b/meta/packages/pam/pam_1.1.1.bb index 7ef4d2d251..ad53a32f76 100644 --- a/meta/packages/pam/pam_1.1.1.bb +++ b/meta/packages/pam/pam_1.1.1.bb @@ -3,7 +3,7 @@ HOMEPAGE = "http://www.kernel.org/pub/linux/libs/pam/" BUGTRACKER = "http://sourceforge.net/projects/pam/support" # PAM allows dual licensed under GPL and BSD LICENSE = "GPLv2+ | BSD" -PR = "r1" +PR = "r2" SRC_URI = "http://www.kernel.org/pub/linux/libs/pam/library/Linux-PAM-${PV}.tar.bz2 \ file://disable_crossbinary.patch \ @@ -37,7 +37,3 @@ do_install() { install -d ${D}/etc/default/volatiles install -m 0644 ${WORKDIR}/99_pam ${D}/etc/default/volatiles } - -pkg_postinst_${PN} () { - /etc/init.d/populate-volatile.sh update -} diff --git a/meta/packages/wpa-supplicant/wpa-supplicant-0.7.inc b/meta/packages/wpa-supplicant/wpa-supplicant-0.7.inc index b1641061ff..78ce914c31 100644 --- a/meta/packages/wpa-supplicant/wpa-supplicant-0.7.inc +++ b/meta/packages/wpa-supplicant/wpa-supplicant-0.7.inc @@ -67,8 +67,6 @@ pkg_postinst_wpa-supplicant () { exit 1 fi - /etc/init.d/populate-volatile.sh update - DBUSPID=`pidof dbus-daemon` if [ "x$DBUSPID" != "x" ]; then diff --git a/meta/packages/wpa-supplicant/wpa-supplicant_0.7.2.bb b/meta/packages/wpa-supplicant/wpa-supplicant_0.7.2.bb index c6ebbaff4b..d1f6c6d6c9 100644 --- a/meta/packages/wpa-supplicant/wpa-supplicant_0.7.2.bb +++ b/meta/packages/wpa-supplicant/wpa-supplicant_0.7.2.bb @@ -1,3 +1,3 @@ require wpa-supplicant-0.7.inc -PR = "r0" +PR = "r1" diff --git a/meta/packages/yum/yum_3.2.27.bb b/meta/packages/yum/yum_3.2.27.bb index aff44ca6fe..acebc79dde 100644 --- a/meta/packages/yum/yum_3.2.27.bb +++ b/meta/packages/yum/yum_3.2.27.bb @@ -13,7 +13,7 @@ RDEPENDS = "python-rpm python-core python-iniparse python-urlgrabber \ python-textutils python-fcntl python-email \ yum-metadata-parser" -PR = "r8" +PR = "r9" SRC_URI = "http://yum.baseurl.org/download/3.2/yum-${PV}.tar.gz \ file://paths.patch;apply=yes \ @@ -41,10 +41,6 @@ do_install_append () { install -m 0644 ${WORKDIR}/98_yum ${D}/etc/default/volatiles } -pkg_postinst_yum () { - /etc/init.d/populate-volatile.sh update -} - FILES_${PN} += "${libdir}/python* ${datadir}/yum-cli" BBCLASSEXTEND = "native" -- cgit v1.2.3