openSUSE / gem2rpm

Generate an rpm from a rubygem (git mirror of svn://rubyforge.org/var/svn/gem2rpm)
http://rubyforge.org/projects/gem2rpm/
Other
3 stars 7 forks source link

"!=" ruby requirement on gem gets translated to "<" AND ">" which can never be true? #4

Open jordimassaguerpla opened 9 years ago

jordimassaguerpla commented 9 years ago

rdiscount-2.1.7.1.gem has this requirements (from the metadata in the gem file):

required_ruby_version: !ruby/object:Gem::Requirement requirements:

note the "!=" operator

which gets translated, into the spec file, as:

BuildRequires: %{rubydevel < 1.9.2} BuildRequires: %{rubydevel > 1.9.2}

which, when building, produces the error:

unresolvable: nothing provides ruby2.1-devel < 1.9.2

This looks like an error to me

jordimassaguerpla commented 9 years ago

see

https://github.com/openSUSE/gem2rpm/blob/master/lib/gem2rpm/helpers.rb#L32

jordimassaguerpla commented 9 years ago

which should be the translation of "!=" ? In this case I don't think should be "<" AND ">" ... shoudn't it?

Is there other cases to consider a part from this case where the actual code is right?

I've not found a test case for this so I can't know ....

jordimassaguerpla commented 9 years ago

what about:

Conflicts: ruby = 1.9.2

This is was in the spec file before running g2r .

coolo commented 9 years ago

won't help with buildrequires

darix commented 9 years ago

for Buildrequires we can kinda just ignore it.

jordimassaguerpla commented 9 years ago

Then what should I do? is the requirement operator"!=" correctly translated to "<" AND ">"? Or should I translated that to a "Conflicts" instead of a "Requirement"?

coolo commented 5 years ago

Do we have a current example? Because BuildConflicts exists as well.