From baf6d529dc81338dc4dc006aba816453f4652f0e Mon Sep 17 00:00:00 2001 From: Relintai Date: Sat, 28 Nov 2020 14:21:32 +0100 Subject: [PATCH] Only link to mariadb if both mariadb and mysql is present. Also print the fact. --- database/mysql/detect.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/database/mysql/detect.py b/database/mysql/detect.py index 2508cc9..74c5054 100644 --- a/database/mysql/detect.py +++ b/database/mysql/detect.py @@ -22,10 +22,18 @@ def can_build(): mysql_error = os.system("pkg-config mysql --modversion --silence-errors > /dev/null ") if mariadb_error and mysql_error: - #print("mysql and mariadb not found..") + print("mysql and mariadb not found..") return False - return True + if not mariadb_error: + print("mariadb found!") + + return True + + if not mysql_error: + print("mysql found!") + + return True #todo return False @@ -50,6 +58,7 @@ def configure(env): if not mariadb_error: env.ParseConfig("pkg-config mariadb --cflags --libs") + return if not mysql_error: env.ParseConfig("pkg-config mysql --cflags --libs")