aboutsummaryrefslogtreecommitdiffstats
path: root/classes/update-rc.d.bbclass
diff options
context:
space:
mode:
authorJohn Bowler <jbowler@nslu2-linux.org>2005-05-25 07:50:44 +0000
committerJohn Bowler <jbowler@nslu2-linux.org>2005-05-25 07:50:44 +0000
commitb59f7b5c9da751e5ef22f523565239cd75d76f74 (patch)
treeb3c914b11c7952d7c3533d62e9718310a6ac2c07 /classes/update-rc.d.bbclass
parent7e21c43a4a6405132c81a81d9f6af07b24cd9f27 (diff)
downloadopenembedded-b59f7b5c9da751e5ef22f523565239cd75d76f74.tar.gz
Merge marsco.kalmiopsis:/home/nslu2/openembedded
into marsco.kalmiopsis:/home/nslu2/ref 2005/05/25 00:48:22-07:00 kalmiopsis!jbowler Bump PR to give the merged .bb a new number. 2005/05/25 00:44:57-07:00 kalmiopsis!jbowler Bump PR for merge 2005/05/24 22:51:42+02:00 hrw.one.pl!hrw unified qpf-dejavu build updated DejaVu font to 1.10 2005/05/24 22:10:55+02:00 uni-frankfurt.de!mickeyl Merge bk://oe-devel@oe-devel.bkbits.net/openembedded into r2d2.tm.informatik.uni-frankfurt.de:/local/pkg/oe/packages 2005/05/24 22:10:41+02:00 uni-frankfurt.de!mickeyl remove opie-tabmanager which has gone to unsupported upstream 2005/05/24 20:21:04+01:00 reciva.com!pb ship busybox httpd bits in a separate package; include update-rc.d call and /srv/www directory 2005/05/24 20:16:43+01:00 reciva.com!pb support multiple subpackages with different update-rc.d requirements BKrev: 42942e54d1EfSGoGC-vVDT7ppNTuRQ
Diffstat (limited to 'classes/update-rc.d.bbclass')
-rw-r--r--classes/update-rc.d.bbclass50
1 files changed, 31 insertions, 19 deletions
diff --git a/classes/update-rc.d.bbclass b/classes/update-rc.d.bbclass
index 894db65f93..c3ee89dfb9 100644
--- a/classes/update-rc.d.bbclass
+++ b/classes/update-rc.d.bbclass
@@ -22,26 +22,38 @@ update-rc.d $D ${INITSCRIPT_NAME} remove
}
python __anonymous() {
- if bb.data.getVar('INITSCRIPT_NAME', d) == None:
- raise bb.build.FuncFailed, "%s inherits update-rc.d but doesn't set INITSCRIPT_NAME" % bb.data.getVar('FILE', d)
- if bb.data.getVar('INITSCRIPT_PARAMS', d) == None:
- raise bb.build.FuncFailed, "%s inherits update-rc.d but doesn't set INITSCRIPT_PARAMS" % bb.data.getVar('FILE', d)
+ if bb.data.getVar('INITSCRIPT_PACKAGES', d) == None:
+ if bb.data.getVar('INITSCRIPT_NAME', d) == None:
+ raise bb.build.FuncFailed, "%s inherits update-rc.d but doesn't set INITSCRIPT_NAME" % bb.data.getVar('FILE', d)
+ if bb.data.getVar('INITSCRIPT_PARAMS', d) == None:
+ raise bb.build.FuncFailed, "%s inherits update-rc.d but doesn't set INITSCRIPT_PARAMS" % bb.data.getVar('FILE', d)
}
python populate_packages_prepend () {
- pkg = bb.data.getVar('PN', d, 1)
- packages = (bb.data.getVar('PACKAGES', d, 1) or "").split()
- if not pkg in packages:
- pkg = packages[0]
- bb.debug(1, 'adding update-rc.d calls to postinst/postrm for %s' % pkg)
- postinst = bb.data.getVar('pkg_postinst_%s' % pkg, d, 1) or bb.data.getVar('pkg_postinst', d, 1)
- if not postinst:
- postinst = '#!/bin/sh\n'
- postinst += bb.data.getVar('updatercd_postinst', d, 1)
- bb.data.setVar('pkg_postinst_%s' % pkg, postinst, d)
- postrm = bb.data.getVar('pkg_postrm_%s' % pkg, d, 1) or bb.data.getVar('pkg_postrm', d, 1)
- if not postrm:
- postrm = '#!/bin/sh\n'
- postrm += bb.data.getVar('updatercd_postrm', d, 1)
- bb.data.setVar('pkg_postrm_%s' % pkg, postrm, d)
+ def update_rcd_package(pkg):
+ bb.debug(1, 'adding update-rc.d calls to postinst/postrm for %s' % pkg)
+ localdata = bb.data.createCopy(d)
+ overrides = bb.data.getVar("OVERRIDES", localdata, 1)
+ bb.data.setVar("OVERRIDES", "%s:%s" % (pkg, overrides), localdata)
+ bb.data.update_data(localdata)
+
+ postinst = bb.data.getVar('pkg_postinst', localdata, 1)
+ if not postinst:
+ postinst = '#!/bin/sh\n'
+ postinst += bb.data.getVar('updatercd_postinst', localdata, 1)
+ bb.data.setVar('pkg_postinst_%s' % pkg, postinst, d)
+ postrm = bb.data.getVar('pkg_postrm', localdata, 1)
+ if not postrm:
+ postrm = '#!/bin/sh\n'
+ postrm += bb.data.getVar('updatercd_postrm', localdata, 1)
+ bb.data.setVar('pkg_postrm_%s' % pkg, postrm, d)
+
+ pkgs = bb.data.getVar('INITSCRIPT_PACKAGES', d, 1)
+ if pkgs == None:
+ pkgs = bb.data.getVar('PN', d, 1)
+ packages = (bb.data.getVar('PACKAGES', d, 1) or "").split()
+ if not pkgs in packages:
+ pkgs = packages[0]
+ for pkg in pkgs.split():
+ update_rcd_package(pkg)
}