summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/opkg
diff options
context:
space:
mode:
authorGary Thomas <gary@mlbassoc.com>2011-04-18 08:23:27 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-04-24 22:50:21 +0100
commit8e7f1b444e2ea3cc7fe7ddbf0568f4eee15a33b0 (patch)
tree4464709acb9f8adcb37b640dcc78d24d879f8081 /meta/recipes-devtools/opkg
parent46197c431d283022acbdec6596f1904d15b545b0 (diff)
downloadpoky-8e7f1b444e2ea3cc7fe7ddbf0568f4eee15a33b0.tar.gz
Control over when package init scripts are run
When a package is built, some installation scripts must be performed on the target. In the case of a complete image, these scripts are run by a separate step at init time, but only during the first boot (other package install scripts can just be run when the package is installed on the target). This patch lets the distribution (or user) decide when these postponed install scripts should run. The default is normally near the end of init, but there may be times when it's beneficial to run them earlier so the "when" can be overridden. (From OE-Core rev: a46466893407d44dd16ab37ae70e1bee14bdde0a) Signed-off-by: Gary Thomas <gary@mlbassoc.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/opkg')
-rw-r--r--meta/recipes-devtools/opkg/opkg.inc4
-rw-r--r--meta/recipes-devtools/opkg/opkg_0.1.8.bb13
-rw-r--r--meta/recipes-devtools/opkg/opkg_svn.bb13
3 files changed, 12 insertions, 18 deletions
diff --git a/meta/recipes-devtools/opkg/opkg.inc b/meta/recipes-devtools/opkg/opkg.inc
index c3174917a5..50f1afc1fe 100644
--- a/meta/recipes-devtools/opkg/opkg.inc
+++ b/meta/recipes-devtools/opkg/opkg.inc
@@ -34,3 +34,7 @@ BBCLASSEXTEND = "native nativesdk"
34 34
35PKGSUFFIX = "" 35PKGSUFFIX = ""
36PKGSUFFIX_virtclass-nativesdk = "-nativesdk" 36PKGSUFFIX_virtclass-nativesdk = "-nativesdk"
37
38# Define a variable to allow distros to run configure earlier.
39# (for example, to enable loading of ethernet kernel modules before networking starts)
40POSTINSTALL_INITPOSITION ?= "98"
diff --git a/meta/recipes-devtools/opkg/opkg_0.1.8.bb b/meta/recipes-devtools/opkg/opkg_0.1.8.bb
index 6815474207..18cf0428ce 100644
--- a/meta/recipes-devtools/opkg/opkg_0.1.8.bb
+++ b/meta/recipes-devtools/opkg/opkg_0.1.8.bb
@@ -13,7 +13,7 @@ SRC_URI = "http://opkg.googlecode.com/files/opkg-${PV}.tar.gz \
13 file://headerfix.patch \ 13 file://headerfix.patch \
14" 14"
15 15
16PR = "r3" 16PR = "r4"
17 17
18PACKAGES =+ "libopkg${PKGSUFFIX}-dev libopkg${PKGSUFFIX} update-alternatives-cworth${PKGSUFFIX}" 18PACKAGES =+ "libopkg${PKGSUFFIX}-dev libopkg${PKGSUFFIX} update-alternatives-cworth${PKGSUFFIX}"
19 19
@@ -26,11 +26,6 @@ do_install_append() {
26 install -d ${D}${localstatedir}/lib/opkg 26 install -d ${D}${localstatedir}/lib/opkg
27} 27}
28 28
29# Define a variable to allow distros to run configure earlier.
30# (for example, to enable loading of ethernet kernel modules before networking starts)
31OPKG_INIT_POSITION = "98"
32OPKG_INIT_POSITION_slugos = "41"
33
34pkg_postinst_${PN} () { 29pkg_postinst_${PN} () {
35#!/bin/sh 30#!/bin/sh
36if [ "x$D" != "x" ]; then 31if [ "x$D" != "x" ]; then
@@ -38,9 +33,9 @@ if [ "x$D" != "x" ]; then
38 # this happens at S98 where our good 'ole packages script used to run 33 # this happens at S98 where our good 'ole packages script used to run
39 echo "#!/bin/sh 34 echo "#!/bin/sh
40opkg-cl configure 35opkg-cl configure
41rm -f /${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure 36rm -f /${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}configure
42" > $D${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure 37" > $D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}configure
43 chmod 0755 $D${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure 38 chmod 0755 $D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}configure
44fi 39fi
45 40
46update-alternatives --install ${bindir}/opkg opkg ${bindir}/opkg-cl 100 41update-alternatives --install ${bindir}/opkg opkg ${bindir}/opkg-cl 100
diff --git a/meta/recipes-devtools/opkg/opkg_svn.bb b/meta/recipes-devtools/opkg/opkg_svn.bb
index 76ec838875..d8af823c7c 100644
--- a/meta/recipes-devtools/opkg/opkg_svn.bb
+++ b/meta/recipes-devtools/opkg/opkg_svn.bb
@@ -16,7 +16,7 @@ SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;proto=http \
16S = "${WORKDIR}/trunk" 16S = "${WORKDIR}/trunk"
17 17
18PV = "0.1.8+svnr${SRCPV}" 18PV = "0.1.8+svnr${SRCPV}"
19PR = "r1" 19PR = "r2"
20 20
21PACKAGES =+ "libopkg${PKGSUFFIX}-dev libopkg${PKGSUFFIX} update-alternatives-cworth${PKGSUFFIX}" 21PACKAGES =+ "libopkg${PKGSUFFIX}-dev libopkg${PKGSUFFIX} update-alternatives-cworth${PKGSUFFIX}"
22 22
@@ -29,11 +29,6 @@ do_install_append() {
29 install -d ${D}${localstatedir}/lib/opkg 29 install -d ${D}${localstatedir}/lib/opkg
30} 30}
31 31
32# Define a variable to allow distros to run configure earlier.
33# (for example, to enable loading of ethernet kernel modules before networking starts)
34OPKG_INIT_POSITION = "98"
35OPKG_INIT_POSITION_slugos = "41"
36
37pkg_postinst_${PN} () { 32pkg_postinst_${PN} () {
38#!/bin/sh 33#!/bin/sh
39if [ "x$D" != "x" ]; then 34if [ "x$D" != "x" ]; then
@@ -41,9 +36,9 @@ if [ "x$D" != "x" ]; then
41 # this happens at S98 where our good 'ole packages script used to run 36 # this happens at S98 where our good 'ole packages script used to run
42 echo "#!/bin/sh 37 echo "#!/bin/sh
43opkg-cl configure 38opkg-cl configure
44rm -f /${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure 39rm -f /${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}configure
45" > $D${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure 40" > $D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}configure
46 chmod 0755 $D${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure 41 chmod 0755 $D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}configure
47fi 42fi
48 43
49update-alternatives --install ${bindir}/opkg opkg ${bindir}/opkg-cl 100 44update-alternatives --install ${bindir}/opkg opkg ${bindir}/opkg-cl 100