package/busybox: invert dependency with nmap
authorYann E. MORIN <yann.morin.1998@free.fr>
Sun, 8 Jul 2018 09:45:46 +0000 (11:45 +0200)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Sun, 8 Jul 2018 10:54:16 +0000 (12:54 +0200)
We only need that dependency when nmap's ncat is enabled.

For consistency, we add a dependency on nmap, not a suboption of it,
to have a dependency list in busybox that is only about packages, and
directly associates the upper-case package variable to the lower-case
package name, e.g. NMAP <-> nmap.

Thus, if BR2_PACKAGE_NMAP_NCAT is selected, we have a redundant
dependency. But that doesn't hurt and it really simplifies things.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Reviewed-by: Carlos Santos <casantos@datacom.com.br>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
package/busybox/busybox.mk
package/nmap/nmap.mk

index 1d3d202f532bc895e0a8f7fa03fdb281e41715d9..55c3d25b8efd7ef18594133ecab914267679ef63 100644 (file)
@@ -22,6 +22,7 @@ BUSYBOX_LDFLAGS = \
 
 # Packages that provide commands that may also be busybox applets:
 BUSYBOX_DEPENDENCIES = \
+       $(if $(BR2_PACKAGE_NMAP),nmap) \
        $(if $(BR2_PACKAGE_NTP),ntp) \
        $(if $(BR2_PACKAGE_PCIUTILS),pciutils) \
        $(if $(BR2_PACKAGE_PROCPS_NG),procps-ng) \
index 1c89b5424e75c7b5f596946b6b6b6b05d9024ec6..420aec82d7420908a72b69e189822a7f825931c3 100644 (file)
@@ -76,12 +76,6 @@ else
 NMAP_CONF_OPTS += --without-nping
 endif
 
-# If we are going to install ncat, ensure Busybox gets built/installed
-# before, so that this package overrides Busybox nc.
-ifeq ($(BR2_PACKAGE_NMAP_NCAT)$(BR2_PACKAGE_BUSYBOX),yy)
-NMAP_DEPENDENCIES += busybox
-endif
-
 # Add a symlink to "nc" if none of the competing netcats is selected
 ifeq ($(BR2_PACKAGE_NMAP_NCAT):$(BR2_PACKAGE_NETCAT)$(BR2_PACKAGE_NETCAT_OPENBSD),y:)
 define NMAP_INSTALL_NCAT_SYMLINK