summaryrefslogtreecommitdiffstats
path: root/meta/packages/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2008-05-20 12:37:49 +0000
committerRichard Purdie <richard@openedhand.com>2008-05-20 12:37:49 +0000
commitb8d979bf08cf23ddc722ccb241341d9db5be18ba (patch)
treec53e7bfea0e3eae70a375fed72ff67184e3232af /meta/packages/meta
parent8b600697063be023882333d866e20ba8fac8dc81 (diff)
downloadpoky-b8d979bf08cf23ddc722ccb241341d9db5be18ba.tar.gz
run-postinsts: Handle dpkg based images too
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4507 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/meta')
-rwxr-xr-xmeta/packages/meta/run-postinsts/run-postinsts12
-rw-r--r--meta/packages/meta/run-postinsts/run-postinsts.awk7
-rw-r--r--meta/packages/meta/run-postinsts_1.0.bb2
3 files changed, 18 insertions, 3 deletions
diff --git a/meta/packages/meta/run-postinsts/run-postinsts b/meta/packages/meta/run-postinsts/run-postinsts
index cb24a623fd..46b3327f4f 100755
--- a/meta/packages/meta/run-postinsts/run-postinsts
+++ b/meta/packages/meta/run-postinsts/run-postinsts
@@ -5,7 +5,17 @@
5# Author: Richard Purdie <rpurdie@openedhand.com> 5# Author: Richard Purdie <rpurdie@openedhand.com>
6# 6#
7 7
8PKGSYSTEM=/usr/lib/opkg 8PKGSYSTEM=/usr/dpkg
9
10if [ ! -e $PKGSYSTEM/status ]; then
11 if [ -e /usr/lib/opkg/status ]; then
12 PKGSYSTEM=/usr/lib/opkg
13 else
14 echo "No package system found"
15 exit 1
16 fi
17fi
18
9STAMP=$PKGSYSTEM/postinsts-done 19STAMP=$PKGSYSTEM/postinsts-done
10STATFILE=$PKGSYSTEM/status 20STATFILE=$PKGSYSTEM/status
11STATFILE2=$PKGSYSTEM/status2 21STATFILE2=$PKGSYSTEM/status2
diff --git a/meta/packages/meta/run-postinsts/run-postinsts.awk b/meta/packages/meta/run-postinsts/run-postinsts.awk
index 46ee8df9a4..bdea8c95ad 100644
--- a/meta/packages/meta/run-postinsts/run-postinsts.awk
+++ b/meta/packages/meta/run-postinsts/run-postinsts.awk
@@ -7,6 +7,11 @@
7# 7#
8 8
9BEGIN { 9BEGIN {
10 rc=system("test -d /usr/dpkg/info/")
11 if (rc==0)
12 pkgdir="/usr/dpkg/info"
13 else
14 pkgdir="/usr/lib/opkg/info"
10 package="" 15 package=""
11} 16}
12/Package:.*/ { 17/Package:.*/ {
@@ -14,7 +19,7 @@ BEGIN {
14} 19}
15/Status:.*unpacked.*/ { 20/Status:.*unpacked.*/ {
16 print "Configuring: " package > "/dev/stderr" 21 print "Configuring: " package > "/dev/stderr"
17 ret = system("/usr/lib/opkg/info/" package ".postinst 1>&2") 22 ret = system(pkgdir "/" package ".postinst 1>&2")
18 if (ret == 0) 23 if (ret == 0)
19 $0 = gensub("unpacked", "installed", 1) 24 $0 = gensub("unpacked", "installed", 1)
20 else 25 else
diff --git a/meta/packages/meta/run-postinsts_1.0.bb b/meta/packages/meta/run-postinsts_1.0.bb
index bf132f51f3..ec34127385 100644
--- a/meta/packages/meta/run-postinsts_1.0.bb
+++ b/meta/packages/meta/run-postinsts_1.0.bb
@@ -1,6 +1,6 @@
1DESCRIPTION = "Run postinstall scripts on device using awk" 1DESCRIPTION = "Run postinstall scripts on device using awk"
2SECTION = "devel" 2SECTION = "devel"
3PR = "r1" 3PR = "r4"
4 4
5SRC_URI = "file://run-postinsts file://run-postinsts.awk" 5SRC_URI = "file://run-postinsts file://run-postinsts.awk"
6 6