1 |
flameeyes 10/07/30 15:05:08 |
2 |
|
3 |
Modified: ruby-ng.eclass |
4 |
Log: |
5 |
Fix broken test for mislink with the new Ruby 1.9.2 ebuilds. |
6 |
|
7 |
With 1.9.2 the sitedir is now the same between 1.8 and 1.9, so you |
8 |
cannot just go look for all the extensions within that or you'll hit |
9 |
the one for the other implementation as well. Instead use the |
10 |
sitelibdir that encodes the version as well. |
11 |
|
12 |
While at it, extend the test to the Gems-installed extensions, and |
13 |
remove an awk call by using the --format option of scanelf. |
14 |
|
15 |
Revision Changes Path |
16 |
1.23 eclass/ruby-ng.eclass |
17 |
|
18 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.23&view=markup |
19 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?rev=1.23&content-type=text/plain |
20 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.eclass?r1=1.22&r2=1.23 |
21 |
|
22 |
Index: ruby-ng.eclass |
23 |
=================================================================== |
24 |
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v |
25 |
retrieving revision 1.22 |
26 |
retrieving revision 1.23 |
27 |
diff -u -r1.22 -r1.23 |
28 |
--- ruby-ng.eclass 14 Jul 2010 13:11:51 -0000 1.22 |
29 |
+++ ruby-ng.eclass 30 Jul 2010 15:05:08 -0000 1.23 |
30 |
@@ -1,6 +1,6 @@ |
31 |
# Copyright 1999-2009 Gentoo Foundation |
32 |
# Distributed under the terms of the GNU General Public License v2 |
33 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.22 2010/07/14 13:11:51 flameeyes Exp $ |
34 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.23 2010/07/30 15:05:08 flameeyes Exp $ |
35 |
# |
36 |
# @ECLASS: ruby-ng.eclass |
37 |
# @MAINTAINER: |
38 |
@@ -392,7 +392,7 @@ |
39 |
|
40 |
_each_ruby_check_install() { |
41 |
local libruby_basename=$(${RUBY} -rrbconfig -e 'puts Config::CONFIG["LIBRUBY_SO"]') |
42 |
- local libruby_soname=$(scanelf -qS "/usr/$(get_libdir)/${libruby_basename}" | awk '{ print $1 }') |
43 |
+ local libruby_soname=$(scanelf -F "%S#F" -qS "/usr/$(get_libdir)/${libruby_basename}") |
44 |
local sitedir=$(${RUBY} -rrbconfig -e 'puts Config::CONFIG["sitedir"]') |
45 |
local sitelibdir=$(${RUBY} -rrbconfig -e 'puts Config::CONFIG["sitelibdir"]') |
46 |
|
47 |
@@ -409,7 +409,11 @@ |
48 |
# The current implementation lacks libruby (i.e.: jruby) |
49 |
[[ -z ${libruby_soname} ]] && return 0 |
50 |
|
51 |
- scanelf -qnR "${D}${sitedir}" \ |
52 |
+ # Check also the gems directory, since we could be installing compiled |
53 |
+ # extensions via ruby-fakegem; make sure to check only in sitelibdir, since |
54 |
+ # that's what changes between two implementations (otherwise you'd get false |
55 |
+ # positives now that Ruby 1.9.2 installs with the same sitedir as 1.8) |
56 |
+ scanelf -qnR "${D}${sitelibdir}" "${D}${sitelibdir/site_ruby/gems}" \ |
57 |
| fgrep -v "${libruby_soname}" \ |
58 |
> "${T}"/ruby-ng-${_ruby_implementation}-mislink.log |