Bug 3172

Summary: rootfs_rpm.bbclass: maybe no rpm postinst script
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Robert Yang <liezhi.yang>
Component: coreAssignee: Robert Yang <liezhi.yang>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: jessica.zhang, meta.mr.watcher, meta.watcher, sgw, yi.zhao, zhenfeng.zhao
Version: 1.3   
Target Milestone: 1.4 M1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Robert Yang 2012-09-26 07:25:11 UTC
The following code in rootfs_rpm.bbclass:

        for i in ${IMAGE_ROOTFS}/etc/rpm-postinsts/*; do
                echo "Delayed package scriptlet: `head -n 3 $i | tail -n 1`"
        done


There maybe no rpm postinst script (e.g., core-image-minimal), and the "*" is not expanded, then there would be error:

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

We should check whether it exists or not.
Comment 2 Yi Zhao 2012-11-30 09:47:12 UTC
Verified with 1.4_M1. 
gitinfo: 247b6a3754c2c50318e2a73d79981ba0e9cb560b

When build a minimal image, there is no such error.