From: "Thomas Deutschmann" <whissi@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-biology/bioperl-db/
Date: Sat, 20 Mar 2021 19:21:31 +0000 (UTC) [thread overview]
Message-ID: <1616268088.fd89a51f0151103d6bac5f165e06c78eaa4d81b4.whissi@gentoo> (raw)
commit: fd89a51f0151103d6bac5f165e06c78eaa4d81b4
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 20 19:16:20 2021 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Mar 20 19:21:28 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd89a51f
sci-biology/bioperl-db: adjust mysql_install_db location
Since commit 755be857e3051, mysql_install_db location has changed.
Package-Manager: Portage-3.0.17, Repoman-3.0.2
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
sci-biology/bioperl-db/bioperl-db-1.6.9-r1.ebuild | 43 +++++++++++++++--------
1 file changed, 29 insertions(+), 14 deletions(-)
diff --git a/sci-biology/bioperl-db/bioperl-db-1.6.9-r1.ebuild b/sci-biology/bioperl-db/bioperl-db-1.6.9-r1.ebuild
index facab7d5ffb..020fb292174 100644
--- a/sci-biology/bioperl-db/bioperl-db-1.6.9-r1.ebuild
+++ b/sci-biology/bioperl-db/bioperl-db-1.6.9-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -49,6 +49,10 @@ src_test() {
ebegin "Setting up test database"
+ local mysql_install_db="${EPREFIX}/usr/share/mariadb/scripts/mysql_install_db"
+ [[ ! -x "${mysql_install_db}" ]] && mysql_install_db="${EPREFIX}/usr/bin/mysql_install_db"
+ [[ ! -x "${mysql_install_db}" ]] && die "mysql_install_db command not found!"
+
local mysqld="${EPREFIX}/usr/sbin/mysqld"
local socket="${T}/mysql.sock"
local pidfile="${T}/mysql.pid"
@@ -58,24 +62,35 @@ src_test() {
mkdir -p "${datadir}" || die "Can't make mysql database dir";
chmod 755 "${datadir}" || die "Can't fix mysql database dir perms";
- if $mysqld --help | grep -q MariaDB ; then
- "${EPREFIX}"/usr/share/mysql/scripts/mysql_install_db \
- --basedir="${EPREFIX}/usr" \
- --datadir="${datadir}" \
- --user=$(whoami) || die "Can't initalize database"
- fi
-
- ${mysqld} --no-defaults --user=$(whoami) --skip-networking \
- --socket="${socket}" \
- --pid-file="${pidfile}" \
- --datadir="${datadir}" &
- maxtry=20
+ "${mysql_install_db}" \
+ --basedir="${EPREFIX}/usr" \
+ --datadir="${datadir}" \
+ --user=$(whoami) \
+ || die "Failed to initalize test database"
+
+ "${mysqld}" \
+ --no-defaults \
+ --user=$(whoami) \
+ --skip-networking \
+ --skip-grant \
+ --socket="${socket}" \
+ --pid-file="${pidfile}" \
+ --datadir="${datadir}" &
+
+ local maxtry=20
while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
maxtry=$((${maxtry}-1))
echo -n "."
sleep 1
done
- eend $?
+
+ local rc=1
+ [[ -S "${socket}" ]] && rc=0
+
+ eend ${rc}
+
+ [[ ${rc} -ne 0 ]] && die "Failed to start mysqld test instance"
+
export MYSQL_UNIX_PORT="${socket}"
perl-module_src_test
ebegin "Shutting down mysql test database"
next reply other threads:[~2021-03-20 19:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-20 19:21 Thomas Deutschmann [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-07-02 15:40 [gentoo-commits] repo/gentoo:master commit in: sci-biology/bioperl-db/ David Seifert
2021-08-19 12:44 Andreas Sturmlechner
2021-08-19 1:29 Agostino Sarubbo
2021-08-16 5:13 Agostino Sarubbo
2019-12-15 20:24 Michał Górny
2017-07-30 10:04 Michał Górny
2017-07-18 4:40 Kent Fredric
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1616268088.fd89a51f0151103d6bac5f165e06c78eaa4d81b4.whissi@gentoo \
--to=whissi@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox