]> code.ossystems Code Review - openembedded-core.git/commitdiff
rootfs_rpm.bbclass: fix the unexpected postinst error
authorChen Qi <Qi.Chen@windriver.com>
Tue, 22 Jan 2013 08:44:05 +0000 (16:44 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 22 Jan 2013 15:54:26 +0000 (15:54 +0000)
If the /etc/rpm-postinsts/ directory was empty, the following error
would occur at system startup.

      ERROR: postinst /etc/rpm-postinsts/* failed

This patch fixes this issue.

[YOCTO #3767]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/rootfs_rpm.bbclass

index 7d789cc8fdc917b89050e078b679df8534321d6f..accd7d9c3c76e2c23b380ec1febc35fcf76c0bc1 100644 (file)
@@ -108,7 +108,8 @@ fakeroot rootfs_rpm_do_rootfs () {
        i=\$i
        cat > ${IMAGE_ROOTFS}${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts << EOF
 #!/bin/sh
-for i in /etc/rpm-postinsts/*; do
+for i in `ls /etc/rpm-postinsts/`; do
+       i=/etc/rpm-postinsts/$i
        echo "Running postinst $i..."
        if [ -f $i ] && $i; then
                rm $i