From 966c72e00c8d378d7d189f0e4b626f6782d23a25 Mon Sep 17 00:00:00 2001 From: Robert Yang Date: Wed, 26 Sep 2012 17:22:16 +0800 Subject: rootfs_rpm.bbclass: maybe no rpm postinst script 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 Signed-off-by: Saul Wold --- meta/classes/rootfs_rpm.bbclass | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'meta/classes') diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass index d95ccfad2b..c86cd094ff 100644 --- a/meta/classes/rootfs_rpm.bbclass +++ b/meta/classes/rootfs_rpm.bbclass @@ -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 -- cgit v1.2.3