summaryrefslogtreecommitdiffstats
path: root/meta/classes/package_rpm.bbclass
diff options
context:
space:
mode:
authorKang Kai <kai.kang@windriver.com>2013-03-01 18:02:14 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-03-01 13:03:29 +0000
commitb7cb3809309d2093990f8b6f930e96c7db827cee (patch)
tree8da7ba2ee7bcb949d3ee1404601da1a44e54b9d6 /meta/classes/package_rpm.bbclass
parent820a64bfb7b27e3aaa3b8c0228c4ed70b64c03d1 (diff)
downloadpoky-b7cb3809309d2093990f8b6f930e96c7db827cee.tar.gz
package_rpm.bbclass: name postinst files with package name
When create rootfs, some post install scripts need be run on device. They are saved under directory /etc/rpm-postinst and named with numbers such as 100, 101 etc. Update to name the postinst script file with its package name instead of just number. That may be more easy to debug when there is a error. [YOCTO #3218] (From OE-Core rev: 9b2a008c25a7a3152ae2d8c64ae8de2534471d47) Signed-off-by: Kang Kai <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package_rpm.bbclass')
-rw-r--r--meta/classes/package_rpm.bbclass11
1 files changed, 5 insertions, 6 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 7a1da33ead..225fc70f2f 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -383,12 +383,11 @@ export NATIVE_ROOT=${STAGING_DIR_NATIVE}
383\$2 \$1/\$3 \$4 383\$2 \$1/\$3 \$4
384if [ \$? -ne 0 ]; then 384if [ \$? -ne 0 ]; then
385 mkdir -p \$1/etc/rpm-postinsts 385 mkdir -p \$1/etc/rpm-postinsts
386 num=100 386 name=\`head -1 \$1/\$3 | cut -d' ' -f 2\`
387 while [ -e \$1/etc/rpm-postinsts/\${num} ]; do num=\$((num + 1)); done 387 echo "#!\$2" > \$1/etc/rpm-postinsts/\${name}
388 echo "#!\$2" > \$1/etc/rpm-postinsts/\${num} 388 echo "# Arg: \$4" >> \$1/etc/rpm-postinsts/\${name}
389 echo "# Arg: \$4" >> \$1/etc/rpm-postinsts/\${num} 389 cat \$1/\$3 >> \$1/etc/rpm-postinsts/\${name}
390 cat \$1/\$3 >> \$1/etc/rpm-postinsts/\${num} 390 chmod +x \$1/etc/rpm-postinsts/\${name}
391 chmod +x \$1/etc/rpm-postinsts/\${num}
392fi 391fi
393EOF 392EOF
394 393