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

Re: Need advice for ruby-markaby



On 26/08/11 at 13:24 +0200, Cédric Boutillier wrote:
> Hi!
> 
> I am trying to update markaby, and convert it to the new policy. I need
> some advice for a dilemma I cannot solve.
> 
> The library markaby.rb tries to load dynamically from a file VERSION its
> version number. The relative path between the library and this file
> ("../") is hardcoded in the file. With the default rules, this file is
> not present in the binary package, which causes an error when loading
> the library.
> 
> I can see two options:
> 1/ hardcode the version number in markaby.rb. Certainly the easier
> solution, but it needs manual intervention at each new upstream release.
> 
> 2/ install in the binary package the VERSION file. A logical place would
> be /usr/lib/ruby/vendor_ruby/markaby, and the relative path would become
> "markaby/" instead of "../". I could patch markaby.rb to fix that, but during
> the tests, when rspec is loaded, the library used is the one in the lib/
> directory, and not the one in the (future) binary package in
> debian/ruby-markaby/usr/lib/ruby/vendor_ruby/, and thus the VERSION is
> not found...
> 
> I would like to know if you already encounter things like that in other
> packages, and if you could advise me for the best solution to this
> problem.

Hi,

I would go for 2/, with the necessary patching. But the solution of
putting the verison number in a VERSION file is not very nice. Maybe you
could talk to upstream about using alternative solutions, such as
declaring the version in Ruby code, as a constant?

Lucas


Reply to: