summaryrefslogtreecommitdiffstats
path: root/meta/classes/update-rc.d.bbclass
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2013-02-08 22:43:16 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-02-11 14:46:10 +0000
commit3936cef145b698f6c116661d1b7902ba56796ea3 (patch)
treedf4f0bbb1c7ad0ec20bc2ab4c606017be5cb7fcb /meta/classes/update-rc.d.bbclass
parentaaa915bf12034b74fe4a84d173304376565498d9 (diff)
downloadpoky-3936cef145b698f6c116661d1b7902ba56796ea3.tar.gz
update-rc.d: don't do anything if systemd.bbclass is inherited
We need the update-rc.d class to work when systemd is being used so that packages that only have SysV init scripts still work. However if a recipe supports both we don't want to install SysV and systemd files under systemd. To solve this, before doing real work in update-rc.d check if the systemd class has been inherited and don't do anything if it has. (From OE-Core rev: 0273a22fec3c9360df2510b759c5bf9af610551f) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/update-rc.d.bbclass')
-rw-r--r--meta/classes/update-rc.d.bbclass19
1 files changed, 11 insertions, 8 deletions
diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
index f9d55fbec8..51ad8b1ae9 100644
--- a/meta/classes/update-rc.d.bbclass
+++ b/meta/classes/update-rc.d.bbclass
@@ -75,12 +75,15 @@ python populate_packages_updatercd () {
75 postrm += d.getVar('updatercd_postrm', True) 75 postrm += d.getVar('updatercd_postrm', True)
76 d.setVar('pkg_postrm_%s' % pkg, postrm) 76 d.setVar('pkg_postrm_%s' % pkg, postrm)
77 77
78 pkgs = d.getVar('INITSCRIPT_PACKAGES', True) 78 # If the systemd class has also been inherited, then don't do anything as
79 if pkgs == None: 79 # the systemd units will override anything created by update-rc.d.
80 pkgs = d.getVar('UPDATERCPN', True) 80 if not d.getVar("SYSTEMD_BBCLASS_ENABLED", True):
81 packages = (d.getVar('PACKAGES', True) or "").split() 81 pkgs = d.getVar('INITSCRIPT_PACKAGES', True)
82 if not pkgs in packages and packages != []: 82 if pkgs == None:
83 pkgs = packages[0] 83 pkgs = d.getVar('UPDATERCPN', True)
84 for pkg in pkgs.split(): 84 packages = (d.getVar('PACKAGES', True) or "").split()
85 update_rcd_package(pkg) 85 if not pkgs in packages and packages != []:
86 pkgs = packages[0]
87 for pkg in pkgs.split():
88 update_rcd_package(pkg)
86} 89}