summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2008-03-10 02:47:20 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2008-03-10 02:47:20 +0000
commited305b466e86c810f61aaac6d780b4d2f7d7fd1b (patch)
treeb2bcb43631515e225ae41e7eac7f25873bc25c42 /eclass
parentBump. (diff)
downloadgentoo-2-ed305b466e86c810f61aaac6d780b4d2f7d7fd1b.tar.gz
gentoo-2-ed305b466e86c810f61aaac6d780b4d2f7d7fd1b.tar.bz2
gentoo-2-ed305b466e86c810f61aaac6d780b4d2f7d7fd1b.zip
Trim the trailing letters used by upstream for respun tarballs.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/mysql.eclass6
1 files changed, 4 insertions, 2 deletions
diff --git a/eclass/mysql.eclass b/eclass/mysql.eclass
index b1e8e009b5f4..9a7713b5fb87 100644
--- a/eclass/mysql.eclass
+++ b/eclass/mysql.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.eclass,v 1.87 2008/03/09 21:19:14 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.88 2008/03/10 02:47:20 robbat2 Exp $
# Author: Francesco Riosa (Retired) <vivo@gentoo.org>
# Maintainer: MySQL Team <mysql-bugs@gentoo.org>
@@ -36,9 +36,11 @@ fi
# This is an important part, because many of the choices the MySQL ebuild will do
# depend on this variable.
# In particular, the code below transforms a $PVR like "5.0.18-r3" in "5001803"
+# We also strip off upstream's trailing letter that they use to respin tarballs
MYSQL_VERSION_ID=""
-tpv=( ${PV//[-._]/ } ) ; tpv[3]="${PVR:${#PV}}" ; tpv[3]="${tpv[3]##*-r}"
+tpv="${PV%[a-z]}"
+tpv=( ${tpv//[-._]/ } ) ; tpv[3]="${PVR:${#PV}}" ; tpv[3]="${tpv[3]##*-r}"
for vatom in 0 1 2 3 ; do
# pad to length 2
tpv[${vatom}]="00${tpv[${vatom}]}"