summaryrefslogtreecommitdiffstats
path: root/meta/classes/package_rpm.bbclass
diff options
context:
space:
mode:
authorLaurentiu Palcu <laurentiu.palcu@intel.com>2013-06-05 12:16:50 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-06-11 15:38:05 +0100
commit75070d70320dc6516acf53e4bb36e7a091459138 (patch)
tree2b6bb48a2e440ff14336911a5dd0f6dbac5be091 /meta/classes/package_rpm.bbclass
parente4a136a6bd0a850284a3ab74e513c936c1641e78 (diff)
downloadpoky-75070d70320dc6516acf53e4bb36e7a091459138.tar.gz
package_rpm.bbclass: handle pre/post remove scriptlets
Currently the scriptlet_wrapper is designed to handle only pre/post install scriptlets. This patch will slightly change the wrapper script to handle also pre/post remove scriptlets when we want to remove packages from the final image. (From OE-Core rev: aea47c77d69407b2e62f151cabba35293d179f0c) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.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.bbclass16
1 files changed, 10 insertions, 6 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 648327f41d..c654cdb5e8 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -382,12 +382,16 @@ export NATIVE_ROOT=${STAGING_DIR_NATIVE}
382 382
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 if [ \$4 -eq 1 ]; then
386 name=\`head -1 \$1/\$3 | cut -d' ' -f 2\` 386 mkdir -p \$1/etc/rpm-postinsts
387 echo "#!\$2" > \$1/etc/rpm-postinsts/\${name} 387 name=\`head -1 \$1/\$3 | cut -d' ' -f 2\`
388 echo "# Arg: \$4" >> \$1/etc/rpm-postinsts/\${name} 388 echo "#!\$2" > \$1/etc/rpm-postinsts/\${name}
389 cat \$1/\$3 >> \$1/etc/rpm-postinsts/\${name} 389 echo "# Arg: \$4" >> \$1/etc/rpm-postinsts/\${name}
390 chmod +x \$1/etc/rpm-postinsts/\${name} 390 cat \$1/\$3 >> \$1/etc/rpm-postinsts/\${name}
391 chmod +x \$1/etc/rpm-postinsts/\${name}
392 else
393 echo "Error: pre/post remove scriptlet failed"
394 fi
391fi 395fi
392EOF 396EOF
393 397