diff options
author | Richard Purdie <richard@openedhand.com> | 2008-05-20 12:37:49 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2008-05-20 12:37:49 +0000 |
commit | b8d979bf08cf23ddc722ccb241341d9db5be18ba (patch) | |
tree | c53e7bfea0e3eae70a375fed72ff67184e3232af /meta/packages | |
parent | 8b600697063be023882333d866e20ba8fac8dc81 (diff) | |
download | poky-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')
-rwxr-xr-x | meta/packages/meta/run-postinsts/run-postinsts | 12 | ||||
-rw-r--r-- | meta/packages/meta/run-postinsts/run-postinsts.awk | 7 | ||||
-rw-r--r-- | meta/packages/meta/run-postinsts_1.0.bb | 2 |
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 | ||
8 | PKGSYSTEM=/usr/lib/opkg | 8 | PKGSYSTEM=/usr/dpkg |
9 | |||
10 | if [ ! -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 | ||
17 | fi | ||
18 | |||
9 | STAMP=$PKGSYSTEM/postinsts-done | 19 | STAMP=$PKGSYSTEM/postinsts-done |
10 | STATFILE=$PKGSYSTEM/status | 20 | STATFILE=$PKGSYSTEM/status |
11 | STATFILE2=$PKGSYSTEM/status2 | 21 | STATFILE2=$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 | ||
9 | BEGIN { | 9 | BEGIN { |
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 @@ | |||
1 | DESCRIPTION = "Run postinstall scripts on device using awk" | 1 | DESCRIPTION = "Run postinstall scripts on device using awk" |
2 | SECTION = "devel" | 2 | SECTION = "devel" |
3 | PR = "r1" | 3 | PR = "r4" |
4 | 4 | ||
5 | SRC_URI = "file://run-postinsts file://run-postinsts.awk" | 5 | SRC_URI = "file://run-postinsts file://run-postinsts.awk" |
6 | 6 | ||