Ver código fonte

udev: update udev to new virtual package infra.

The udev virtual package and its current providers (eudev and systemd)
have been updated to use the latest version of virtual package
infrastructure.

A provider should now select BR2_PACKAGE_HAS_UDEV and well as set a
value for BR2_PACKAGE_PROVIDES_UDEV.

Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
eric.le.bihan.dev@free.fr 11 anos atrás
pai
commit
5e35c1bedd
4 arquivos alterados com 14 adições e 16 exclusões
  1. 3 0
      package/eudev/Config.in
  2. 3 0
      package/systemd/Config.in
  3. 4 4
      package/udev/Config.in
  4. 4 12
      package/udev/udev.mk

+ 3 - 0
package/eudev/Config.in

@@ -21,6 +21,9 @@ config BR2_PACKAGE_EUDEV
 
 if BR2_PACKAGE_EUDEV
 
+config BR2_PACKAGE_PROVIDES_UDEV
+	default "eudev"
+
 config BR2_PACKAGE_EUDEV_RULES_GEN
 	bool "enable rules generator"
 	help

+ 3 - 0
package/systemd/Config.in

@@ -40,6 +40,9 @@ config BR2_PACKAGE_SYSTEMD
 
 if BR2_PACKAGE_SYSTEMD
 
+config BR2_PACKAGE_PROVIDES_UDEV
+	default "systemd"
+
 config BR2_PACKAGE_SYSTEMD_ALL_EXTRAS
 	bool "enable all extras"
 	select BR2_PACKAGE_XZ

+ 4 - 4
package/udev/Config.in

@@ -1,6 +1,6 @@
 config BR2_PACKAGE_HAS_UDEV
 	bool
-	help
-	  udev is now a virtual package.
-	  Packages requiring udevd at run time or libudev/gudev at build time
-	  should select it.
+
+config BR2_PACKAGE_PROVIDES_UDEV
+	depends on BR2_PACKAGE_HAS_UDEV
+	string

+ 4 - 12
package/udev/udev.mk

@@ -5,20 +5,12 @@
 ################################################################################
 
 UDEV_SOURCE =
+UDEV_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_UDEV))
 
-ifeq ($(BR2_PACKAGE_EUDEV),y)
-UDEV_DEPENDENCIES += eudev
-endif
-
-ifeq ($(BR2_PACKAGE_SYSTEMD),y)
-UDEV_DEPENDENCIES += systemd
-endif
-
+ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
 ifeq ($(UDEV_DEPENDENCIES),)
-define UDEV_CONFIGURE_CMDS
-	echo "No Udev implementation selected. Configuration error."
-	exit 1
-endef
+$(error No Udev implementation selected. Configuration error)
+endif
 endif
 
 $(eval $(generic-package))