package/busybox: invert dependency with netcat
authorYann E. MORIN <yann.morin.1998@free.fr>
Sun, 8 Jul 2018 09:45:48 +0000 (11:45 +0200)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Sun, 8 Jul 2018 11:08:04 +0000 (13:08 +0200)
Since netcat would be installed before busybox, we don't need to remove
a pre-installed 'nc' anymore.

If another netcat implementation (e.g. netcat-openbsd) is also enabled,
there is no way to tell which would win in the end, especially when we
add TLPB, in which case that will be forbidden.

So, we don't need to remove anything anymore.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
package/busybox/busybox.mk
package/netcat/netcat.mk

index 003909806a36b95168a868e31e1582755089f366..eeb9dc5bacd8d71337c61c2ed9bd1f40fe518d0a 100644 (file)
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+       $(if $(BR2_PACKAGE_NETCAT),netcat) \
        $(if $(BR2_PACKAGE_NETCAT_OPENSBSD),netcat-openbsd) \
        $(if $(BR2_PACKAGE_NMAP),nmap) \
        $(if $(BR2_PACKAGE_NTP),ntp) \
index d8b3c930b936bdc26a9d5393582295354c586a8c..eb7ddcac2727b484b78877e6dae50ba4d3654c57 100644 (file)
@@ -9,17 +9,4 @@ NETCAT_SITE = http://downloads.sourceforge.net/project/netcat/netcat/$(NETCAT_VE
 NETCAT_LICENSE = GPL-2.0+
 NETCAT_LICENSE_FILES = COPYING
 
-# Ensure Busybox gets built/installed before, so that this package
-# overrides Busybox nc.
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-NETCAT_DEPENDENCIES += busybox
-endif
-
-# Netcat doesn't overwrite a pre-existing 'nc' (e.g. from busybox) so
-# force-remove it.
-define NETCAT_RMOVE_NC_LINK
-       rm -f $(TARGET_DIR)/usr/bin/nc
-endef
-NETCAT_PRE_INSTALL_TARGET_HOOKS += NETCAT_RMOVE_NC_LINK
-
 $(eval $(autotools-package))