summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/package_rpm.bbclass14
-rw-r--r--meta/classes/rootfs_deb.bbclass7
-rw-r--r--meta/classes/rootfs_ipk.bbclass7
3 files changed, 22 insertions, 6 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 98aa98b03b..36bad09ea1 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -391,6 +391,10 @@ EOF
391 fi 391 fi
392 392
393 # Construct install scriptlet wrapper 393 # Construct install scriptlet wrapper
394 # Scripts need to be ordered when executed, this ensures numeric order
395 # If we ever run into needing more the 899 scripts, we'll have to
396 # change num to start with 1000.
397 #
394 cat << EOF > ${WORKDIR}/scriptlet_wrapper 398 cat << EOF > ${WORKDIR}/scriptlet_wrapper
395#!/bin/bash 399#!/bin/bash
396 400
@@ -406,11 +410,13 @@ export NATIVE_ROOT=${STAGING_DIR_NATIVE}
406if [ \$? -ne 0 ]; then 410if [ \$? -ne 0 ]; then
407 if [ \$4 -eq 1 ]; then 411 if [ \$4 -eq 1 ]; then
408 mkdir -p \$1/etc/rpm-postinsts 412 mkdir -p \$1/etc/rpm-postinsts
413 num=100
414 while [ -e \$1/etc/rpm-postinsts/\${num}-* ]; do num=\$((num + 1)); done
409 name=\`head -1 \$1/\$3 | cut -d' ' -f 2\` 415 name=\`head -1 \$1/\$3 | cut -d' ' -f 2\`
410 echo "#!\$2" > \$1/etc/rpm-postinsts/\${name} 416 echo "#!\$2" > \$1/etc/rpm-postinsts/\${num}-\${name}
411 echo "# Arg: \$4" >> \$1/etc/rpm-postinsts/\${name} 417 echo "# Arg: \$4" >> \$1/etc/rpm-postinsts/\${num}-\${name}
412 cat \$1/\$3 >> \$1/etc/rpm-postinsts/\${name} 418 cat \$1/\$3 >> \$1/etc/rpm-postinsts/\${num}-\${name}
413 chmod +x \$1/etc/rpm-postinsts/\${name} 419 chmod +x \$1/etc/rpm-postinsts/\${num}-\${name}
414 else 420 else
415 echo "Error: pre/post remove scriptlet failed" 421 echo "Error: pre/post remove scriptlet failed"
416 fi 422 fi
diff --git a/meta/classes/rootfs_deb.bbclass b/meta/classes/rootfs_deb.bbclass
index 0161f7a718..b1c52f9dd6 100644
--- a/meta/classes/rootfs_deb.bbclass
+++ b/meta/classes/rootfs_deb.bbclass
@@ -107,9 +107,14 @@ delayed_postinsts () {
107} 107}
108 108
109save_postinsts () { 109save_postinsts () {
110 # Scripts need to be ordered when executed, this ensures numeric order
111 # If we ever run into needing more the 899 scripts, we'll have to
112 # change num to start with 1000.
113 num=100
110 for p in $(delayed_postinsts); do 114 for p in $(delayed_postinsts); do
111 install -d ${IMAGE_ROOTFS}${sysconfdir}/deb-postinsts 115 install -d ${IMAGE_ROOTFS}${sysconfdir}/deb-postinsts
112 cp ${IMAGE_ROOTFS}/var/lib/dpkg/info/$p.postinst ${IMAGE_ROOTFS}${sysconfdir}/deb-postinsts/$p 116 cp ${IMAGE_ROOTFS}/var/lib/dpkg/info/$p.postinst ${IMAGE_ROOTFS}${sysconfdir}/deb-postinsts/$num-$p
117 num=`echo \$((num+1))`
113 done 118 done
114} 119}
115 120
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index a37ab14df7..b0805dc329 100644
--- a/meta/classes/rootfs_ipk.bbclass
+++ b/meta/classes/rootfs_ipk.bbclass
@@ -106,9 +106,14 @@ delayed_postinsts () {
106} 106}
107 107
108save_postinsts () { 108save_postinsts () {
109 # Scripts need to be ordered when executed, this ensures numeric order
110 # If we ever run into needing more the 899 scripts, we'll have to
111 # change num to start with 1000.
112 num=100
109 for p in $(delayed_postinsts); do 113 for p in $(delayed_postinsts); do
110 install -d ${IMAGE_ROOTFS}${sysconfdir}/ipk-postinsts 114 install -d ${IMAGE_ROOTFS}${sysconfdir}/ipk-postinsts
111 cp ${IMAGE_ROOTFS}${OPKGLIBDIR}/opkg/info/$p.postinst ${IMAGE_ROOTFS}${sysconfdir}/ipk-postinsts/$p 115 cp ${IMAGE_ROOTFS}${OPKGLIBDIR}/opkg/info/$p.postinst ${IMAGE_ROOTFS}${sysconfdir}/ipk-postinsts/$num-$p
116 num=`echo \$((num+1))`
112 done 117 done
113} 118}
114 119