diff mbox series

dropbear: fix the alternatives when dbclient isn't built

Message ID 20200719013408.331492-1-rsalvaterra@gmail.com
State Rejected
Headers show
Series dropbear: fix the alternatives when dbclient isn't built | expand

Commit Message

Rui Salvaterra July 19, 2020, 1:34 a.m. UTC
The ssh and scp symlinks were still being created even when dbclient was
disabled in the build configuration. Fix this annoyance.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
---
 package/network/services/dropbear/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/package/network/services/dropbear/Makefile b/package/network/services/dropbear/Makefile
index 61e8a3bcb0..ae3f2a8637 100644
--- a/package/network/services/dropbear/Makefile
+++ b/package/network/services/dropbear/Makefile
@@ -53,9 +53,9 @@  define Package/dropbear
   CATEGORY:=Base system
   TITLE:=Small SSH2 client/server
   DEPENDS:= +DROPBEAR_ZLIB:zlib
-  ALTERNATIVES:=\
+  $(if $(CONFIG_DROPBEAR_DBCLIENT),ALTERNATIVES:=\
 	  100:/usr/bin/ssh:/usr/sbin/dropbear \
-	  100:/usr/bin/scp:/usr/sbin/dropbear \
+	  100:/usr/bin/scp:/usr/sbin/dropbear,)
 
 endef
 
@@ -149,7 +149,7 @@  endef
 define Build/Compile
 	+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
 		$(TARGET_CONFIGURE_OPTS) \
-		PROGRAMS="dropbear $(if $(CONFIG_DROPBEAR_DBCLIENT),dbclient,) dropbearkey scp" \
+		PROGRAMS="dropbear $(if $(CONFIG_DROPBEAR_DBCLIENT),dbclient scp,) dropbearkey" \
 		MULTI=1 SCPPROGRESS=1
 	+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
 		$(TARGET_CONFIGURE_OPTS) \