iproute2: rename ip to ip-tiny and let both ip-tiny and ip-full provide "ip"
Rename the "ip" package declaration to "ip-tiny" and let both "ip-tiny" and "ip-full" provide the virtual "ip" package. This allows users to freely choose the "ip" command variant while other packages can continue to depend on "ip" without needing to enforce a specific variant. Note that this commit does not add busybox as "ip" provider due to the following reasons: - The builtin Busybox ip applet cannot be added or removed at runtime - Both "ip-tiny" and "ip-full" are able to install without file clashes even if the busybox applet is enabled - The system is preferring full "ip-tiny" and "ip-full" at runtime, even if Busybox ip is still present. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
		@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
PKG_NAME:=iproute2
 | 
					PKG_NAME:=iproute2
 | 
				
			||||||
PKG_VERSION:=4.4.0
 | 
					PKG_VERSION:=4.4.0
 | 
				
			||||||
PKG_RELEASE:=4
 | 
					PKG_RELEASE:=5
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 | 
					PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 | 
				
			||||||
PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2
 | 
					PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2
 | 
				
			||||||
@@ -30,14 +30,15 @@ define Package/iproute2/Default
 | 
				
			|||||||
  MAINTAINER:=Russell Senior <russell@personaltelco.net>
 | 
					  MAINTAINER:=Russell Senior <russell@personaltelco.net>
 | 
				
			||||||
  DEPENDS:= +libnl-tiny
 | 
					  DEPENDS:= +libnl-tiny
 | 
				
			||||||
  VARIANT:=$(1)
 | 
					  VARIANT:=$(1)
 | 
				
			||||||
 | 
					  PROVIDES:=$(3)
 | 
				
			||||||
endef
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define Package/ip
 | 
					define Package/ip-tiny
 | 
				
			||||||
$(call Package/iproute2/Default,tiny,Minimal)
 | 
					$(call Package/iproute2/Default,tiny,Minimal,ip)
 | 
				
			||||||
  CONFLICTS:=ip-full
 | 
					  CONFLICTS:=ip-full
 | 
				
			||||||
endef
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Package/ip-full=$(call Package/iproute2/Default,full,Full)
 | 
					Package/ip-full:=$(call Package/iproute2/Default,full,Full,ip)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define Package/tc
 | 
					define Package/tc
 | 
				
			||||||
$(call Package/iproute2/Default)
 | 
					$(call Package/iproute2/Default)
 | 
				
			||||||
@@ -101,7 +102,7 @@ define Build/InstallDev
 | 
				
			|||||||
	$(CP) $(PKG_BUILD_DIR)/lib/libnetlink.a $(1)/usr/lib/
 | 
						$(CP) $(PKG_BUILD_DIR)/lib/libnetlink.a $(1)/usr/lib/
 | 
				
			||||||
endef
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define Package/ip/install
 | 
					define Package/ip-tiny/install
 | 
				
			||||||
	$(INSTALL_DIR) $(1)/usr/bin
 | 
						$(INSTALL_DIR) $(1)/usr/bin
 | 
				
			||||||
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/ip/ip $(1)/usr/bin/
 | 
						$(INSTALL_BIN) $(PKG_BUILD_DIR)/ip/ip $(1)/usr/bin/
 | 
				
			||||||
endef
 | 
					endef
 | 
				
			||||||
@@ -138,7 +139,7 @@ define Package/nstat/install
 | 
				
			|||||||
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/misc/nstat $(1)/usr/sbin/
 | 
						$(INSTALL_BIN) $(PKG_BUILD_DIR)/misc/nstat $(1)/usr/sbin/
 | 
				
			||||||
endef
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(eval $(call BuildPackage,ip))
 | 
					$(eval $(call BuildPackage,ip-tiny))
 | 
				
			||||||
$(eval $(call BuildPackage,ip-full))
 | 
					$(eval $(call BuildPackage,ip-full))
 | 
				
			||||||
$(eval $(call BuildPackage,tc))
 | 
					$(eval $(call BuildPackage,tc))
 | 
				
			||||||
$(eval $(call BuildPackage,genl))
 | 
					$(eval $(call BuildPackage,genl))
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user