summaryrefslogtreecommitdiffstats
path: root/meta/packages/meta/run-postinsts/run-postinsts.awk
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2007-11-05 16:08:56 +0000
committerRichard Purdie <richard@openedhand.com>2007-11-05 16:08:56 +0000
commit87c422828e1b8d2256e73924e8509e28708d8731 (patch)
tree64602b20a9c06c3afe1e4290ce55458fc678c142 /meta/packages/meta/run-postinsts/run-postinsts.awk
parent139d1570605aeef3238a173ca90d81bb791d6b8a (diff)
downloadpoky-87c422828e1b8d2256e73924e8509e28708d8731.tar.gz
Add run-postinsts. This runs any remaining postinstall scripts without needing ipkg/dpkg. Currently ipkg specific but this should be easy to change
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3069 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/meta/run-postinsts/run-postinsts.awk')
-rw-r--r--meta/packages/meta/run-postinsts/run-postinsts.awk25
1 files changed, 25 insertions, 0 deletions
diff --git a/meta/packages/meta/run-postinsts/run-postinsts.awk b/meta/packages/meta/run-postinsts/run-postinsts.awk
new file mode 100644
index 0000000000..1532577b6e
--- /dev/null
+++ b/meta/packages/meta/run-postinsts/run-postinsts.awk
@@ -0,0 +1,25 @@
1#
2# Copyright 2007 Openedhand Ltd.
3#
4# Author: Richard Purdie <rpurdie@openedhand.com>
5#
6# Rather hacky proof of concept
7#
8
9BEGIN {
10 package=""
11}
12/Package:.*/ {
13 package = substr($0, 10)
14}
15/Status:.*unpacked.*/ {
16 print "Configuring: " package > "/dev/stderr"
17 ret = system("/usr/lib/ipkg/info/" package ".postinst 1>&2")
18 if (ret == 0)
19 $0 = gensub("unpacked", "installed", 1)
20 else
21 print "Postinstall failed for " package > "/dev/stderr"
22}
23{
24 print $0
25}