[FS#837] PROVIDES handling for non-virtual packages

LEDE Bugs lede-bugs at lists.infradead.org
Sat Jun 10 14:18:03 PDT 2017


A new Flyspray task has been opened.  Details are below. 

User who did this - Matthias Schiffer (NeoRaider) 

Attached to Project - LEDE Project
Summary - PROVIDES handling for non-virtual packages
Task Type - Feature Request
Category - Base system
Status - Assigned
Assigned To - Felix Fietkau
Operating System - All
Severity - Low
Priority - Medium
Reported Version - Trunk
Due in Version - Undecided
Due Date - Undecided
Details - The build system should allow adding PROVIDES for existing package names, to facilitate replacing core packages. At the moment, adding such PROVIDES will not lead to the desired dependencies.

Example: ip-tiny and ip-full both provide ip, the generated Kconfig for +ip depends looks like this:


select PACKAGE_ip-tiny if !PACKAGE_ip-full


This would not work if ip-full was just called ip (applying the following patch to show the issue):

diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile
index 364c1b22a1..d7933ede54 100644
--- a/package/network/utils/iproute2/Makefile
+++ b/package/network/utils/iproute2/Makefile
@@ -39,11 +39,10 @@ $(call Package/iproute2/Default)
  ALTERNATIVES:=200:/sbin/ip:/sbin/ip-tiny
 endef
 
-define Package/ip-full
+define Package/ip
 $(call Package/iproute2/Default)
  TITLE:=Routing control utility (Full)
  VARIANT:=full
- PROVIDES:=ip
  ALTERNATIVES:=300:/sbin/ip:/sbin/ip-full
 endef
 
@@ -120,7 +119,7 @@ define Package/ip-tiny/install
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/ip/ip $(1)/sbin/ip-tiny
 endef
 
-define Package/ip-full/install
+define Package/ip/install
 	$(INSTALL_DIR) $(1)/sbin
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/ip/ip $(1)/sbin/ip-full
 endef
@@ -158,7 +157,7 @@ define Package/devlink/install
 endef
 
 $(eval $(call BuildPackage,ip-tiny))
-$(eval $(call BuildPackage,ip-full))
+$(eval $(call BuildPackage,ip))
 $(eval $(call BuildPackage,tc))
 $(eval $(call BuildPackage,genl))
 $(eval $(call BuildPackage,ip-bridge))


The Kconfig looks like this now:

select PACKAGE_ip

instead of the expected

select PACKAGE_ip if !PACKAGE_ip-tiny


I expect this can be solved by separating the "vdepends" list from the package list, making each package provide itself, and always resolving DEPENDS through vdepends.

More information can be found at the following URL:
https://bugs.lede-project.org/index.php?do=details&task_id=837



More information about the lede-bugs mailing list