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 <kevin.tian@intel.com>
This commit is contained in:
Kevin Tian
2010-08-11 13:34:54 +08:00
committed by Richard Purdie
parent cf1e754b3f
commit e101642a61
14 changed files with 17 additions and 47 deletions

View File

@@ -1,2 +0,0 @@
d root root 0700 /var/run/hald none
d haldaemon haldaemon 0755 /var/cache/hald none

View File

@@ -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`

View File

@@ -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'"

View File

@@ -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 \