summaryrefslogtreecommitdiffstats
path: root/meta/classes/rootfs_ipk.bbclass
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2013-10-04 15:48:19 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-10-07 09:37:32 +0100
commit28eedee1d41c50298c27c7f119a938001f734ce5 (patch)
tree5a65d98cbf29bac178b448f6077ef09eb32a4d10 /meta/classes/rootfs_ipk.bbclass
parenta59aa9eebb638016e481f5a011d7e7ed58d5ee04 (diff)
downloadpoky-28eedee1d41c50298c27c7f119a938001f734ce5.tar.gz
run-postinst: Ensure that the postinsts are ordered
The postinst files were being generated using purely the name of the package, this unfortunately meant the run order would be based on the name of the package and not the order in which it was installed on the filesystem. If package A requires package Z to be fully installed, this causes a problem. Note: rpm - as the rpm based install proceeds the order is defined and captured. so the problem is resolved there. ipk - this unfortunately does not appear to solve the problem for ipk, as the status file is not ordered in any appreciable way. This does not cause any regressions however and sets the stage for a proper fix. deb - this -may- fix the deb install. Early testing indicates at least some ordering to the status file. But it's unclear if it completely resolves the issue. (From OE-Core rev: b5bafccb89f45d7cdd515b4ba45e0152ca7922de) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/rootfs_ipk.bbclass')
-rw-r--r--meta/classes/rootfs_ipk.bbclass7
1 files changed, 6 insertions, 1 deletions
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