summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2021-08-10 17:50:11 +0200
committerThomas Deutschmann <whissi@gentoo.org>2021-08-10 18:26:06 +0200
commit3984277ad98980bda254867b3385391f3ac452b6 (patch)
tree6b4c46cf757a233027f08d95e6a8f733f897c34d /dev-db/mariadb/mariadb-10.4.21.ebuild
parentdev-db/mariadb: fix parameter parsing in pkg_config (diff)
downloadgentoo-3984277ad98980bda254867b3385391f3ac452b6.tar.gz
gentoo-3984277ad98980bda254867b3385391f3ac452b6.tar.bz2
gentoo-3984277ad98980bda254867b3385391f3ac452b6.zip
dev-db/mariadb: pkg_config: skip {bin,relay}_log check for relative paths
{bin,relay}_log will be stored below MySQL data directory when user only specified basename in config so we don't need to verify this location in that situation. Package-Manager: Portage-3.0.21, Repoman-3.0.3 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'dev-db/mariadb/mariadb-10.4.21.ebuild')
-rw-r--r--dev-db/mariadb/mariadb-10.4.21.ebuild18
1 files changed, 12 insertions, 6 deletions
diff --git a/dev-db/mariadb/mariadb-10.4.21.ebuild b/dev-db/mariadb/mariadb-10.4.21.ebuild
index e41458e1ca6..f034c20cdab 100644
--- a/dev-db/mariadb/mariadb-10.4.21.ebuild
+++ b/dev-db/mariadb/mariadb-10.4.21.ebuild
@@ -1030,13 +1030,15 @@ pkg_config() {
unset _my_tmpdir_testfile
fi
- if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
+ if [[ "${MYSQL_LOG_BIN}" == /* && ! -d "${MYSQL_LOG_BIN}" ]] ; then
+ # Only create directory when MYSQL_LOG_BIN is an absolute path
einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
fi
- if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+ if [[ "${MYSQL_LOG_BIN}" == /* ]] ; then
+ # Only test when MYSQL_LOG_BIN is an absolute path
local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
[[ -z "${_my_logbin_testfile}" ]] \
&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
@@ -1055,13 +1057,15 @@ pkg_config() {
fi
fi
- if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
+ if [[ "${MYSQL_RELAY_LOG}" == /* && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
+ # Only create directory when MYSQL_RELAY_LOG is an absolute path
einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
fi
- if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+ if [[ "${MYSQL_RELAY_LOG}" == /* ]] ; then
+ # Only test when MYSQL_RELAY_LOG is an absolute path
local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
[[ -z "${_my_relaylog_testfile}" ]] \
&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
@@ -1098,11 +1102,13 @@ pkg_config() {
einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
- if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+ if [[ "${MYSQL_LOG_BIN}" == /* ]] ; then
+ # Absolute path for binary log files specified
einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
fi
- if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+ if [[ "${MYSQL_RELAY_LOG}" == /* ]] ; then
+ # Absolute path for relay log files specified
einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
fi