Your message dated Wed, 28 Jun 2017 12:24:46 -0300 with message-id <20170628152446.m5naay3yrg4jf...@debian.org> and subject line Re: Bug#866198: this patch fixed dh-make-ruby has caused the Debian Bug report #866198, regarding gem2deb fails to convert mustermann gem (Invalid gemspec in [mustermann.gemspec.gem2deb]: uninitialized constant Mustermann::VERSION) to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact ow...@bugs.debian.org immediately.) -- 866198: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=866198 Debian Bug Tracking System Contact ow...@bugs.debian.org with problems
--- Begin Message ---package: gem2deb severity: important version: 0.33.1 pravi@nishumbha:~/forge/debian/gitlab$ gem2deb mustermann mustermann doesn't seem to exist. Let's try to download it with 'gem fetch mustermann' gem fetch mustermann Fetching: mustermann-1.0.0.gem (100%) Downloaded mustermann-1.0.0 -- Creating source tarball from mustermann-1.0.0.gem ... tar xfm /home/pravi/forge/debian/gitlab/mustermann-1.0.0.gem "tar xzfm data.tar.gz" tar czf /home/pravi/forge/debian/gitlab/mustermann-1.0.0.tar.gz mustermann-1.0.0 -- Successfully created ./mustermann-1.0.0.tar.gz -- Creating Debian source package from ./mustermann-1.0.0.tar.gz ... ln -s mustermann-1.0.0.tar.gz ruby-mustermann_1.0.0.orig.tar.gz tar xzf ruby-mustermann_1.0.0.orig.tar.gz Invalid gemspec in [mustermann.gemspec]: uninitialized constant Mustermann::VERSION Did you mean? VERSION Invalid gemspec in [mustermann.gemspec.gem2deb]: uninitialized constant Mustermann::VERSION Did you mean? VERSION /usr/lib/ruby/vendor_ruby/gem2deb/metadata.rb:116:in `load_gemspec': E: cannot load gemspec mustermann.gemspec (RuntimeError) from /usr/lib/ruby/vendor_ruby/gem2deb/metadata.rb:33:in `block in initialize' from /usr/lib/ruby/vendor_ruby/gem2deb/metadata.rb:32:in `chdir' from /usr/lib/ruby/vendor_ruby/gem2deb/metadata.rb:32:in `initialize' from /usr/lib/ruby/vendor_ruby/gem2deb/dh_make_ruby.rb:235:in `new' from /usr/lib/ruby/vendor_ruby/gem2deb/dh_make_ruby.rb:235:in `read_metadata' from /usr/lib/ruby/vendor_ruby/gem2deb/dh_make_ruby.rb:86:in `initialize_from_directory' from /usr/lib/ruby/vendor_ruby/gem2deb/dh_make_ruby.rb:205:in `block in build' from /usr/lib/ruby/vendor_ruby/gem2deb/dh_make_ruby.rb:202:in `chdir' from /usr/lib/ruby/vendor_ruby/gem2deb/dh_make_ruby.rb:202:in `build' from /usr/bin/gem2deb:118:in `<main>'signature.asc
Description: OpenPGP digital signature
--- End Message ---
--- Begin Message ---On Wed, Jun 28, 2017 at 05:13:55PM +0530, Pirate Praveen wrote: > On 06/28/2017 04:23 PM, Antonio Terceiro wrote: > > AFAICS these lines have exactly the same effect. > > debian directory was not getting created before this change. > > But the actual fix was that made it build was > > --- a/mustermann.gemspec > +++ b/mustermann.gemspec > @@ -3,7 +3,7 @@ > > Gem::Specification.new do |s| > s.name = "mustermann" > - s.version = Mustermann::VERSION > + s.version = Mustermann.version > s.authors = ["Konstantin Haase", "Zachary Scott"] > s.email = "sinatr...@googlegroups.com" > s.homepage = "https://github.com/sinatra/mustermann" > --- a/lib/mustermann/version.rb > +++ b/lib/mustermann/version.rb > @@ -1,4 +1,7 @@ > # frozen_string_literal: true > module Mustermann > VERSION ||= '1.0.0' > + def self.version > + VERSION > + end > end > > If someone can confirm this fix, I will send this upstream. This is wrong. First, you will need to notice that there is an existing ruby-mustermann19 package. I had this installed here, and it was causing the wrong 'mustermann/version' from being loaded. You will probably need to remove and add appropriate Breaks/Replaces on that package. Second, even after removing ruby-mustermann19, it still didn't work, because of this line: VERSION ||= '1.0.0' Changing it to just VERSION = '1.0.0' makes it work. I understand why this happens: When the code in gem2deb that loads the gemspec runs, there is already a `VERSION` constant in scope (the one from gem2deb itself), so that assignment never happens. When sending that upstream, you can demonstrate the issue like this: ruby-mustermann-1.0.0$ irb >> VERSION = '0.0.0' => "0.0.0" >> $:.unshift 'lib'; nil => nil >> require 'mustermann/version' => true >> Mustermann::VERSION NameError: uninitialized constant Mustermann::VERSION Did you mean? VERSION from (irb):5 from /usr/bin/irb:11:in `<main>' I'm closing this bug since this is not something that can realistically be fixed in gem2deb.signature.asc
Description: PGP signature
--- End Message ---
_______________________________________________ Pkg-ruby-extras-maintainers mailing list Pkg-ruby-extras-maintainers@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-ruby-extras-maintainers