summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2010-05-11 07:58:43 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2010-05-11 07:58:43 +0000
commit96b9ff133ecc24745861da3ac3afa7a720256a2d (patch)
treebc44a3f588b04114dd986bdfee0496ebb83b1aab /eclass/db.eclass
parentVersion bump (bug #289902). Also solves bug #274085 (stripping bogus line), b... (diff)
downloadgentoo-2-96b9ff133ecc24745861da3ac3afa7a720256a2d.tar.gz
gentoo-2-96b9ff133ecc24745861da3ac3afa7a720256a2d.tar.bz2
gentoo-2-96b9ff133ecc24745861da3ac3afa7a720256a2d.zip
Improve binary renaming to NOT rename all elements in the path, and also pick up binaries that match the prefix of 'db' but not 'db_'.
Diffstat (limited to 'eclass/db.eclass')
-rw-r--r--eclass/db.eclass11
1 files changed, 7 insertions, 4 deletions
diff --git a/eclass/db.eclass b/eclass/db.eclass
index f74e39cb1c52..b2e4256bc213 100644
--- a/eclass/db.eclass
+++ b/eclass/db.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/db.eclass,v 1.36 2010/05/04 08:03:40 tove Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/db.eclass,v 1.37 2010/05/11 07:58:43 robbat2 Exp $
# This is a common location for functions used in the sys-libs/db ebuilds
#
# Bugs: pauldv@gentoo.org
@@ -90,10 +90,13 @@ db_src_install_examples() {
db_src_install_usrbinslot() {
# slot all program names to avoid overwriting
- for fname in "${D}"/usr/bin/db_*
+ for fname in "${D}"/usr/bin/db*
do
- mv "${fname}" "${fname//\/db_//db${SLOT}_}" || \
- die "Failed to rename ${fname}"
+ dn="$(dirname "${fname}")"
+ bn="$(basename "${fname}")"
+ bn="${bn/db/db${SLOT}}"
+ mv "${fname}" "${dn}/${bn}" || \
+ die "Failed to rename ${fname} to ${dn}/${bn}"
done
}