Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Wed, 08 Mar 2017 07:35:59
Message-Id: 1488958530.994ecaf07a4d3dcc19c7b9ab11b620432886e18a.mgorny@gentoo
1 commit: 994ecaf07a4d3dcc19c7b9ab11b620432886e18a
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Feb 23 16:51:40 2017 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Mar 8 07:35:30 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=994ecaf0
7
8 mysql-multilib-r1.eclass: Replace unnecessary eval with bash array
9
10 eclass/mysql-multilib-r1.eclass | 12 ++++++------
11 1 file changed, 6 insertions(+), 6 deletions(-)
12
13 diff --git a/eclass/mysql-multilib-r1.eclass b/eclass/mysql-multilib-r1.eclass
14 index f82cc101af0..c22ff72f087 100644
15 --- a/eclass/mysql-multilib-r1.eclass
16 +++ b/eclass/mysql-multilib-r1.eclass
17 @@ -941,19 +941,19 @@ mysql-multilib-r1_pkg_config() {
18 if [[ ${PN} == "mysql" || ${PN} == "percona-server" ]] && version_is_at_least "5.7.6" ; then
19 # --initialize-insecure will not set root password
20 # --initialize would set a random one in the log which we don't need as we set it ourselves
21 - cmd="${EROOT}usr/sbin/mysqld"
22 + cmd=( "${EROOT}usr/sbin/mysqld" )
23 initialize_options="--initialize-insecure '--init-file=${sqltmp}'"
24 sqltmp="" # the initialize will take care of it
25 else
26 - cmd="${EROOT}usr/share/mysql/scripts/mysql_install_db"
27 - [[ -f "${cmd}" ]] || cmd="${EROOT}usr/bin/mysql_install_db"
28 + cmd=( "${EROOT}usr/share/mysql/scripts/mysql_install_db" )
29 + [[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" )
30 if [[ -r "${help_tables}" ]] ; then
31 cat "${help_tables}" >> "${sqltmp}"
32 fi
33 fi
34 - cmd="'$cmd' '--basedir=${EPREFIX}/usr' ${options} '--datadir=${ROOT}/${MY_DATADIR}' '--tmpdir=${ROOT}/${MYSQL_TMPDIR}' ${initialize_options}"
35 - einfo "Command: $cmd"
36 - eval $cmd \
37 + cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" ${initialize_options} )
38 + einfo "Command: ${cmd[*]}"
39 + "${cmd[@]}" \
40 >"${TMPDIR}"/mysql_install_db.log 2>&1
41 if [ $? -ne 0 ]; then
42 grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2