[OE-core] [oe-commits] Ross Burton : update-rc.d: don't do anything if systemd. bbclass is inherited
Martin Jansa
martin.jansa at gmail.com
Wed Mar 6 06:33:06 UTC 2013
On Mon, Feb 11, 2013 at 02:45:49PM +0000, git at git.openembedded.org wrote:
> Module: openembedded-core.git
> Branch: master
> Commit: 0273a22fec3c9360df2510b759c5bf9af610551f
> URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=0273a22fec3c9360df2510b759c5bf9af610551f
>
> Author: Ross Burton <ross.burton at intel.com>
> Date: Fri Feb 8 22:43:16 2013 +0000
>
> 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.
Does not work very well in current dbus recipe:
Configuring dbus-1.
update-rc.d: /etc/init.d/dbus-1: file does not exist
Collected errors:
* pkg_run_script: package "dbus-1" postinst script returned status 1.
* opkg_configure: dbus-1.postinst returned 1.
dbus installs sysvinit script only when sysvinit is in DISTRO_FEATURES
but update-rc.d is kept enabled because dbus does not inherit systemd
> Signed-off-by: Ross Burton <ross.burton at intel.com>
> Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
>
> ---
>
> meta/classes/update-rc.d.bbclass | 19 +++++++++++--------
> 1 files changed, 11 insertions(+), 8 deletions(-)
>
> diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
> index f9d55fb..51ad8b1 100644
> --- a/meta/classes/update-rc.d.bbclass
> +++ b/meta/classes/update-rc.d.bbclass
> @@ -75,12 +75,15 @@ python populate_packages_updatercd () {
> postrm += d.getVar('updatercd_postrm', True)
> d.setVar('pkg_postrm_%s' % pkg, postrm)
>
> - pkgs = d.getVar('INITSCRIPT_PACKAGES', True)
> - if pkgs == None:
> - pkgs = d.getVar('UPDATERCPN', True)
> - packages = (d.getVar('PACKAGES', True) or "").split()
> - if not pkgs in packages and packages != []:
> - pkgs = packages[0]
> - for pkg in pkgs.split():
> - update_rcd_package(pkg)
> + # If the systemd class has also been inherited, then don't do anything as
> + # the systemd units will override anything created by update-rc.d.
> + if not d.getVar("SYSTEMD_BBCLASS_ENABLED", True):
> + pkgs = d.getVar('INITSCRIPT_PACKAGES', True)
> + if pkgs == None:
> + pkgs = d.getVar('UPDATERCPN', True)
> + packages = (d.getVar('PACKAGES', True) or "").split()
> + if not pkgs in packages and packages != []:
> + pkgs = packages[0]
> + for pkg in pkgs.split():
> + update_rcd_package(pkg)
> }
>
>
> _______________________________________________
> Openembedded-commits mailing list
> Openembedded-commits at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-commits
--
Martin 'JaMa' Jansa jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20130306/ee0abdff/attachment-0002.sig>
More information about the Openembedded-core
mailing list