diff mbox

[OpenWrt-Devel,1/3] package/network/utils/iproute: ip-full/busybox provides ip

Message ID 1453317725-93230-1-git-send-email-openwrt@daniel.thecshore.com
State Changes Requested
Delegated to: Felix Fietkau
Headers show

Commit Message

Daniel Dickinson Jan. 20, 2016, 7:22 p.m. UTC
From: Daniel Dickinson <openwrt@daniel.thecshore.com>

Allow to use dependencies on 'ip' command without forcing a
particular version by having ip-full and busybox (if ip
applet enabled), as well as renamed ip package
(to ip-tiny) all provides the ip virtual package.

Signed-off-by: Daniel Dickinson <openwrt@daniel.thecshore.com>
---
 package/network/utils/iproute2/Makefile | 10 +++++++---
 package/utils/busybox/Makefile          |  1 +
 2 files changed, 8 insertions(+), 3 deletions(-)

Comments

Bastian Bittorf Jan. 21, 2016, 7:10 a.m. UTC | #1
* openwrt@daniel.thecshore.com <openwrt@daniel.thecshore.com> [21.01.2016 07:06]:
> From: Daniel Dickinson <openwrt@daniel.thecshore.com>
> 
> Allow to use dependencies on 'ip' command without forcing a
> particular version by having ip-full and busybox (if ip
> applet enabled), as well as renamed ip package
> (to ip-tiny) all provides the ip virtual package.

this is a good thought, but the maintainer must make sure
that only the implemented subset of the busybox ip fits for
package X.

busybox:
ip { address | route | link | neigh | rule }

iproute2:
ip { link | address | addrlabel | route | rule | neighbor |ntable | tunnel | tuntap | maddress | mroute | mrule | monitor | xfrm | netns | l2tp | fou | tcp_metrics | token | netconf }

bye, bastian
diff mbox

Patch

diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile
index af56577..24d8956 100644
--- a/package/network/utils/iproute2/Makefile
+++ b/package/network/utils/iproute2/Makefile
@@ -32,12 +32,16 @@  define Package/iproute2/Default
   VARIANT:=$(1)
 endef
 
-define Package/ip
+define Package/ip-tiny
 $(call Package/iproute2/Default,tiny,Minimal)
   CONFLICTS:=ip-full
+  PROVIDES:=ip
 endef
 
-Package/ip-full=$(call Package/iproute2/Default,full,Full)
+define Package/ip-full
+$(call Package/iproute2/Default,full,Full)
+  PROVIDES:=ip
+endef
 
 define Package/tc
 $(call Package/iproute2/Default)
@@ -128,7 +132,7 @@  define Package/ss/install
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/misc/ss $(1)/usr/sbin/
 endef
 
-$(eval $(call BuildPackage,ip))
+$(eval $(call BuildPackage,ip-tiny))
 $(eval $(call BuildPackage,ip-full))
 $(eval $(call BuildPackage,tc))
 $(eval $(call BuildPackage,genl))
diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile
index 5ca4363..16e37e6 100644
--- a/package/utils/busybox/Makefile
+++ b/package/utils/busybox/Makefile
@@ -43,6 +43,7 @@  define Package/busybox
   TITLE:=Core utilities for embedded Linux
   URL:=http://busybox.net/
   DEPENDS:=+BUSYBOX_USE_LIBRPC:librpc +BUSYBOX_CONFIG_PAM:libpam
+  PROVIDES:=$(if $(CONFIG_BUSYBOX_DEFAULT_IP),ip)
   MENU:=1
 endef