From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id C68011384B4 for ; Mon, 2 Nov 2015 21:51:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DB04521C014; Mon, 2 Nov 2015 21:51:13 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7A34421C014 for ; Mon, 2 Nov 2015 21:51:13 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6BD1934070A for ; Mon, 2 Nov 2015 21:51:07 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 919FC1ECA for ; Mon, 2 Nov 2015 21:51:05 +0000 (UTC) From: "Brian Evans" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Evans" Message-ID: <1446501048.7556dd45f579a57c8fd2944b865f938fb6f07c07.grknight@gentoo> Subject: [gentoo-commits] proj/mysql:master commit in: eclass/ X-VCS-Repository: proj/mysql X-VCS-Files: eclass/mysql-multilib.eclass X-VCS-Directories: eclass/ X-VCS-Committer: grknight X-VCS-Committer-Name: Brian Evans X-VCS-Revision: 7556dd45f579a57c8fd2944b865f938fb6f07c07 X-VCS-Branch: master Date: Mon, 2 Nov 2015 21:51:05 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: bbf4b722-3989-427a-b240-56ff7c10c8dd X-Archives-Hash: 2f1325da715e659ea6592219b9ba2122 commit: 7556dd45f579a57c8fd2944b865f938fb6f07c07 Author: Brian Evans gentoo org> AuthorDate: Mon Nov 2 21:50:48 2015 +0000 Commit: Brian Evans gentoo org> CommitDate: Mon Nov 2 21:50:48 2015 +0000 URL: https://gitweb.gentoo.org/proj/mysql.git/commit/?id=7556dd45 mysql-multilib.eclass: Add the --show option to my_print_defaults when it originally returns a default string for a password Signed-off-by: Brian Evans gentoo.org> eclass/mysql-multilib.eclass | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/eclass/mysql-multilib.eclass b/eclass/mysql-multilib.eclass index 7cdda22..23683f5 100644 --- a/eclass/mysql-multilib.eclass +++ b/eclass/mysql-multilib.eclass @@ -914,9 +914,10 @@ mysql-multilib_getopt() { # Use my_print_defaults to extract specific config options mysql-multilib_getoptval() { local mypd="${EROOT}"/usr/bin/my_print_defaults - section="$1" - flag="--${2}=" - "${mypd}" $section | sed -n "/^${flag}/s,${flag},,gp" + local section="$1" + local flag="--${2}=" + local extra_options="${3}" + "${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp" } # @FUNCTION: mysql-multilib_pkg_config @@ -977,6 +978,10 @@ mysql-multilib_pkg_config() { if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then MYSQL_ROOT_PASSWORD="$(mysql-multilib_getoptval 'client mysql' password)" + # Sometimes --show is required to display passwords in some implementations of my_print_defaults + if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then + MYSQL_ROOT_PASSWORD="$(mysql-multilib_getoptval 'client mysql' password --show)" + fi fi MYSQL_TMPDIR="$(mysql-multilib_getoptval mysqld tmpdir)" # These are dir+prefix