You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by as...@apache.org on 2008/10/17 17:53:23 UTC

svn commit: r705651 - /incubator/buildr/trunk/rakelib/setup.rake

Author: assaf
Date: Fri Oct 17 08:53:22 2008
New Revision: 705651

URL: http://svn.apache.org/viewvc?rev=705651&view=rev
Log:
Under RubyGems 1.3.0, the list of local repositories include ~/.gem.  Since this directory is writeable, set_get_home picks it up, and so rake setup/install use it instead of sudo and the default repository.  Removing set_get_home makes rake setup/install use the generic repository and sudo, allowing it to create files in /usr/bin.

Modified:
    incubator/buildr/trunk/rakelib/setup.rake

Modified: incubator/buildr/trunk/rakelib/setup.rake
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/rakelib/setup.rake?rev=705651&r1=705650&r2=705651&view=diff
==============================================================================
--- incubator/buildr/trunk/rakelib/setup.rake (original)
+++ incubator/buildr/trunk/rakelib/setup.rake Fri Oct 17 08:53:22 2008
@@ -31,10 +31,6 @@
   fail "Please set JAVA_HOME first #{'(no need to run as sudo)' if ENV['USER'] == 'root'}" unless ENV['JAVA_HOME']
 end
 
-def set_gem_home
-  ENV['GEM_HOME'] ||= Gem.path.find { |f| File.writable?(f) }
-end
-
 def sudo_needed?
   !( windows? || ENV['GEM_HOME'] )
 end
@@ -78,7 +74,6 @@
 missing = spec.dependencies.select { |dep| Gem::SourceIndex.from_installed_gems.search(dep).empty? }
 task 'setup' do
   set_java_home
-  set_gem_home
   missing.each do |dep|
     install_gem dep.name, dep.version_requirements
   end