Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 370757 - ruby-fakegem eclass ruby_fakegem_binwrapper missing _<version>_ handling
Summary: ruby-fakegem eclass ruby_fakegem_binwrapper missing _<version>_ handling
Status: IN_PROGRESS
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 375459
  Show dependency tree
 
Reported: 2011-06-09 08:00 UTC by Chris Beswick
Modified: 2011-07-22 09:29 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Beswick 2011-06-09 08:00:42 UTC
The current binwrapper does not handle applications passing a version request to the binwrapper.

This means, for example, that netbeans cannot run the ruby-debug-ide as the filename arg is replaced with the version argument giving an error along the lines of file _0.4.6_ not found.

Something like...

version = ">= 0"

if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then
  version = $1
  ARGV.shift
end

added to the bin wrappers should fix the problem, and shouldn't cause any issues as this is what gem does itself. However a more simplistic...

if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then
  ARGV.shift
end

as the current system cannot handle multiple versions of a gem anyway.
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-07-14 08:57:33 UTC
hm... I'd go with the former just for the sake of it, so that if we'll ever handle multiple versions of a single gem it wouldn't fail badly. Thanks Chris.
Comment 2 Hans de Graaff gentoo-dev Security 2011-07-22 09:24:48 UTC
(In reply to comment #0)

> as the current system cannot handle multiple versions of a gem anyway.

But it can when we slot gems, which we do from time to time. So we *must* choose the first option.
Comment 3 Hans de Graaff gentoo-dev Security 2011-07-22 09:29:09 UTC
Chris, do you have time to work this into a patch that I can just drop into ruby-fakegem.eclass?