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]

(From OE-Core rev: 966c72e00c8d378d7d189f0e4b626f6782d23a25)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Robert Yang 2012-09-26 17:22:16 +08:00 committed by Richard Purdie
parent c45a7d127e
commit 553d9dbe0e
1 changed files with 3 additions and 1 deletions

View 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