/[gentoo-x86]/eclass/mysql_fx.eclass
Gentoo

Diff of /eclass/mysql_fx.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.18 Revision 1.19
1# Copyright 1999-2007 Gentoo Foundation 1# Copyright 1999-2007 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/mysql_fx.eclass,v 1.18 2007/01/12 20:51:28 chtekk Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/mysql_fx.eclass,v 1.19 2007/04/15 12:18:49 robbat2 Exp $
4 4
5# Author: Francesco Riosa (Retired) <vivo@gentoo.org> 5# Author: Francesco Riosa (Retired) <vivo@gentoo.org>
6# Maintainer: Luca Longinotti <chtekk@gentoo.org> 6# Maintainer: Luca Longinotti <chtekk@gentoo.org>
7 7
8inherit multilib 8inherit multilib
54 54
55# 55#
56# True if at least one applicable range is found for the patch. 56# True if at least one applicable range is found for the patch.
57# 57#
58_mysql_test_patch_ver_pn() { 58_mysql_test_patch_ver_pn() {
59 local filesdir="${WORKDIR}/mysql-extras"
60 local allelements=", version, package name" 59 local allelements=", version, package name"
60 # So that it fails the directory test if none of them exist
61 local filesdir="/dev/null"
62 for d in "${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}" \
63 "${WORKDIR}/mysql-extras" ; do
64 if [ -d "${d}" ]; then
65 filesdir="${d}"
66 break
67 fi
68 done
61 69
62 [[ -d "${filesdir}" ]] || die "Source dir must be a directory" 70 [[ -d "${filesdir}" ]] || die "Source dir must be a directory"
63 local flags=$1 pname=$2 71 local flags=$1 pname=$2
64 if [[ $(( $flags & $(( 1 + 4 + 16 )) )) -eq 21 ]] ; then 72 if [[ $(( $flags & $(( 1 + 4 + 16 )) )) -eq 21 ]] ; then
65 einfo "using '${pname}'" 73 einfo "using '${pname}'"
83# Parse a "index_file" looking for patches to apply to the 91# Parse a "index_file" looking for patches to apply to the
84# current MySQL version. 92# current MySQL version.
85# If the patch applies, print its description. 93# If the patch applies, print its description.
86# 94#
87mysql_mv_patches() { 95mysql_mv_patches() {
96 # So that it fails the directory test if none of them exist
97 local filesdir="/dev/null"
98 if [[ -z "${1}" ]]; then
99 for d in "${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}" \
100 "${WORKDIR}/mysql-extras" ; do
101 if [ -d "${d}" ]; then
102 filesdir="${d}"
103 break
104 fi
105 done
106 [[ -d "${filesdir}" ]] || die "No patches directory found!"
107 fi
108
88 local index_file="${1:-"${WORKDIR}/mysql-extras/000_index.txt"}" 109 local index_file="${1:-"${filesdir}/000_index.txt"}"
89 local my_ver="${2:-"${MYSQL_VERSION_ID}"}" 110 local my_ver="${2:-"${MYSQL_VERSION_ID}"}"
90 local my_test_fx=${3:-"_mysql_test_patch_ver_pn"} 111 local my_test_fx=${3:-"_mysql_test_patch_ver_pn"}
112 _mysql_mv_patches "${index_file}" "${my_ver}" "${my_test_fx}"
113}
114
115_mysql_mv_patches() {
116 local index_file="${1}"
117 local my_ver="${2}"
118 local my_test_fx="${3}"
91 local dsc ndsc=0 i 119 local dsc ndsc=0 i
92 dsc=( ) 120 dsc=( )
93 121
94 # Values for flags are (2^x): 122 # Values for flags are (2^x):
95 # 1 - one patch found 123 # 1 - one patch found

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

  ViewVC Help
Powered by ViewVC 1.1.20