package/skeleton: make it a virtual package
authorYann E. MORIN <yann.morin.1998@free.fr>
Tue, 1 Aug 2017 22:52:18 +0000 (00:52 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 2 Aug 2017 17:31:09 +0000 (19:31 +0200)
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>
package/skeleton-common/Config.in
package/skeleton-common/skeleton-common.mk
package/skeleton-custom/Config.in
package/skeleton-custom/skeleton-custom.mk
package/skeleton/Config.in
package/skeleton/skeleton.mk
system/Config.in

index 6c094f6466c059740bd884bf09cccb57c1c225e2..5675e873cff97d9f54c18181c5fb93160b816000 100644 (file)
@@ -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
index 06e59c03df43170f6c97503a07079321d63a9b38..e3a52dc040450ef62979eb6366c18a23621f370c 100644 (file)
@@ -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
 
index b12bd8f73c5b72a394626dc7222496e5099e9579..601c3b247eec6488c72015c81b5272548b99733e 100644 (file)
@@ -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
index 6e9d52620b05d88b5284fc37865cf45a638a8574..d3c6b482115c857565f0f5c98fd781a82d498c01 100644 (file)
@@ -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))
index b22ac66b3598cf8da5a2c858a3d698d9ed227d00..efaa1e135f5a48522c6af31d05c429a66efe5221 100644 (file)
@@ -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
index 1d3e4fbe3cec40b9e93d0275ae1f4ae1b47fab98..d380f416497db4aafec11128aedd8c5a477f471f 100644 (file)
 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))
index 448984e2733f4eab856a89fc3e38bec57c186369..8c3f903bdc55644a67813df77eb9fe7c16730dc2 100644 (file)
@@ -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"