All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: Ross Burton <ross.burton@intel.com>
Cc: openembedded-devel@lists.openembedded.org,
	openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 09/22] update-rcd.bbclass: handle both sysvinit and systemd features being present
Date: Fri, 22 Mar 2013 20:04:34 +0100	[thread overview]
Message-ID: <20130322190434.GV3219@jama> (raw)
In-Reply-To: <876b70b30d4ed72bed465147dc6ecf28f331e2f7.1363973088.git.ross.burton@intel.com>

[-- Attachment #1: Type: text/plain, Size: 3309 bytes --]

On Fri, Mar 22, 2013 at 05:38:29PM +0000, Ross Burton wrote:
> Run the helper if the sysvinit feature is present, or if the systemd feature is
> present but the systemd class hasn't been inherited.  We want to run in the
> latter case as systemd has sysvinit compatibility, but we don't want to always
> run so that pure systemd images don't have redundant sysvinit files.
> 
> Signed-off-by: Ross Burton <ross.burton@intel.com>
> ---
>  meta/classes/update-rc.d.bbclass                          |    9 ++++++---
>  meta/recipes-core/packagegroups/packagegroup-core-boot.bb |    4 ++--
>  2 files changed, 8 insertions(+), 5 deletions(-)
> 
> diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
> index 65bf022..06b91c1 100644
> --- a/meta/classes/update-rc.d.bbclass
> +++ b/meta/classes/update-rc.d.bbclass
> @@ -75,9 +75,12 @@ python populate_packages_updatercd () {
>          postrm += d.getVar('updatercd_postrm', True)
>          d.setVar('pkg_postrm_%s' % pkg, postrm)
>  
> -    # 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):
> +    # Run if the sysvinit feature is present, or if the systemd feature is present
> +    # but the systemd class hasn't been inherited.  We want to run in the latter case
> +    # as systemd has sysvinit compatibility, but we don't want to always so that
> +    # pure systemd images don't have redundent sysvinit files.
> +    if "sysvinit" in d.getVar("DISTRO_FEATURES").split() or \
> +       ("systemd" in d.getVar("DISTRO_FEATURES").split() and not d.getVar("SYSTEMD_BBCLASS_ENABLED", True)):
>          pkgs = d.getVar('INITSCRIPT_PACKAGES', True)
>          if pkgs == None:
>              pkgs = d.getVar('UPDATERCPN', True)
> diff --git a/meta/recipes-core/packagegroups/packagegroup-core-boot.bb b/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
> index b9183a8..e73b46e 100644
> --- a/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
> +++ b/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
> @@ -27,7 +27,7 @@ RCONFLICTS_${PN} = "task-core-boot"
>  VIRTUAL-RUNTIME_dev_manager ?= "udev"
>  VIRTUAL-RUNTIME_login_manager ?= "tinylogin"
>  VIRTUAL-RUNTIME_init_manager ?= "${DISTRO_FEATURES_INITMAN}"
> -VIRTUAL-RUNTIME_initscripts ?= "${@base_contains('DISTRO_FEATURES', 'sysvinit', 'initscripts', '',d)}"
> +VIRTUAL-RUNTIME_initscripts ?= "${@base_contains('DISTRO_FEATURES_INITMAN', 'sysvinit', 'initscripts', '',d)}"
>  VIRTUAL-RUNTIME_keymaps ?= "keymaps"
>  
>  RDEPENDS_${PN} = "\
> @@ -42,7 +42,7 @@ RDEPENDS_${PN} = "\
>      ${VIRTUAL-RUNTIME_login_manager} \
>      ${VIRTUAL-RUNTIME_init_manager} \
>      ${VIRTUAL-RUNTIME_initscripts} \
> -    ${@base_contains('DISTRO_FEATURES', 'systemd', 'systemd-compat-units', '',d)} \
> +    ${@base_contains('DISTRO_FEATURES_INITMAN', 'systemd', 'systemd-compat-units', '',d)} \
>      ${VIRTUAL-RUNTIME_dev_manager} \
>      ${VIRTUAL-RUNTIME_update-alternatives} \
>      ${MACHINE_ESSENTIAL_EXTRA_RDEPENDS}"

Isn't DISTRO_FEATURES_INITMAN removed later in this series?

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Martin Jansa <martin.jansa@gmail.com>
To: Ross Burton <ross.burton@intel.com>
Cc: openembedded-devel@lists.openembedded.org,
	openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH 09/22] update-rcd.bbclass: handle both sysvinit and systemd features being present
Date: Fri, 22 Mar 2013 20:04:34 +0100	[thread overview]
Message-ID: <20130322190434.GV3219@jama> (raw)
In-Reply-To: <876b70b30d4ed72bed465147dc6ecf28f331e2f7.1363973088.git.ross.burton@intel.com>

[-- Attachment #1: Type: text/plain, Size: 3309 bytes --]

On Fri, Mar 22, 2013 at 05:38:29PM +0000, Ross Burton wrote:
> Run the helper if the sysvinit feature is present, or if the systemd feature is
> present but the systemd class hasn't been inherited.  We want to run in the
> latter case as systemd has sysvinit compatibility, but we don't want to always
> run so that pure systemd images don't have redundant sysvinit files.
> 
> Signed-off-by: Ross Burton <ross.burton@intel.com>
> ---
>  meta/classes/update-rc.d.bbclass                          |    9 ++++++---
>  meta/recipes-core/packagegroups/packagegroup-core-boot.bb |    4 ++--
>  2 files changed, 8 insertions(+), 5 deletions(-)
> 
> diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
> index 65bf022..06b91c1 100644
> --- a/meta/classes/update-rc.d.bbclass
> +++ b/meta/classes/update-rc.d.bbclass
> @@ -75,9 +75,12 @@ python populate_packages_updatercd () {
>          postrm += d.getVar('updatercd_postrm', True)
>          d.setVar('pkg_postrm_%s' % pkg, postrm)
>  
> -    # 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):
> +    # Run if the sysvinit feature is present, or if the systemd feature is present
> +    # but the systemd class hasn't been inherited.  We want to run in the latter case
> +    # as systemd has sysvinit compatibility, but we don't want to always so that
> +    # pure systemd images don't have redundent sysvinit files.
> +    if "sysvinit" in d.getVar("DISTRO_FEATURES").split() or \
> +       ("systemd" in d.getVar("DISTRO_FEATURES").split() and not d.getVar("SYSTEMD_BBCLASS_ENABLED", True)):
>          pkgs = d.getVar('INITSCRIPT_PACKAGES', True)
>          if pkgs == None:
>              pkgs = d.getVar('UPDATERCPN', True)
> diff --git a/meta/recipes-core/packagegroups/packagegroup-core-boot.bb b/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
> index b9183a8..e73b46e 100644
> --- a/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
> +++ b/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
> @@ -27,7 +27,7 @@ RCONFLICTS_${PN} = "task-core-boot"
>  VIRTUAL-RUNTIME_dev_manager ?= "udev"
>  VIRTUAL-RUNTIME_login_manager ?= "tinylogin"
>  VIRTUAL-RUNTIME_init_manager ?= "${DISTRO_FEATURES_INITMAN}"
> -VIRTUAL-RUNTIME_initscripts ?= "${@base_contains('DISTRO_FEATURES', 'sysvinit', 'initscripts', '',d)}"
> +VIRTUAL-RUNTIME_initscripts ?= "${@base_contains('DISTRO_FEATURES_INITMAN', 'sysvinit', 'initscripts', '',d)}"
>  VIRTUAL-RUNTIME_keymaps ?= "keymaps"
>  
>  RDEPENDS_${PN} = "\
> @@ -42,7 +42,7 @@ RDEPENDS_${PN} = "\
>      ${VIRTUAL-RUNTIME_login_manager} \
>      ${VIRTUAL-RUNTIME_init_manager} \
>      ${VIRTUAL-RUNTIME_initscripts} \
> -    ${@base_contains('DISTRO_FEATURES', 'systemd', 'systemd-compat-units', '',d)} \
> +    ${@base_contains('DISTRO_FEATURES_INITMAN', 'systemd', 'systemd-compat-units', '',d)} \
>      ${VIRTUAL-RUNTIME_dev_manager} \
>      ${VIRTUAL-RUNTIME_update-alternatives} \
>      ${MACHINE_ESSENTIAL_EXTRA_RDEPENDS}"

Isn't DISTRO_FEATURES_INITMAN removed later in this series?

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

  reply	other threads:[~2013-03-22 19:21 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-22 17:38 [PATCH 00/22] hybrid systemd/sysvinit, and systemd fixes Ross Burton
2013-03-22 17:38 ` [PATCH 01/22] busybox: enable systemd integration for syslogd Ross Burton
2013-03-25 12:47   ` Andreas Müller
2013-03-25 12:53     ` Burton, Ross
2013-03-25 12:58       ` Andreas Müller
2013-03-22 17:38 ` [PATCH 02/22] busybox: add strictatime support to mount Ross Burton
2013-03-22 17:38 ` [PATCH 03/22] systemd: make xz support (compressed journal) optional, defaulting to on Ross Burton
2013-03-22 17:38 ` [PATCH 04/22] systemd: merge udev-systemd into udev Ross Burton
2013-03-22 17:38 ` [PATCH 05/22] core-image-minimal-initramfs: don't install busybox-syslog Ross Burton
2013-03-22 17:38 ` [PATCH 06/22] systemd: don't depend on the PCI/USB databases Ross Burton
2013-03-22 17:38 ` [PATCH 07/22] systemd: split out the hwdb data Ross Burton
2013-03-22 17:38 ` [PATCH 08/22] default-providers: change udev selection logic Ross Burton
2013-03-22 17:38 ` [PATCH 09/22] update-rcd.bbclass: handle both sysvinit and systemd features being present Ross Burton
2013-03-22 19:04   ` Martin Jansa [this message]
2013-03-22 19:04     ` [OE-core] " Martin Jansa
2013-03-22 19:11     ` Burton, Ross
2013-03-22 19:11       ` [OE-core] " Burton, Ross
2013-03-22 17:38 ` [PATCH 10/22] util-linux: split uuidd into it's own package, and enable for systemd Ross Burton
2013-03-22 17:38 ` [PATCH 11/22] update-rcd: drop depends to recommends, check for update-rcd in scripts Ross Burton
2013-03-22 17:38 ` [PATCH 12/22] systemd: check for systemctl first, and don't force systemd to be installed Ross Burton
2013-03-22 17:38 ` [PATCH 13/22] systemd: add udev init script for hybrid sysvinit/systemd usage Ross Burton
2013-03-22 17:38 ` [PATCH 14/22] update-rc.d/systemd: change communication variable name Ross Burton
2013-03-22 17:38 ` [PATCH 15/22] default-distrovars: don't add INITMAN to DISTRO_FEATURES and DISTRO_FEATURES_BACKFILL Ross Burton
2013-03-22 17:38 ` [PATCH 16/22] bitbake.conf: explicitly backfill sysvinit, not DISTRO_FEATURES_INITMAN Ross Burton
2013-03-22 17:38 ` [PATCH 17/22] local.conf.sample.extended: remove obsolete DISTRO_FEATURES_INITMAN reference Ross Burton
2013-03-22 17:38 ` [PATCH 18/22] default-distrovars: " Ross Burton
2013-03-22 17:38 ` [PATCH 19/22] packagegroup-core-boot: revert to specifying sysvinit as default init manager Ross Burton
2013-03-23  4:30   ` Saul Wold
2013-03-22 17:38 ` [PATCH 20/22] Revert "base-files: add fstab for systemd based systems" Ross Burton
2013-03-22 17:38 ` [PATCH 21/22] systemd-compat-units: disable dbus-1 Ross Burton
2013-03-22 17:38 ` [PATCH 22/22] systemd: recommend systemd-compat-units Ross Burton
2013-03-22 22:00 ` [oe] [PATCH 00/22] hybrid systemd/sysvinit, and systemd fixes Martin Jansa
2013-03-22 22:00   ` Martin Jansa
2013-03-25 12:39   ` [oe] " Burton, Ross
2013-03-25 12:39     ` Burton, Ross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130322190434.GV3219@jama \
    --to=martin.jansa@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=openembedded-devel@lists.openembedded.org \
    --cc=ross.burton@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.