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>
This commit is contained in:
parent
aaa915bf12
commit
3936cef145
|
@ -75,12 +75,15 @@ python populate_packages_updatercd () {
|
||||||
postrm += d.getVar('updatercd_postrm', True)
|
postrm += d.getVar('updatercd_postrm', True)
|
||||||
d.setVar('pkg_postrm_%s' % pkg, postrm)
|
d.setVar('pkg_postrm_%s' % pkg, postrm)
|
||||||
|
|
||||||
pkgs = d.getVar('INITSCRIPT_PACKAGES', True)
|
# If the systemd class has also been inherited, then don't do anything as
|
||||||
if pkgs == None:
|
# the systemd units will override anything created by update-rc.d.
|
||||||
pkgs = d.getVar('UPDATERCPN', True)
|
if not d.getVar("SYSTEMD_BBCLASS_ENABLED", True):
|
||||||
packages = (d.getVar('PACKAGES', True) or "").split()
|
pkgs = d.getVar('INITSCRIPT_PACKAGES', True)
|
||||||
if not pkgs in packages and packages != []:
|
if pkgs == None:
|
||||||
pkgs = packages[0]
|
pkgs = d.getVar('UPDATERCPN', True)
|
||||||
for pkg in pkgs.split():
|
packages = (d.getVar('PACKAGES', True) or "").split()
|
||||||
update_rcd_package(pkg)
|
if not pkgs in packages and packages != []:
|
||||||
|
pkgs = packages[0]
|
||||||
|
for pkg in pkgs.split():
|
||||||
|
update_rcd_package(pkg)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue