diff options
author | Francesco Riosa <vivo@gentoo.org> | 2006-02-05 14:22:46 +0000 |
---|---|---|
committer | Francesco Riosa <vivo@gentoo.org> | 2006-02-05 14:22:46 +0000 |
commit | 82ce1c65c3528a677d721ad2c946e14063499223 (patch) | |
tree | b1ceb5636f163b10faba5f170184ddf3e21f7f54 /app-admin/eselect-mysql | |
parent | Version bump to 0.9.6. Closes bug #117699. (diff) | |
download | historical-82ce1c65c3528a677d721ad2c946e14063499223.tar.gz historical-82ce1c65c3528a677d721ad2c946e14063499223.tar.bz2 historical-82ce1c65c3528a677d721ad2c946e14063499223.zip |
Added function slot_remove to be used inside MySQL eclass/ebuild
Package-Manager: portage-2.1_pre4-r1
Diffstat (limited to 'app-admin/eselect-mysql')
-rw-r--r-- | app-admin/eselect-mysql/ChangeLog | 8 | ||||
-rw-r--r-- | app-admin/eselect-mysql/Manifest | 30 | ||||
-rw-r--r-- | app-admin/eselect-mysql/eselect-mysql-1.0.0-r2.ebuild (renamed from app-admin/eselect-mysql/eselect-mysql-1.0.0-r1.ebuild) | 2 | ||||
-rw-r--r-- | app-admin/eselect-mysql/files/digest-eselect-mysql-1.0.0-r2 (renamed from app-admin/eselect-mysql/files/digest-eselect-mysql-1.0.0-r1) | 0 | ||||
-rw-r--r-- | app-admin/eselect-mysql/files/mysql.eselect | 48 |
5 files changed, 63 insertions, 25 deletions
diff --git a/app-admin/eselect-mysql/ChangeLog b/app-admin/eselect-mysql/ChangeLog index 9a9797c83f7e..59695ed8852e 100644 --- a/app-admin/eselect-mysql/ChangeLog +++ b/app-admin/eselect-mysql/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-admin/eselect-mysql # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-mysql/ChangeLog,v 1.7 2006/02/01 15:42:03 vivo Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-mysql/ChangeLog,v 1.8 2006/02/05 14:22:46 vivo Exp $ + +*eselect-mysql-1.0.0-r2 (05 Feb 2006) + + 05 Feb 2006; Francesco Riosa <vivo@gentoo.org> files/mysql.eselect, + -eselect-mysql-1.0.0-r1.ebuild, +eselect-mysql-1.0.0-r2.ebuild: + Added function slot_remove to be used inside MySQL eclass/ebuild *eselect-mysql-1.0.0-r1 (01 Feb 2006) diff --git a/app-admin/eselect-mysql/Manifest b/app-admin/eselect-mysql/Manifest index eee2539ee2bc..aabac608d5f3 100644 --- a/app-admin/eselect-mysql/Manifest +++ b/app-admin/eselect-mysql/Manifest @@ -1,25 +1,25 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -MD5 256f63514670390a79e01a8557877890 ChangeLog 1497 -RMD160 0b24e1991a851196833d9ed5b01fbdd9d3aa43d3 ChangeLog 1497 -SHA256 5313a2d281ac1c9472e5cb39a832225e8f569af5c826cbed0165d577c3d87f37 ChangeLog 1497 -MD5 d7282e2a8572577229850b5b5b536c2a eselect-mysql-1.0.0-r1.ebuild 626 -RMD160 e6ea8335b4fb86a2813780c17f0c8fb94aa122ad eselect-mysql-1.0.0-r1.ebuild 626 -SHA256 51209f98bee2773649d054416a599b03ab796af17779b13a3cc3fdb4d06f8e1b eselect-mysql-1.0.0-r1.ebuild 626 -MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-eselect-mysql-1.0.0-r1 0 -RMD160 9c1185a5c5e9fc54612808977ee8f548b2258d31 files/digest-eselect-mysql-1.0.0-r1 0 -SHA256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 files/digest-eselect-mysql-1.0.0-r1 0 -MD5 eba08a11b21ec19979da18bec358f65d files/mysql.eselect 8322 -RMD160 f61878e1aaa47eda58e74ad64b89d9dc6b2933a1 files/mysql.eselect 8322 -SHA256 137bbf74a69e9ab187e5474a6ff8171351a2fb2bb7f7d10cca2daee517dba9b3 files/mysql.eselect 8322 +MD5 2b63fe1a0100907cae755320c3e38ed8 ChangeLog 1740 +RMD160 35c52acc680280d2d8fb1d9dcaa57adb74ddbe81 ChangeLog 1740 +SHA256 d037c84b8a2babd8f85c2cd7f38cb27abf5dd930308ae7a75a026e1deb86671e ChangeLog 1740 +MD5 0862738ff2ffe203c3e4733b5186110f eselect-mysql-1.0.0-r2.ebuild 626 +RMD160 e8ac51c949070a156668d6fe082d33c35225e0a6 eselect-mysql-1.0.0-r2.ebuild 626 +SHA256 1c7017c8fe38826337fd103da7ec8c81b7ed9bf7793fd1550d17e474aee741eb eselect-mysql-1.0.0-r2.ebuild 626 +MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-eselect-mysql-1.0.0-r2 0 +RMD160 9c1185a5c5e9fc54612808977ee8f548b2258d31 files/digest-eselect-mysql-1.0.0-r2 0 +SHA256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 files/digest-eselect-mysql-1.0.0-r2 0 +MD5 c8f496aaa53545c18301adf5e4b44442 files/mysql.eselect 9031 +RMD160 5ee957b1616b479faf1f4783d62b02c455c17486 files/mysql.eselect 9031 +SHA256 171d92a95fd819abd444790318dbbd8126bccaa8dde0eab5e16f49ba7308e40f files/mysql.eselect 9031 MD5 fa97fe3e6f213f79ccf7ffbd53838095 metadata.xml 338 RMD160 73a2e747b9cb92a8a03ab792fcc0aa997b31c8d1 metadata.xml 338 SHA256 6a290284a517ad042ee98313454b6615a0498d59f8dcf428aac3da3da7340065 metadata.xml 338 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) -iD8DBQFD5OgmJrHF4yAQTrARAtajAKCkpwKivCDLdBfPeLC0UXrmq66sBwCbBQ0P -+4rPNt+9OLaM2i9OOTaAJ4o= -=ClJu +iD8DBQFD5gpvKolR564NvWYRApl2AJwJR9poUb7hQflm3S7sdht8wRauOACcDT9b +h9uaz1TyG1XMHpFIdyI1anI= +=10RJ -----END PGP SIGNATURE----- diff --git a/app-admin/eselect-mysql/eselect-mysql-1.0.0-r1.ebuild b/app-admin/eselect-mysql/eselect-mysql-1.0.0-r2.ebuild index 8dab974be165..40bde1c09294 100644 --- a/app-admin/eselect-mysql/eselect-mysql-1.0.0-r1.ebuild +++ b/app-admin/eselect-mysql/eselect-mysql-1.0.0-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-mysql/eselect-mysql-1.0.0-r1.ebuild,v 1.1 2006/02/01 15:42:03 vivo Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-mysql/eselect-mysql-1.0.0-r2.ebuild,v 1.1 2006/02/05 14:22:46 vivo Exp $ DESCRIPTION="Utility to change the default MySQL server being used" HOMEPAGE="http://www.gentoo.org/" diff --git a/app-admin/eselect-mysql/files/digest-eselect-mysql-1.0.0-r1 b/app-admin/eselect-mysql/files/digest-eselect-mysql-1.0.0-r2 index e69de29bb2d1..e69de29bb2d1 100644 --- a/app-admin/eselect-mysql/files/digest-eselect-mysql-1.0.0-r1 +++ b/app-admin/eselect-mysql/files/digest-eselect-mysql-1.0.0-r2 diff --git a/app-admin/eselect-mysql/files/mysql.eselect b/app-admin/eselect-mysql/files/mysql.eselect index a34e581ed91e..23e1f4fc6aa8 100644 --- a/app-admin/eselect-mysql/files/mysql.eselect +++ b/app-admin/eselect-mysql/files/mysql.eselect @@ -1,10 +1,10 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Id: mysql.eselect,v 1.6 2006/02/01 15:32:32 vivo Exp $ +# $Id: mysql.eselect,v 1.7 2006/02/05 14:22:46 vivo Exp $ DESCRIPTION="Manage the /usr/lib/*mysql* links" MAINTAINER="vivo@gentoo.org" -SVN_DATE='$Date: 2006/02/01 15:32:32 $' +SVN_DATE='$Date: 2006/02/05 14:22:46 $' VERSION=$(svn_date_to_version "${SVN_DATE}" ) MYSQL_SYMLINK_CHECKDIR="${ROOT}/usr/sbin" ERR_NOT_FOUND="(not-found)" @@ -28,7 +28,7 @@ function version4human() { function version4bash() { local minor=${1#*.} minor=${minor%%.x*} - [[ ${#minor} -eq 1 ]] && minor="0${minor}" + [[ ${#minor} -lt 10 ]] && minor="0${minor}" echo "${1%%.*}${minor}" } @@ -39,7 +39,7 @@ find_versions() { list=${MYSQL_SYMLINK_CHECKDIR}/mysqld-* [[ ${list##/} == mysqld-* ]] && return for x in ${MYSQL_SYMLINK_CHECKDIR}/mysqld-* ; do - versions=( $(version4human ${x##*-}) ${versions[@]} ) + versions=( $( version4human ${x##*-}) ${versions[@]} ) done echo ${versions[@]} } @@ -115,7 +115,9 @@ mysql_lib_symlinks() { # waste some time in removing and recreating symlinks for d in $dirlist ; do - for soname in $(find "${d}" -name "*.so*" -and -not -type "l") ; do + for soname + in $( find "${d}" -name "*.so*" -and -not -type "l" 2>/dev/null) + do # maxdot is a limit versus infinite loop maxdots=0 sonameln=${soname##*/} @@ -156,7 +158,7 @@ mysql_lib_symlinks() { get_version_fromlist() { local version=${1} local -a versions=( $(find_versions) ) - + if is_number ${version} ; then if [[ ${version} -gt 0 ]] && [[ ${version} -le ${#versions[@]} ]] ; then version=${versions[(( ${version} - 1 ))]} @@ -237,7 +239,7 @@ remove_current_version() { local CWD=$(pwd) local lastdir dir linkname local list=$(< $ROOT/var/lib/eselect/mysql/mysql-${version}.filelist ) - + for filename in $list ; do linkname="${ROOT}/${filename/"-${version}"/}" [[ -L "${linkname}" ]] && rm -f "${linkname}" @@ -267,7 +269,7 @@ describe_list() { do_list() { versions=( $(find_versions) ) current=$(get_current_version) - + write_list_start "Available MySQL versions:" if [[ -n "${versions[@]}" ]] ; then @@ -321,4 +323,34 @@ do_remove() { mysql_lib_symlinks } +### slot_remove action ### + +describe_slot_remove() { + echo "Remove symlinks given a MySQL slot (used in the ebuild)" +} + +do_slot_remove() { + + [[ ${#@} -lt 1 ]] && + die -q "Wrong count of paramters." + local version=$( version4human ${1} ) + version=$( get_version_fromlist ${version} ) + local cur_version=$( get_current_version ) + + if [[ ${version} == "${ERR_NOT_FOUND}" ]] ; then + die -q "I don't recognise that version of MYSQL" + fi + + if [[ -z "${version}" ]] ; then + die -q "No symlinks found" + fi + + if [[ "${version}" != "${cur_version}" ]] ; then + die -q "The version specified is not the current one" + fi + + remove_current_version "$( version4bash "${version}" )" + mysql_lib_symlinks +} + # vim: set ft=eselect : |