Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v5 08/14] package/skeleton: make it a virtual package
Date: Wed, 2 Aug 2017 00:52:18 +0200	[thread overview]
Message-ID: <20170801225224.16899-9-arnout@mind.be> (raw)
In-Reply-To: <20170801225224.16899-1-arnout@mind.be>

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

We now have two packages that can act as a skeleton, skeleton-common,
also known as our default skeleton, and skeleton-custom.

This means that the skeleton package can be a standard virtual package
now.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
Changes v4 -> v5: (Arnout)
 - No changes

Changes v3 -> v4:
  - drop now-legacy paragraph from the commit log  (Arnout)
---
 package/skeleton-common/Config.in          | 5 ++++-
 package/skeleton-common/skeleton-common.mk | 2 ++
 package/skeleton-custom/Config.in          | 5 ++++-
 package/skeleton-custom/skeleton-custom.mk | 3 ++-
 package/skeleton/Config.in                 | 9 +++++++--
 package/skeleton/skeleton.mk               | 8 +-------
 system/Config.in                           | 4 ++++
 7 files changed, 24 insertions(+), 12 deletions(-)

diff --git a/package/skeleton-common/Config.in b/package/skeleton-common/Config.in
index 6c094f6466..5675e873cf 100644
--- a/package/skeleton-common/Config.in
+++ b/package/skeleton-common/Config.in
@@ -1,3 +1,6 @@
 config BR2_PACKAGE_SKELETON_COMMON
 	bool
-	select BR2_PACKAGE_SKELETON
+	select BR2_PACKAGE_HAS_SKELETON
+
+config BR2_PACKAGE_PROVIDES_SKELETON
+	default "skeleton-common" if BR2_PACKAGE_SKELETON_COMMON
diff --git a/package/skeleton-common/skeleton-common.mk b/package/skeleton-common/skeleton-common.mk
index 06e59c03df..e3a52dc040 100644
--- a/package/skeleton-common/skeleton-common.mk
+++ b/package/skeleton-common/skeleton-common.mk
@@ -11,6 +11,8 @@
 SKELETON_COMMON_ADD_TOOLCHAIN_DEPENDENCY = NO
 SKELETON_COMMON_ADD_SKELETON_DEPENDENCY = NO
 
+SKELETON_COMMON_PROVIDES = skeleton
+
 # The skeleton also handles the merged /usr case in the sysroot
 SKELETON_COMMON_INSTALL_STAGING = YES
 
diff --git a/package/skeleton-custom/Config.in b/package/skeleton-custom/Config.in
index b12bd8f73c..601c3b247e 100644
--- a/package/skeleton-custom/Config.in
+++ b/package/skeleton-custom/Config.in
@@ -1,3 +1,6 @@
 config BR2_PACKAGE_SKELETON_CUSTOM
 	bool
-	select BR2_PACKAGE_SKELETON
+	select BR2_PACKAGE_HAS_SKELETON
+
+config BR2_PACKAGE_PROVIDES_SKELETON
+	default "skeleton-custom" if BR2_PACKAGE_SKELETON_CUSTOM
diff --git a/package/skeleton-custom/skeleton-custom.mk b/package/skeleton-custom/skeleton-custom.mk
index 6e9d52620b..d3c6b48211 100644
--- a/package/skeleton-custom/skeleton-custom.mk
+++ b/package/skeleton-custom/skeleton-custom.mk
@@ -11,7 +11,8 @@
 SKELETON_CUSTOM_ADD_TOOLCHAIN_DEPENDENCY = NO
 SKELETON_CUSTOM_ADD_SKELETON_DEPENDENCY = NO
 
-# The skeleton also handles the merged /usr case in the sysroot
+SKELETON_CUSTOM_PROVIDES = skeleton
+
 SKELETON_CUSTOM_INSTALL_STAGING = YES
 
 SKELETON_CUSTOM_PATH = $(call qstrip,$(BR2_ROOTFS_SKELETON_CUSTOM_PATH))
diff --git a/package/skeleton/Config.in b/package/skeleton/Config.in
index b22ac66b35..efaa1e135f 100644
--- a/package/skeleton/Config.in
+++ b/package/skeleton/Config.in
@@ -1,4 +1,9 @@
 config BR2_PACKAGE_SKELETON
 	bool
-	help
-	  The basic skeleton for your rootfs.
+	default y
+
+config BR2_PACKAGE_HAS_SKELETON
+	bool
+
+config BR2_PACKAGE_PROVIDES_SKELETON
+	string
diff --git a/package/skeleton/skeleton.mk b/package/skeleton/skeleton.mk
index 1d3e4fbe3c..d380f41649 100644
--- a/package/skeleton/skeleton.mk
+++ b/package/skeleton/skeleton.mk
@@ -11,10 +11,4 @@
 SKELETON_ADD_TOOLCHAIN_DEPENDENCY = NO
 SKELETON_ADD_SKELETON_DEPENDENCY = NO
 
-ifeq ($(BR2_PACKAGE_SKELETON_CUSTOM),y)
-SKELETON_DEPENDENCIES = skeleton-custom
-else
-SKELETON_DEPENDENCIES = skeleton-common
-endif
-
-$(eval $(generic-package))
+$(eval $(virtual-package))
diff --git a/system/Config.in b/system/Config.in
index 448984e273..8c3f903bdc 100644
--- a/system/Config.in
+++ b/system/Config.in
@@ -1,5 +1,9 @@
 menu "System configuration"
 
+# Note: usually, it is not possible to select a provider of a virtual
+# package. But here we have an exception: there are only two providers
+# and they only get selected each by separate entries in this choice.
+# So this is a safe situation.
 choice
 	prompt "Root FS skeleton"
 
-- 
2.13.3

  parent reply	other threads:[~2017-08-01 22:52 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 ` Arnout Vandecappelle [this message]
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
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=20170801225224.16899-9-arnout@mind.be \
    --to=arnout@mind.be \
    --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