mariadb: Create compatibility symlinks
authorMichal Hrusecky <michal.hrusecky@turris.com>
Sat, 30 Oct 2021 21:53:58 +0000 (23:53 +0200)
committerJosef Schlehofer <pepe.schlehofer@gmail.com>
Fri, 3 Dec 2021 13:29:28 +0000 (14:29 +0100)
For every mysql* binary create corresponding mariadb binary and vice
versa.

Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>
(cherry picked from commit 2295c351ed826d26778b42888d6f54744e0133f5)

utils/mariadb/Makefile

index f2cf4eb257ac606c585dc70f16a1c611b2eb4971..65033ab5872dab7d41334ff8f65c998fa369a951 100644 (file)
@@ -189,9 +189,8 @@ endef
 
 define Package/mariadb/install/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $(1)/usr/bin
-       cd "$(PKG_INSTALL_DIR)/usr/bin"; find . -maxdepth 1 -type l \
-               -regex './$(subst mysql,mariadb[-]*,$(subst _,-,$(2)))' \
-               | xargs  -I{} $(CP) {} "$(1)/usr/bin"
+       [ $(2) = $(subst mysql,mariadb,$(2)) ] || ln -s $(2) $(1)/usr/bin/$(subst mysql,mariadb,$(2))
+       [ $(2) = $(subst mariadb,mysql,$(2)) ] || ln -s $(2) $(1)/usr/bin/$(subst mariadb,mysql,$(2))
 endef
 
 define Package/mariadb/install/plugin