* Adam Spiers <[email protected]> [Apr 30. 2014 18:18]:
> Vagrant 1.5.4 depends on Ruby >= 2.0.0:
> 
>   https://github.com/mitchellh/vagrant/pull/3581
> 
> What's the correct way to ensure that rubygem-vagrant builds against
> ruby20 on openSUSE 12.3 and 13.1?

Why would you want it to build against ruby == 2.0 if the requirement
is for >= 2.0.0 ?

> 
> On 12.3, by default (i.e. without any explicit dependencies on a Ruby
> version) it builds against 1.9 and then fails as soon as it encounters
> use of ** keyword parameters.
> 
> If I use the dependencies suggested by gem2rpm via the .spec template:
> 
>   BuildRequires:  ruby-macros >= 3
>   Requires:       ruby >= 2.0.0
>   BuildRequires:  ruby >= 2.0.0
> 
> (I guess the >= 2.0.0 might have come from my patch in the above pull request)
> 
> then I get:
> 
>   $ osc build openSUSE_13.1
>   Building rubygem-vagrant.spec for openSUSE_13.1/x86_64
>   Getting buildinfo from server and store to 
> /home/adam/SUSE/OBS/home/aspiers/branches/devel/languages/ruby/extensions/rubygem-vagrant/.osc/_buildinfo-openSUSE_13.1-x86_64.xml
>   Getting buildconfig from server and store to 
> /home/adam/SUSE/OBS/home/aspiers/branches/devel/languages/ruby/extensions/rubygem-vagrant/.osc/_buildconfig-openSUSE_13.1-x86_64
>   buildinfo is broken... it says:
>   unresolvable: nothing provides ruby >= 2.0.0

That's how RPM version comparison works. 2.0.0 is greater than 2.0 iirc.

Looking at openSUSE:13.1, I see

ruby (providing ruby = 2.0-5.1.2, requiring ruby20 >= 2.0.0.p247)
ruby19 (not providing ruby, but ruby(abi) = 1.9.1)
ruby20 (not providing ruby, but ruby(abi) = 2.0.0)

Try to change your package's requirements to 

  Requires:       ruby(abi) >= 2.0.0
  BuildRequires:  ruby(abi) >= 2.0.0

> 
> and the same for 12.3.
> 
> Weirdly, if I drop the patch-level from the dependencies, i.e.
> 
>   Requires:       ruby >= 2.0
>   BuildRequires:  ruby >= 2.0
> 
> then it builds fine.  I'm guessing that this is because Ruby on
> vanilla 13.1 was packaged with version 2.0 rather than version 2.0.0.
> What was the reason for that decision?
> 
> If instead I try building against d:l:r ...
> 
>   $ osc build devel_languages_ruby_openSUSE_12.3
> 
> or
> 
>   $ osc build devel_languages_ruby_openSUSE_13.1
> 
> then it builds against 2.1.0 and fails to install:

To be expected if you don't add devel_languages_ruby_openSUSE_13.1
_and_
http://download.opensuse.org/repositories/devel:/languages:/ruby:/extensions/devel_languages_ruby_openSUSE_13.1/x86_64/
to zypper. But doing so will install ruby 2.1 on your openSUSE 13.1
system.


Klaus
-- 
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 
16746 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany
-- 
To unsubscribe, e-mail: [email protected]
To contact the owner, e-mail: [email protected]

Reply via email to