summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2011-05-13 17:49:31 +0000
committerHans de Graaff <graaff@gentoo.org>2011-05-13 17:49:31 +0000
commit8a4095ae80246351da8dd9b94467f340bdd779fd (patch)
tree8c1753d1fbe04381975f29880e4383641c29beae /dev-ruby/rubygems/files
parentFix patching when USE=-dsn (diff)
downloadgentoo-2-8a4095ae80246351da8dd9b94467f340bdd779fd.tar.gz
gentoo-2-8a4095ae80246351da8dd9b94467f340bdd779fd.tar.bz2
gentoo-2-8a4095ae80246351da8dd9b94467f340bdd779fd.zip
Update gentoo-defaults to install in /usr/local as root and in /home/graaff otherwise. Thanks to James Le Cuirot for the patch in bug 366153.
(Portage version: 2.1.9.42/cvs/Linux x86_64)
Diffstat (limited to 'dev-ruby/rubygems/files')
-rw-r--r--dev-ruby/rubygems/files/gentoo-defaults.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/dev-ruby/rubygems/files/gentoo-defaults.rb b/dev-ruby/rubygems/files/gentoo-defaults.rb
index 2f0bbae734f6..3702333b76cc 100644
--- a/dev-ruby/rubygems/files/gentoo-defaults.rb
+++ b/dev-ruby/rubygems/files/gentoo-defaults.rb
@@ -5,14 +5,18 @@ module Gem
ConfigMap[:sitelibdir].gsub('site_ruby', 'gems')
end
+ def local_dir
+ portage_gems_dir.gsub('@GENTOO_PORTAGE_EPREFIX@/usr', '@GENTOO_PORTAGE_EPREFIX@/usr/local')
+ end
+
undef :default_dir
def default_dir
- portage_gems_dir.gsub('@GENTOO_PORTAGE_EPREFIX@/usr', '@GENTOO_PORTAGE_EPREFIX@/usr/local')
+ Process.euid == 0 ? local_dir : user_dir
end
undef :default_path
def default_path
- [user_dir, default_dir, portage_gems_dir]
+ [user_dir, local_dir, portage_gems_dir]
end
undef :default_bindir