summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'eclass/mysql-autotools.eclass')
-rw-r--r--eclass/mysql-autotools.eclass58
1 files changed, 29 insertions, 29 deletions
diff --git a/eclass/mysql-autotools.eclass b/eclass/mysql-autotools.eclass
index e00906b..9d1ff91 100644
--- a/eclass/mysql-autotools.eclass
+++ b/eclass/mysql-autotools.eclass
@@ -51,14 +51,14 @@ mysql-autotools_disable_test() {
# ${S}/mysql-tests/suite/ndb_team/t/disabled.def
# ${S}/mysql-tests/suite/binlog/t/disabled.def
# ${S}/mysql-tests/suite/innodb/t/disabled.def
- if [ -n "${testsuite}" ]; then
+ if [[ -n ${testsuite} ]]; then
for mysql_disable_file in \
${S}/mysql-test/suite/${testsuite}/disabled.def \
${S}/mysql-test/suite/${testsuite}/t/disabled.def \
FAILED ; do
- [ -f "${mysql_disable_file}" ] && break
+ [[ -f ${mysql_disable_file} ]] && break
done
- if [ "${mysql_disabled_file}" != "FAILED" ]; then
+ if [[ ${mysql_disabled_file} != "FAILED" ]]; then
echo "${testname} : ${reason}" >> "${mysql_disable_file}"
else
ewarn "Could not find testsuite disabled.def location for ${rawtestname}"
@@ -99,7 +99,7 @@ mysql-autotools_configure_minimal() {
# MariaDB requires this flag in order to link to GPLv3 readline v6 or greater
# A note is added to the configure output
- if [[ "${PN}" == "mariadb" ]] && mysql_version_is_at_least "5.1.61" ; then
+ if [[ ${PN} == "mariadb" ]] && mysql_version_is_at_least "5.1.61" ; then
myconf="${myconf} --disable-distribution"
fi
}
@@ -134,7 +134,7 @@ mysql-autotools_configure_common() {
fi
fi
- if [ -n "${MYSQL_DEFAULT_CHARSET}" -a -n "${MYSQL_DEFAULT_COLLATION}" ]; then
+ if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
ewarn "You MUST file bugs without these variables set."
@@ -220,7 +220,7 @@ mysql-autotools_configure_51() {
# Not supporting as examples: example,daemon_example,ftexample
plugins_sta="${plugins_sta} partition"
- if [[ "${PN}" != "mariadb" ]] ; then
+ if [[ ${PN} != "mariadb" ]] ; then
elog "Before using the Federated storage engine, please be sure to read"
elog "http://dev.mysql.com/doc/refman/5.1/en/federated-limitations.html"
plugins_dyn="${plugins_dyn} federated"
@@ -237,10 +237,10 @@ mysql-autotools_configure_51() {
# - innobase, innodb_plugin
# Build falcon if available for 6.x series.
for i in innobase falcon ; do
- [ -e "${S}"/storage/${i} ] && plugins_sta="${plugins_sta} ${i}"
+ [[ -e ${S}/storage/${i} ]] && plugins_sta="${plugins_sta} ${i}"
done
for i in innodb_plugin ; do
- [ -e "${S}"/storage/${i} ] && plugins_dyn="${plugins_dyn} ${i}"
+ [[ -e ${S}/storage/${i} ]] && plugins_dyn="${plugins_dyn} ${i}"
done
# like configuration=max-no-ndb
@@ -252,12 +252,12 @@ mysql-autotools_configure_51() {
plugins_dis="${plugins_dis} ndbcluster"
fi
- if [[ "${PN}" == "mariadb" ]] ; then
+ if [[ ${PN} == "mariadb" ]] ; then
# In MariaDB, InnoDB is packaged in the xtradb directory, so it's not
# caught above.
# This is not optional, without it several upstream testcases fail.
# Also strongly recommended by upstream.
- if [[ "${PV}" < "5.2.0" ]] ; then
+ if [[ ${PV} < "5.2.0" ]] ; then
myconf="${myconf} --with-maria-tmp-tables"
plugins_sta="${plugins_sta} maria"
else
@@ -265,11 +265,11 @@ mysql-autotools_configure_51() {
plugins_sta="${plugins_sta} aria"
fi
- [ -e "${S}"/storage/innobase ] || [ -e "${S}"/storage/xtradb ] ||
+ [[ ( -e ${S}/storage/innobase ) || ( -e ${S}/storage/xtradb ) ]] ||
die "The ${P} package doesn't provide innobase nor xtradb"
for i in innobase xtradb ; do
- [ -e "${S}"/storage/${i} ] && plugins_sta="${plugins_sta} ${i}"
+ [[ -e ${S}/storage/${i} ]] && plugins_sta="${plugins_sta} ${i}"
done
myconf="${myconf} $(use_with libevent)"
@@ -300,7 +300,7 @@ mysql-autotools_configure_51() {
fi
fi
- if pbxt_available && [[ "${PBXT_NEWSTYLE}" == "1" ]]; then
+ if pbxt_available && [[ ${PBXT_NEWSTYLE} == "1" ]]; then
use pbxt \
&& plugins_sta="${plugins_sta} pbxt" \
|| plugins_dis="${plugins_dis} pbxt"
@@ -311,7 +311,7 @@ mysql-autotools_configure_51() {
plugins_dyn=""
# Google MySQL, bundle what upstream supports
- if [[ "${PN}" == "google-mysql" ]]; then
+ if [[ ${PN} == "google-mysql" ]]; then
for x in innobase innodb_plugin innodb ; do
plugins_sta="${plugins_sta//$x}"
plugins_dyn="${plugins_dyn//$x}"
@@ -389,7 +389,7 @@ mysql-autotools_src_prepare() {
# last -fPIC fixup, per bug #305873
i="${S}"/storage/innodb_plugin/plug.in
- [ -f "${i}" ] && sed -i -e '/CFLAGS/s,-prefer-non-pic,,g' "${i}"
+ [[ -f ${i} ]] && sed -i -e '/CFLAGS/s,-prefer-non-pic,,g' "${i}"
# Additional checks, remove bundled zlib
rm -f "${S}/zlib/"*.[ch]
@@ -417,21 +417,21 @@ mysql-autotools_src_prepare() {
i="innobase"
o="${WORKDIR}/storage-${i}.mysql-upstream"
# Have we been here already?
- [ -d "${o}" ] && rm -f "${i}"
+ [[ -d ${o} ]] && rm -f "${i}"
# Or maybe we haven't
- [ -d "${i}" -a ! -d "${o}" ] && mv "${i}" "${o}"
+ [[ ( -d ${i} ) && ! ( -d ${o} ) ]] && mv "${i}" "${o}"
cp -ral "${WORKDIR}/${XTRADB_P}" "${i}"
popd >/dev/null
fi
- if pbxt_patch_available && [[ "${PBXT_NEWSTYLE}" == "1" ]] && use pbxt ; then
+ if pbxt_patch_available && [[ ${PBXT_NEWSTYLE} == "1" ]] && use pbxt ; then
einfo "Adding storage engine: PBXT"
pushd "${S}"/storage >/dev/null
i='pbxt'
- [ -d "${i}" ] && rm -rf "${i}"
+ [[ -d ${i} ]] && rm -rf "${i}"
cp -ral "${WORKDIR}/${PBXT_P}" "${i}"
f="${WORKDIR}/mysql-extras/pbxt/fix-low-priority.patch"
- [[ -f $f ]] && epatch "$f"
+ [[ -f $f ]] && epatch "$f"
popd >/dev/null
fi
@@ -490,7 +490,7 @@ mysql-autotools_src_configure() {
# implicitly. Upstream might be interested in this, exclude
# -fno-implicit-templates for google-mysql for now.
mysql_version_is_at_least "5.0" \
- && [[ "${PN}" != "google-mysql" ]] \
+ && [[ ${PN} != "google-mysql" ]] \
&& CXXFLAGS="${CXXFLAGS} -fno-implicit-templates"
export CXXFLAGS
@@ -526,7 +526,7 @@ mysql-autotools_src_configure() {
| xargs -0 -n100 sed -i \
-e 's|^pkglibdir *= *$(libdir)/mysql|pkglibdir = $(libdir)|;s|^pkgincludedir *= *$(includedir)/mysql|pkgincludedir = $(includedir)|'
- if [[ $EAPI == 2 ]] && [[ "${PBXT_NEWSTYLE}" != "1" ]]; then
+ if [[ $EAPI == 2 ]] && [[ ${PBXT_NEWSTYLE} != "1" ]]; then
pbxt_patch_available && use pbxt && pbxt_src_configure
fi
}
@@ -538,7 +538,7 @@ mysql-autotools_src_compile() {
emake || die "emake failed"
- if [[ "${PBXT_NEWSTYLE}" != "1" ]]; then
+ if [[ ${PBXT_NEWSTYLE} != "1" ]]; then
pbxt_patch_available && use pbxt && pbxt_src_compile
fi
}
@@ -557,7 +557,7 @@ mysql-autotools_src_install() {
testroot="${MY_SHAREDSTATEDIR}" \
|| die "emake install failed"
- if [[ "${PBXT_NEWSTYLE}" != "1" ]]; then
+ if [[ ${PBXT_NEWSTYLE} != "1" ]]; then
pbxt_patch_available && use pbxt && pbxt_src_install
fi
@@ -620,7 +620,7 @@ mysql-autotools_src_install() {
# Empty directories ...
diropts "-m0750"
keepdir "${MY_DATADIR#${EPREFIX}}"
- if [[ "${PREVIOUS_DATADIR}" != "yes" ]] ; then
+ if [[ ${PREVIOUS_DATADIR} != "yes" ]] ; then
chown -R mysql:mysql "${D}/${MY_DATADIR}"
fi
@@ -635,7 +635,7 @@ mysql-autotools_src_install() {
# Docs
einfo "Installing docs"
for i in README ChangeLog EXCEPTIONS-CLIENT INSTALL-SOURCE ; do
- [[ -f "$i" ]] && dodoc "$i"
+ [[ -f $i ]] && dodoc "$i"
done
doinfo "${S}"/Docs/mysql.info
@@ -648,12 +648,12 @@ mysql-autotools_src_install() {
"${S}"/support-files/magic \
"${S}"/support-files/ndb-config-2-node.ini
do
- [[ -f "$script" ]] && dodoc "${script}"
+ [[ -f $script ]] && dodoc "${script}"
done
docinto "scripts"
for script in "${S}"/scripts/mysql* ; do
- [[ -f "$script" ]] && [[ "${script%.sh}" == "${script}" ]] && dodoc "${script}"
+ [[ ( -f $script ) && ( ${script%.sh} == ${script} ) ]] && dodoc "${script}"
done
fi
@@ -661,7 +661,7 @@ mysql-autotools_src_install() {
mysql_lib_symlinks "${ED}"
#Remove mytop if perl is not selected
- [[ "${PN}" == "mariadb" ]] && ! use perl \
+ [[ ${PN} == "mariadb" ]] && ! use perl \
&& mysql_version_is_at_least "5.3" \
&& rm -f "${ED}/usr/bin/mytop"