mirror of
https://git.yoctoproject.org/poky
synced 2026-06-03 01:40:07 +00:00
run-postinsts: Handle dpkg based images too
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4507 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
@@ -5,7 +5,17 @@
|
|||||||
# Author: Richard Purdie <rpurdie@openedhand.com>
|
# Author: Richard Purdie <rpurdie@openedhand.com>
|
||||||
#
|
#
|
||||||
|
|
||||||
PKGSYSTEM=/usr/lib/opkg
|
PKGSYSTEM=/usr/dpkg
|
||||||
|
|
||||||
|
if [ ! -e $PKGSYSTEM/status ]; then
|
||||||
|
if [ -e /usr/lib/opkg/status ]; then
|
||||||
|
PKGSYSTEM=/usr/lib/opkg
|
||||||
|
else
|
||||||
|
echo "No package system found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
STAMP=$PKGSYSTEM/postinsts-done
|
STAMP=$PKGSYSTEM/postinsts-done
|
||||||
STATFILE=$PKGSYSTEM/status
|
STATFILE=$PKGSYSTEM/status
|
||||||
STATFILE2=$PKGSYSTEM/status2
|
STATFILE2=$PKGSYSTEM/status2
|
||||||
|
|||||||
@@ -7,6 +7,11 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
BEGIN {
|
BEGIN {
|
||||||
|
rc=system("test -d /usr/dpkg/info/")
|
||||||
|
if (rc==0)
|
||||||
|
pkgdir="/usr/dpkg/info"
|
||||||
|
else
|
||||||
|
pkgdir="/usr/lib/opkg/info"
|
||||||
package=""
|
package=""
|
||||||
}
|
}
|
||||||
/Package:.*/ {
|
/Package:.*/ {
|
||||||
@@ -14,7 +19,7 @@ BEGIN {
|
|||||||
}
|
}
|
||||||
/Status:.*unpacked.*/ {
|
/Status:.*unpacked.*/ {
|
||||||
print "Configuring: " package > "/dev/stderr"
|
print "Configuring: " package > "/dev/stderr"
|
||||||
ret = system("/usr/lib/opkg/info/" package ".postinst 1>&2")
|
ret = system(pkgdir "/" package ".postinst 1>&2")
|
||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
$0 = gensub("unpacked", "installed", 1)
|
$0 = gensub("unpacked", "installed", 1)
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
DESCRIPTION = "Run postinstall scripts on device using awk"
|
DESCRIPTION = "Run postinstall scripts on device using awk"
|
||||||
SECTION = "devel"
|
SECTION = "devel"
|
||||||
PR = "r1"
|
PR = "r4"
|
||||||
|
|
||||||
SRC_URI = "file://run-postinsts file://run-postinsts.awk"
|
SRC_URI = "file://run-postinsts file://run-postinsts.awk"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user