Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v5 10/14] package/skeleton: introduce sysv- and systemd-specific skeletons
Date: Wed, 2 Aug 2017 19:59:14 +0200	[thread overview]
Message-ID: <20170802195914.3043a4d8@windsurf.home> (raw)
In-Reply-To: <20170801225224.16899-11-arnout@mind.be>

Hello,

On Wed, 2 Aug 2017 00:52:20 +0200, Arnout Vandecappelle
(Essensium/Mind) wrote:

> diff --git a/package/skeleton-common/Config.in b/package/skeleton-common/Config.in
> index 5675e873cf..e18d6d0ff0 100644
> --- a/package/skeleton-common/Config.in
> +++ b/package/skeleton-common/Config.in
> @@ -1,6 +1,17 @@
>  config BR2_PACKAGE_SKELETON_COMMON
>  	bool
> +
> +# skeleton-common is normally a dependency of another skeleton.
> +# BR2_PACKAGE_SKELETON_COMMON_ONLY can be selected if skeleton-common
> +# is the only provider of the skeleton.
> +config BR2_PACKAGE_SKELETON_COMMON_ONLY
> +	bool
> +	select BR2_PACKAGE_SKELETON_COMMON
>  	select BR2_PACKAGE_HAS_SKELETON

I was not really happy with this BR2_PACKAGE_SKELETON_COMMON_ONLY
solution, where skeleton-common is sometimes a provider of the
skeleton virtual package, sometimes not. It feels a bit hackish.

So I've replaced that with what I believe is a simpler and cleaner
solution, even if it requires a little bit more code: I've added a
skeleton-none package. At the point of this commit, it is completely
identical to skeleton-sysv and skeleton-systemd: it does nothing but
depend on skeleton-common. But this way, we have a clean situation
where the skeleton virtual package has four providers: skeleton-none,
skeleton-sysv, skeleton-systemd and skeleton-custom. All of
skeleton-none, skeleton-sysv and skeleton-systemd depend on
skeleton-common.

> +endif
> diff --git a/package/skeleton-common/skeleton-common.mk b/package/skeleton-common/skeleton-common.mk
> index bf75077a85..e9b87c3fd3 100644
> --- a/package/skeleton-common/skeleton-common.mk
> +++ b/package/skeleton-common/skeleton-common.mk
> @@ -11,8 +11,6 @@
>  SKELETON_COMMON_ADD_TOOLCHAIN_DEPENDENCY = NO
>  SKELETON_COMMON_ADD_SKELETON_DEPENDENCY = NO
>  
> -SKELETON_COMMON_PROVIDES = skeleton

Removing this was correct when skeleton-common was *not* a provider of
skeleton (i.e when skeleton-common is a dependency of skeleton-sysv or
skeleton-systemd). But it should have been kept in the
BR2_PACKAGE_SKELETON_COMMON_ONLY, because in this case, skeleton-common
was directly a provider of the skeleton virtual package.

But thanks to the addition of a skeleton-none package, skeleton-common
is really never a provider of skeleton, and therefore removing this
line unconditionally becomes correct.

Hopefully I haven't messed up my change introducing skeleton-none :-)

>  config BR2_ROOTFS_SKELETON_DEFAULT
>  	bool "default target skeleton"
> -	select BR2_PACKAGE_SKELETON_COMMON
> +	select BR2_PACKAGE_SKELETON_SYSV if BR2_INIT_SYSV
> +	select BR2_PACKAGE_SKELETON_SYSV if BR2_INIT_BUSYBOX
> +	select BR2_PACKAGE_SKELETON_SYSTEMD if BR2_INIT_SYSTEMD
> +	select BR2_PACKAGE_SKELETON_COMMON_ONLY if BR2_INIT_NONE

So this last line is now:

	select BR2_PACKAGE_SKELETON_NONE if BR2_INIT_NONE

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

  reply	other threads:[~2017-08-02 17:59 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-01 22:52 [Buildroot] [PATCH v5 00/14] system: properly handle systemd as init system Arnout Vandecappelle
2017-08-01 22:52 ` [Buildroot] [PATCH v5 01/14] support/testing: add runtime testing for init systems Arnout Vandecappelle
2017-08-02 15:48   ` Thomas Petazzoni
2017-08-01 22:52 ` [Buildroot] [PATCH v5 02/14] package/skeleton: split out into skeleton-custom Arnout Vandecappelle
2017-08-01 22:52 ` [Buildroot] [PATCH v5 03/14] package/skeleton-custom: rework the merged_usr and building conditions Arnout Vandecappelle
2017-08-01 22:52 ` [Buildroot] [PATCH v5 04/14] package/skeleton-custom: also check for missing directories Arnout Vandecappelle
2017-08-01 22:52 ` [Buildroot] [PATCH v5 05/14] package/skeleton-custom: simplify target/staging install Arnout Vandecappelle
2017-08-01 22:52 ` [Buildroot] [PATCH v5 06/14] package/skeleton: split out into skeleton-common Arnout Vandecappelle
2017-08-02 17:24   ` Thomas Petazzoni
2017-08-01 22:52 ` [Buildroot] [PATCH v5 07/14] skeleton-common: rename SKELETON_ROOT_PASSWORD to SKELETON_CUSTOM_ROOT_PASSWORD Arnout Vandecappelle
2017-08-02 17:29   ` Thomas Petazzoni
2017-08-02 19:22     ` Arnout Vandecappelle
2017-08-01 22:52 ` [Buildroot] [PATCH v5 08/14] package/skeleton: make it a virtual package Arnout Vandecappelle
2017-08-01 22:52 ` [Buildroot] [PATCH v5 09/14] package/skeleton-common: simplify staging install Arnout Vandecappelle
2017-08-01 22:52 ` [Buildroot] [PATCH v5 10/14] package/skeleton: introduce sysv- and systemd-specific skeletons Arnout Vandecappelle
2017-08-02 17:59   ` Thomas Petazzoni [this message]
2017-08-01 22:52 ` [Buildroot] [PATCH v5 11/14] system: separate sysv and systemd parts of the skeleton Arnout Vandecappelle
2017-08-01 22:52 ` [Buildroot] [PATCH v5 12/14] fs: add pre- and post-command hooks Arnout Vandecappelle
2017-08-01 22:52 ` [Buildroot] [PATCH v5 13/14] system: make systemd work on a read-only rootfs Arnout Vandecappelle
2017-08-01 22:52 ` [Buildroot] [PATCH v5 14/14] support/testing: add runtime testing for read-only systemd Arnout Vandecappelle
2017-08-02 17:51 ` [Buildroot] [PATCH v5 00/14] system: properly handle systemd as init system Yann E. MORIN
2017-08-02 19:19 ` Thomas Petazzoni

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=20170802195914.3043a4d8@windsurf.home \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox