summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/update-rc.d.bbclass58
1 files changed, 29 insertions, 29 deletions
diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
index df0d62c2c5..0248c646b6 100644
--- a/meta/classes/update-rc.d.bbclass
+++ b/meta/classes/update-rc.d.bbclass
@@ -39,35 +39,35 @@ python __anonymous() {
39} 39}
40 40
41python populate_packages_prepend () { 41python populate_packages_prepend () {
42 def update_rcd_package(pkg): 42 def update_rcd_package(pkg):
43 bb.debug(1, 'adding update-rc.d calls to postinst/postrm for %s' % pkg) 43 bb.debug(1, 'adding update-rc.d calls to postinst/postrm for %s' % pkg)
44 localdata = bb.data.createCopy(d) 44 localdata = bb.data.createCopy(d)
45 overrides = bb.data.getVar("OVERRIDES", localdata, 1) 45 overrides = bb.data.getVar("OVERRIDES", localdata, 1)
46 bb.data.setVar("OVERRIDES", "%s:%s" % (pkg, overrides), localdata) 46 bb.data.setVar("OVERRIDES", "%s:%s" % (pkg, overrides), localdata)
47 bb.data.update_data(localdata) 47 bb.data.update_data(localdata)
48 48
49 postinst = bb.data.getVar('pkg_postinst', localdata, 1) 49 postinst = bb.data.getVar('pkg_postinst', localdata, 1)
50 if not postinst: 50 if not postinst:
51 postinst = '#!/bin/sh\n' 51 postinst = '#!/bin/sh\n'
52 postinst += bb.data.getVar('updatercd_postinst', localdata, 1) 52 postinst += bb.data.getVar('updatercd_postinst', localdata, 1)
53 bb.data.setVar('pkg_postinst_%s' % pkg, postinst, d) 53 bb.data.setVar('pkg_postinst_%s' % pkg, postinst, d)
54 prerm = bb.data.getVar('pkg_prerm', localdata, 1) 54 prerm = bb.data.getVar('pkg_prerm', localdata, 1)
55 if not prerm: 55 if not prerm:
56 prerm = '#!/bin/sh\n' 56 prerm = '#!/bin/sh\n'
57 prerm += bb.data.getVar('updatercd_prerm', localdata, 1) 57 prerm += bb.data.getVar('updatercd_prerm', localdata, 1)
58 bb.data.setVar('pkg_prerm_%s' % pkg, prerm, d) 58 bb.data.setVar('pkg_prerm_%s' % pkg, prerm, d)
59 postrm = bb.data.getVar('pkg_postrm', localdata, 1) 59 postrm = bb.data.getVar('pkg_postrm', localdata, 1)
60 if not postrm: 60 if not postrm:
61 postrm = '#!/bin/sh\n' 61 postrm = '#!/bin/sh\n'
62 postrm += bb.data.getVar('updatercd_postrm', localdata, 1) 62 postrm += bb.data.getVar('updatercd_postrm', localdata, 1)
63 bb.data.setVar('pkg_postrm_%s' % pkg, postrm, d) 63 bb.data.setVar('pkg_postrm_%s' % pkg, postrm, d)
64 64
65 pkgs = bb.data.getVar('INITSCRIPT_PACKAGES', d, 1) 65 pkgs = bb.data.getVar('INITSCRIPT_PACKAGES', d, 1)
66 if pkgs == None: 66 if pkgs == None:
67 pkgs = bb.data.getVar('PN', d, 1) 67 pkgs = bb.data.getVar('PN', d, 1)
68 packages = (bb.data.getVar('PACKAGES', d, 1) or "").split() 68 packages = (bb.data.getVar('PACKAGES', d, 1) or "").split()
69 if not pkgs in packages and packages != []: 69 if not pkgs in packages and packages != []:
70 pkgs = packages[0] 70 pkgs = packages[0]
71 for pkg in pkgs.split(): 71 for pkg in pkgs.split():
72 update_rcd_package(pkg) 72 update_rcd_package(pkg)
73} 73}