aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Yann E. MORIN <yann.morin.1998@free.fr>2017-08-02 00:52:18 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-08-02 19:31:09 +0200
commitcb09e1c81f8da8926b3acb167595360ed15e30dd (patch)
treedb75852a3746117e50a4dcfae69d4f03e73ec8c3
parent22cf98c6af45492b942ba2956873cb3c85f2de7d (diff)
downloadbuildroot-cb09e1c81f8da8926b3acb167595360ed15e30dd.tar.gz
buildroot-cb09e1c81f8da8926b3acb167595360ed15e30dd.tar.bz2
package/skeleton: make it a virtual package
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> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-rw-r--r--package/skeleton-common/Config.in5
-rw-r--r--package/skeleton-common/skeleton-common.mk2
-rw-r--r--package/skeleton-custom/Config.in5
-rw-r--r--package/skeleton-custom/skeleton-custom.mk3
-rw-r--r--package/skeleton/Config.in9
-rw-r--r--package/skeleton/skeleton.mk8
-rw-r--r--system/Config.in4
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"