Bugs item #28726, was opened at 2010-11-16 12:43
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=28726&group_id=126

Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Jeremy Evans (jeremyevans)
Assigned to: Ryan Davis (zenspider)
Summary: gem install --user-install as root adds cached .gem file outside of 
HOME

Initial Comment:
I think the problem is at 
https://github.com/rubygems/rubygems/blob/master/lib/rubygems/remote_fetcher.rb#L80

Basically, in RemoteFetcher#download, it's checking whether the install_dir 
(Gem.dir by default) is writable, and if so, it uses that dir.  However, if the 
user is using the --user-install option, even if the user is root, it should 
not be writing outside of HOME/.gem.  Basically, if the --user-install option 
is given, it should always download to HOME/.gem.  This may require an API 
change.

This affects building OpenBSD ports for some gems, since the --user-install 
option is used (in combination with a fake HOME).  Usually, building is done as 
a regular user and is fine.  However, if the builder is root, rubygems adds the 
.gem files to the /usr/local/lib/ruby directory when the gem is installed to 
HOME/.gem.  Then when the package builder goes to install the package, the 
cached .gem file already exists and the package install fails.

This isn't a critical bug, as it can be trivially worked around by specifying 
GEM_HOME=$HOME/.gem in the environment when using gem install --user-install 
(which the OpenBSD ports system now does).

----------------------------------------------------------------------

Comment By: Ryan Davis (zenspider)
Date: 2011-06-07 16:50

Message:
Hi!

Believe it or not, we're moving to github's issue tracker! The 
pressure to move has been loud and clear, but for the longest time 
it didn't support the way we worked. Now that it has freeform 
labels it can support our workflow adequately. There is just one 
problem: Your bug is here and we don't want to lose you!

What we'd like you to do is fairly painless and should only take a 
few minutes:

Please file the _exact_ same ticket on github and provide a link 
back to this crufty old ticket so we can refer to any previous 
discussion that occurred. Once the new ticket is made, put a 
forwarding link to it here and close this ticket out. In a couple 
weeks, we'll track down the old tickets that are still open and 
decide what to do with them.

We could have done this fairly automatically, but we really want 
you to do it so you're attached to the ticket and we can still 
communicate with you and keep a record of it.

https://github.com/rubygems/rubygems/issues

Thanks,

The RubyGems Team

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=28726&group_id=126
_______________________________________________
Rubygems-developers mailing list
http://rubyforge.org/projects/rubygems
Rubygems-developers@rubyforge.org
http://rubyforge.org/mailman/listinfo/rubygems-developers

Reply via email to