summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2007-04-15 12:18:49 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2007-04-15 12:18:49 +0000
commitfe6a7d409cac2c7452e74c80795e4d1cd7bb3d7b (patch)
treec6e137b34d269ed50a9ffea51d778ccaae0ddd9d /eclass/mysql_fx.eclass
parentuse net, not depend, for use when a system has limited network connectivity, ... (diff)
downloadgentoo-2-fe6a7d409cac2c7452e74c80795e4d1cd7bb3d7b.tar.gz
gentoo-2-fe6a7d409cac2c7452e74c80795e4d1cd7bb3d7b.tar.bz2
gentoo-2-fe6a7d409cac2c7452e74c80795e4d1cd7bb3d7b.zip
Give mysql_fx.eclass a few smarts to look for a versioned mysql-extras directory.
Diffstat (limited to 'eclass/mysql_fx.eclass')
-rw-r--r--eclass/mysql_fx.eclass34
1 files changed, 31 insertions, 3 deletions
diff --git a/eclass/mysql_fx.eclass b/eclass/mysql_fx.eclass
index 53212aa92927..9e9014b55b49 100644
--- a/eclass/mysql_fx.eclass
+++ b/eclass/mysql_fx.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/mysql_fx.eclass,v 1.18 2007/01/12 20:51:28 chtekk Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/mysql_fx.eclass,v 1.19 2007/04/15 12:18:49 robbat2 Exp $
# Author: Francesco Riosa (Retired) <vivo@gentoo.org>
# Maintainer: Luca Longinotti <chtekk@gentoo.org>
@@ -56,8 +56,16 @@ mysql_check_version_range() {
# True if at least one applicable range is found for the patch.
#
_mysql_test_patch_ver_pn() {
- local filesdir="${WORKDIR}/mysql-extras"
local allelements=", version, package name"
+ # So that it fails the directory test if none of them exist
+ local filesdir="/dev/null"
+ for d in "${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}" \
+ "${WORKDIR}/mysql-extras" ; do
+ if [ -d "${d}" ]; then
+ filesdir="${d}"
+ break
+ fi
+ done
[[ -d "${filesdir}" ]] || die "Source dir must be a directory"
local flags=$1 pname=$2
@@ -85,9 +93,29 @@ _mysql_test_patch_ver_pn() {
# If the patch applies, print its description.
#
mysql_mv_patches() {
- local index_file="${1:-"${WORKDIR}/mysql-extras/000_index.txt"}"
+ # So that it fails the directory test if none of them exist
+ local filesdir="/dev/null"
+ if [[ -z "${1}" ]]; then
+ for d in "${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}" \
+ "${WORKDIR}/mysql-extras" ; do
+ if [ -d "${d}" ]; then
+ filesdir="${d}"
+ break
+ fi
+ done
+ [[ -d "${filesdir}" ]] || die "No patches directory found!"
+ fi
+
+ local index_file="${1:-"${filesdir}/000_index.txt"}"
local my_ver="${2:-"${MYSQL_VERSION_ID}"}"
local my_test_fx=${3:-"_mysql_test_patch_ver_pn"}
+ _mysql_mv_patches "${index_file}" "${my_ver}" "${my_test_fx}"
+}
+
+_mysql_mv_patches() {
+ local index_file="${1}"
+ local my_ver="${2}"
+ local my_test_fx="${3}"
local dsc ndsc=0 i
dsc=( )