[Rubygems-developers] Problems with setup.rb in the rubygems package

Matt Patterson matt-lists at reprocessed.org
Tue Oct 23 10:41:19 EDT 2007


I'm working on building a rubygems .deb package which isn't as  
invasively patched as the standard Debian/Ubuntu one for automated  
deployment stuff I'm working on.

My issue is that to avoid some of the hacking of post_install.rb that  
needed to be done to get the sources gem built I want to pass another  
option in to setup.rb and pull that value out later.

The setup.rb docs say to use metaconfig and a call to add_path_config  
within that. This I've done:

add_path_config 'gem_install_root', '', 'Path to root of build  

However, when setup.rb gets run by the packaging makefile I get this  

/usr/bin/ruby1.8 setup.rb config --siterubyver=/usr/lib/ruby/1.8
setup.rb:100:in `push': can't modify frozen array (TypeError)
         from setup.rb:100:in `add'
         from setup.rb:508:in `add_path_config'
         from /home/matt/sandbox/packages/libgems-ruby-0.9.4/ 
metaconfig:1:in `load_script'
         from setup.rb:831:in `run_metaconfigs'
         from setup.rb:807:in `invoke'
         from setup.rb:773:in `invoke'
         from setup.rb:1578

I know it's not a rubygems problem per se, but I was hoping someone  
would have some insight here, since it's rubygem's setup.rb...

I'm utterly baffled how metaconfig could EVER work, since the call to  
freeze the array in question happens before metaconfig is even read  

My working hypothesis is that I'm being stupid...



   Matt Patterson | Design & Code
   <matt at reprocessed.org> | http://www.reprocessed.org/

More information about the Rubygems-developers mailing list