1 |
commit: 7556dd45f579a57c8fd2944b865f938fb6f07c07 |
2 |
Author: Brian Evans <grknight <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Nov 2 21:50:48 2015 +0000 |
4 |
Commit: Brian Evans <grknight <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Nov 2 21:50:48 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/mysql.git/commit/?id=7556dd45 |
7 |
|
8 |
mysql-multilib.eclass: Add the --show option to my_print_defaults when it originally returns a default string for a password |
9 |
|
10 |
Signed-off-by: Brian Evans <grknight <AT> gentoo.org> |
11 |
|
12 |
eclass/mysql-multilib.eclass | 11 ++++++++--- |
13 |
1 file changed, 8 insertions(+), 3 deletions(-) |
14 |
|
15 |
diff --git a/eclass/mysql-multilib.eclass b/eclass/mysql-multilib.eclass |
16 |
index 7cdda22..23683f5 100644 |
17 |
--- a/eclass/mysql-multilib.eclass |
18 |
+++ b/eclass/mysql-multilib.eclass |
19 |
@@ -914,9 +914,10 @@ mysql-multilib_getopt() { |
20 |
# Use my_print_defaults to extract specific config options |
21 |
mysql-multilib_getoptval() { |
22 |
local mypd="${EROOT}"/usr/bin/my_print_defaults |
23 |
- section="$1" |
24 |
- flag="--${2}=" |
25 |
- "${mypd}" $section | sed -n "/^${flag}/s,${flag},,gp" |
26 |
+ local section="$1" |
27 |
+ local flag="--${2}=" |
28 |
+ local extra_options="${3}" |
29 |
+ "${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp" |
30 |
} |
31 |
|
32 |
# @FUNCTION: mysql-multilib_pkg_config |
33 |
@@ -977,6 +978,10 @@ mysql-multilib_pkg_config() { |
34 |
|
35 |
if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then |
36 |
MYSQL_ROOT_PASSWORD="$(mysql-multilib_getoptval 'client mysql' password)" |
37 |
+ # Sometimes --show is required to display passwords in some implementations of my_print_defaults |
38 |
+ if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then |
39 |
+ MYSQL_ROOT_PASSWORD="$(mysql-multilib_getoptval 'client mysql' password --show)" |
40 |
+ fi |
41 |
fi |
42 |
MYSQL_TMPDIR="$(mysql-multilib_getoptval mysqld tmpdir)" |
43 |
# These are dir+prefix |