pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/43865: recent ruby upgrade broke some things (ruby-postgresql specifically)



The following reply was made to PR pkg/43865; it has been noted by GNATS.

From: Takahiro Kambe <taca%back-street.net@localhost>
To: gnats-bugs%NetBSD.org@localhost, explorer%flame.org@localhost
Cc: taca%NetBSD.org@localhost
Subject: Re: pkg/43865: recent ruby upgrade broke some things
 (ruby-postgresql specifically)
Date: Mon, 13 Sep 2010 16:49:20 +0900 (JST)

 In message <20100913051005.65DEC63BCBE%www.NetBSD.org@localhost>
        on Mon, 13 Sep 2010 05:10:05 +0000 (UTC),
        Michael Graff <explorer%flame.org@localhost> wrote:
 >  plaid# ruby18 -v
 >  ruby 1.8.7 (2010-08-16 patchlevel 302) [x86_64-netbsd]
 >  
 >  > % gem18 spec /usr/pkgsrc/distfiles/postgres-0.7.9.2008.01.28.gem > 
 > /dev/null
 >  
 >  plaid# gem18 spec /local/pkgsrc-distfiles/postgres-0.7.9.2008.01.28.gem
 >  > /dev/null
 >  plaid#
 >  
 >  (that is, no problems with that command)
 I misunderstood that the stage of error in package build and
 
 >  > Would you please change /usr/pkg/lib/ruby/vendor_ruby/1.8/rubygems.rb
 >  > as below,
 >  > 
 >  >   NameError: uninitialized constant YAML
 In this case, it shouldn't display error message but display *nothing*.
 But real expected output is the latter:
 
 >  >   Module
 
 >  I didn't see either of these when re-running the gem18 command.
 So, something is wrong.
 
 >  Going into irb and doing a simple "require 'rubygems'" shows that the
 >  class Gem::Specification exists, but Gem::Specification::YAML does not.
 >   I admit a lack of understanding of how rubygems works internally.
 Your reported error,
 
        ERROR:  While executing gem ... (NameError)
            uninitialized constant Gem::Specification::YAML
        *** Error code 1
 
 "uninitialized constant Gem::Specification::YAML" is the result of
 yaml.rb wan't read, top level module YAML is undefined.  So, ruby
 tried to find "YAML" as a constant in calling module,
 Gem::Specification.
 
 Anyway, 
 
 > --- lib/rubygems.rb.orig     2009-07-21 23:46:08.000000000 +0000
 > +++ lib/rubygems.rb
 > @@ -1123,6 +1128,8 @@ end
 >  
 >  require 'rubygems/config_file'
 >  
 > +STDERR.puts YAML.class
 > +
 >  if RUBY_VERSION < '1.9' then
 >    require 'rubygems/custom_require'
 >  end
 
 1. There is a line "require 'yaml'" in rubygems/config_file,
    $PREFIX/lib/ruby/vendor_ruby/1.8/rubygems/config_file.rb.
 2. yaml.rb ($PREFIX/lib/ruby/1.8/yaml.rb) defines YAML module.
 3. STDERR.puts YAML.class should print "Module" to standard error.
 
 Something is wrong and it seems "require 'rubygems/config_file'"
 isn't executed.
 
 But it is very strange that "gem18 unpack" or "gem18 spec" had no
 problem but "gem18 build" has a problem.
 
 
 I've just created clean environment with pkg_comp(8),
 
 # ruby18 -v
 ruby 1.8.7 (2010-08-16 patchlevel 302) [x86_64-netbsd]
 # uname -rsm
 NetBSD 5.1_RC3 amd64
 # ls /var/db/pkg
 bison-2.4.3               libtool-base-2.2.6bnb4    ruby18-base-1.8.7.302
 checkperms-1.11           m4-1.4.15                 ruby18-rubygems-1.3.5nb3
 digest-20080510           pkgdb.byfile.db           zsh-4.3.10nb2
 f2c-20090411nb5           postgresql84-client-8.4.4
 gmake-3.82nb1             readline-6.1
 # cd /usr/pkgsrc/databases/ruby-postgresql
 # make
 ...
 ===> Extracting for ruby18-postgresql-0.7.9.2008.01.28nb1
 Unpacked gem: 
'/pkg_comp/obj/pkgsrc/databases/ruby-postgresql/default/postgres-0.7.9.2008.01.28'
 ===> Patching for ruby18-postgresql-0.7.9.2008.01.28nb1
 => Applying pkgsrc patches for ruby18-postgresql-0.7.9.2008.01.28nb1
 ===> Creating toolchain wrappers for ruby18-postgresql-0.7.9.2008.01.28nb1
 ===> Configuring for ruby18-postgresql-0.7.9.2008.01.28nb1
 chmod -R g-w 
/pkg_comp/obj/pkgsrc/databases/ruby-postgresql/default/postgres-0.7.9.2008.01.28
 => Checking for portability problems in extracted files
 ===> Building for ruby18-postgresql-0.7.9.2008.01.28nb1
 => Removing backup files of patch before build 
 WARNING:  no description specified
   Successfully built RubyGem
   Name: postgres
   Version: 0.7.9.2008.01.28
   File: postgres-0.7.9.2008.01.28.gem
 => Unwrapping files-to-be-installed.
 
 
 So, I couldn't reproduce your problem...
 
 BTW, what will display below command?
 
 % ruby18 -e 'p $:'
 
 In my environment by pkg_comp(8),
 
 ["/usr/pkg/lib/ruby/site_ruby/1.8", 
"/usr/pkg/lib/ruby/site_ruby/1.8/x86_64-netbsd", "/usr/pkg/lib/ruby/site_ruby", 
"/usr/pkg/lib/ruby/vendor_ruby/1.8", 
"/usr/pkg/lib/ruby/vendor_ruby/1.8/x86_64-netbsd", 
"/usr/pkg/lib/ruby/vendor_ruby", "/usr/pkg/lib/ruby/1.8", 
"/usr/pkg/lib/ruby/1.8/x86_64-netbsd", "."]
 
 
 -- 
 Takahiro Kambe <taca%back-street.net@localhost>
 


Home | Main Index | Thread Index | Old Index