]> code.ossystems Code Review - openembedded-core.git/commitdiff
rootfs_rpm.bbclass: maybe no rpm postinst script
authorRobert Yang <liezhi.yang@windriver.com>
Wed, 26 Sep 2012 09:22:16 +0000 (17:22 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 24 Oct 2012 11:47:28 +0000 (12:47 +0100)
There maybe no rpm postinst script (e.g., core-image-minimal), then the
"*" is not expanded, and there would be error:

head: cannot open `rpm-postinsts/*' for reading: No such file or directory

Check whether it exists or not will fix the problem.

[YOCTO #3172]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/classes/rootfs_rpm.bbclass

index d95ccfad2bdebbfe06d23845e72333cc8218e756..c86cd094ff1234d6aa37fde51849f0cca25c6ea6 100644 (file)
@@ -81,7 +81,9 @@ fakeroot rootfs_rpm_do_rootfs () {
 
        # Report delayed package scriptlets
        for i in ${IMAGE_ROOTFS}/etc/rpm-postinsts/*; do
-               echo "Delayed package scriptlet: `head -n 3 $i | tail -n 1`"
+               if [ -f $i ]; then
+                       echo "Delayed package scriptlet: `head -n 3 $i | tail -n 1`"
+               fi
        done
 
        install -d ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d