[Rubygems-developers] "misnamed gem" error when building platform-specific gem repository on i386-linux platform

Alexey Verkhovsky alexey.verkhovsky at gmail.com
Wed Feb 6 18:47:22 EST 2008


Hello all,

I'm upgrading RubyGems to 1.0.1 in RubyWorks repository (which, among
other things, includes gems with precompiled extensions), and having
the following problem:

1. In the process of installing the gem with extensions, we set
spec.platform to Config::CONFIG['arch'], which is 'i386-linux'

2. Gem::Builder#build creates the new gem file, which uses
@spec.file_name as a name. As it happens, @spec.file_name replaces the
platform from i386-linux to x86-linux, so
    I end up with a file name like 'mongrel-1.1.3-x86-linux.gem'

3. In a later step, the build is indexing gem repository using 'gem
generate_index' command. At this time, Gem::Indexer#build_index
performs this check:
    gemfile =~ /\/#{Regexp.escape spec.original_name}.*\.gem\z/i

Note that it uses spec.original_name, not spec.full_name. Of course,
none of the *-x86-linux.gem files satisfy this check. Oops.

So, is it a simple bug in the indexer.rb (which should use
spec.full_name, not spec.original_name), or am I doing something
wrong?

-- 
Alexey Verkhovsky
CruiseControl.rb [http://cruisecontrolrb.thoughtworks.com]
RubyWorks [http://rubyworks.thoughtworks.com]


More information about the Rubygems-developers mailing list