1 |
robbat2 10/05/11 07:58:43 |
2 |
|
3 |
Modified: db.eclass |
4 |
Log: |
5 |
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_'. |
6 |
|
7 |
Revision Changes Path |
8 |
1.37 eclass/db.eclass |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/db.eclass?rev=1.37&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/db.eclass?rev=1.37&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/db.eclass?r1=1.36&r2=1.37 |
13 |
|
14 |
Index: db.eclass |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/eclass/db.eclass,v |
17 |
retrieving revision 1.36 |
18 |
retrieving revision 1.37 |
19 |
diff -p -w -b -B -u -u -r1.36 -r1.37 |
20 |
--- db.eclass 4 May 2010 08:03:40 -0000 1.36 |
21 |
+++ db.eclass 11 May 2010 07:58:43 -0000 1.37 |
22 |
@@ -1,6 +1,6 @@ |
23 |
# Copyright 1999-2004 Gentoo Foundation |
24 |
# Distributed under the terms of the GNU General Public License v2 |
25 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/db.eclass,v 1.36 2010/05/04 08:03:40 tove Exp $ |
26 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/db.eclass,v 1.37 2010/05/11 07:58:43 robbat2 Exp $ |
27 |
# This is a common location for functions used in the sys-libs/db ebuilds |
28 |
# |
29 |
# Bugs: pauldv@g.o |
30 |
@@ -90,10 +90,13 @@ db_src_install_examples() { |
31 |
|
32 |
db_src_install_usrbinslot() { |
33 |
# slot all program names to avoid overwriting |
34 |
- for fname in "${D}"/usr/bin/db_* |
35 |
+ for fname in "${D}"/usr/bin/db* |
36 |
do |
37 |
- mv "${fname}" "${fname//\/db_//db${SLOT}_}" || \ |
38 |
- die "Failed to rename ${fname}" |
39 |
+ dn="$(dirname "${fname}")" |
40 |
+ bn="$(basename "${fname}")" |
41 |
+ bn="${bn/db/db${SLOT}}" |
42 |
+ mv "${fname}" "${dn}/${bn}" || \ |
43 |
+ die "Failed to rename ${fname} to ${dn}/${bn}" |
44 |
done |
45 |
} |