Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 221899

Summary: app-admin/eselect-rails does not work for /usr/bin/rails
Product: Gentoo Linux Reporter: Hans de Graaff <graaff>
Component: New packagesAssignee: Gentoo Ruby Team <ruby>
Status: RESOLVED FIXED    
Severity: minor CC: betelgeuse, gentoobugzilla
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Fixes to ebuilds for eselect
Fix for the eselect update action
Patch to be applied against dev-ruby/rails/ in the Portage tree
FWIW, updated patch for eselect-rails (old one is off by 1 line)

Description Hans de Graaff gentoo-dev Security 2008-05-13 05:12:05 UTC
Even though symlinks are properly set up, the scripts in /usr/bin/rails don't know anything about their own version, so they just start the latest rails version:

/usr/bin/rails-1.2.6 -v
Rails 2.0.2

Originally reported in bug 221309
Comment 1 Mark Somerville 2008-07-02 23:08:28 UTC
Created attachment 159371 [details, diff]
Fixes to ebuilds for eselect

This patch makes the /usr/bin/rails scripts version aware. It also allows the ebuilds to correctly up/downgrade without warnings.
Comment 2 Mark Somerville 2008-07-02 23:11:13 UTC
Created attachment 159373 [details, diff]
Fix for the eselect update action

This patch is needed by the previous patch (https://bugs.gentoo.org/attachment.cgi?id=159371) because it defines the ebuild update action correctly, without specifying a target.
Comment 3 Mark Somerville 2008-07-02 23:14:39 UTC
In case it isn't clear from those attachments, the attached patches solve the problem for me as well as fixing correct downgrading and removal of the package.

The downgrading/removal problem is intertwined in the reported one, so I didn't report a seperate bug.
Comment 4 Hans de Graaff gentoo-dev Security 2008-08-05 05:54:33 UTC
I just had a look at these changes. Do you think it would be possible to move the pkg_postrm() code mostly into the eclass so that we can just have a 'eselect rails update' there? Or is that not possible? I'd rather have this code in the eclass for easier maintenance.

Other than that the approach looks fine, so my plan is to include this in CVS and than work towards stabilization of rails 2.1.0.
Comment 5 Hans de Graaff gentoo-dev Security 2008-12-01 20:17:47 UTC
*** Bug 249518 has been marked as a duplicate of this bug. ***
Comment 6 Alex Legler (RETIRED) archtester gentoo-dev Security 2008-12-01 20:58:42 UTC
Created attachment 173998 [details, diff]
Patch to be applied against dev-ruby/rails/ in the Portage tree
Comment 7 Alex Legler (RETIRED) archtester gentoo-dev Security 2008-12-01 21:00:34 UTC
Created attachment 173999 [details, diff]
FWIW, updated patch for eselect-rails (old one is off by 1 line)
Comment 8 Hans de Graaff gentoo-dev Security 2008-12-03 06:43:03 UTC
This has now been fixed in CVS, with eselect-rails-0.14 and the -r1 versions of rails 1.2.6, 2.0.5, 2.1.2, and 2.2.2.