Amend the build variant declarations to let both "ip" and "ip-full" provide a
virtual "ip-command" package which other packages can depend on if they do not
care about the specific implementation of "ip".

Note that this commit does not add busybox as "ip-command" provider due to
the following reasons:

 - The builtin Busybox ip applet cannot be added or removed at runtime
 - Both "ip" and "ip-full" are able to install without file clashes even
   if the busybox applet is enabled
 - The system is preferring full "ip" and "ip-full" at runtime, even
   if Busybox ip is still present.

Signed-off-by: Jo-Philipp Wich <j...@mein.io>
---
 package/network/utils/iproute2/Makefile | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/package/network/utils/iproute2/Makefile 
b/package/network/utils/iproute2/Makefile
index 9575ff1..3e84649 100644
--- a/package/network/utils/iproute2/Makefile
+++ b/package/network/utils/iproute2/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=iproute2
 PKG_VERSION:=4.4.0
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2
@@ -30,14 +30,15 @@ define Package/iproute2/Default
   MAINTAINER:=Russell Senior <russ...@personaltelco.net>
   DEPENDS:= +libnl-tiny
   VARIANT:=$(1)
+  PROVIDES:=$(3)
 endef
 
 define Package/ip
-$(call Package/iproute2/Default,tiny,Minimal)
+$(call Package/iproute2/Default,tiny,Minimal,ip-command)
   CONFLICTS:=ip-full
 endef
 
-Package/ip-full=$(call Package/iproute2/Default,full,Full)
+Package/ip-full=$(call Package/iproute2/Default,full,Full,ip-command)
 
 define Package/tc
 $(call Package/iproute2/Default)
-- 
2.1.4


_______________________________________________
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev

Reply via email to