Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 221899 - app-admin/eselect-rails does not work for /usr/bin/rails
Summary: app-admin/eselect-rails does not work for /usr/bin/rails
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: Normal minor (vote)
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
: 249518 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-05-13 05:12 UTC by Hans de Graaff
Modified: 2008-12-08 21:30 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fixes to ebuilds for eselect (eselect-rails-fixes-to-ebuilds.patch,3.54 KB, patch)
2008-07-02 23:08 UTC, Mark Somerville
Details | Diff
Fix for the eselect update action (eselect-rails-fixes-to-eselect-file.patch,1.23 KB, patch)
2008-07-02 23:11 UTC, Mark Somerville
Details | Diff
Patch to be applied against dev-ruby/rails/ in the Portage tree (dev-ruby-rails.patch,3.47 KB, patch)
2008-12-01 20:58 UTC, Alex Legler (RETIRED)
Details | Diff
FWIW, updated patch for eselect-rails (old one is off by 1 line) (eselect-rails.patch,1.21 KB, patch)
2008-12-01 21:00 UTC, Alex Legler (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.