Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fixed gem ~> version operator translated to rpm require. #193

Merged
merged 1 commit into from

2 participants

@antoncohen

In gem specs ~> is a Pessimistic Version Consrtaint that is inclusive
on the bottom end. E.g., '~> 2.2' means '>= 2.2.0 and < 3.0'.

I changed the translation to RPM spec to be >= and <. It was > and <.

http://docs.rubygems.org/read/chapter/16
http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch-advanced-packaging.html

@antoncohen antoncohen Fixed gem ~> version operator translated to rpm require.
In gem specs ~> is a Pessimistic Version Consrtaint that is inclusive
on the bottom end. E.g., '~> 2.2' means '>= 2.2.0 and < 3.0'.

I changed the translation to RPM spec to be >= and <. It was > and <.

http://docs.rubygems.org/read/chapter/16
http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch-advanced-packaging.html
171ad00
@jordansissel
Owner

LGTM. Thanks for this fix :)

@jordansissel jordansissel merged commit 918e8c9 into jordansissel:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 1, 2012
  1. @antoncohen

    Fixed gem ~> version operator translated to rpm require.

    antoncohen authored
    In gem specs ~> is a Pessimistic Version Consrtaint that is inclusive
    on the bottom end. E.g., '~> 2.2' means '>= 2.2.0 and < 3.0'.
    
    I changed the translation to RPM spec to be >= and <. It was > and <.
    
    http://docs.rubygems.org/read/chapter/16
    http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch-advanced-packaging.html
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/fpm/package/rpm.rb
View
2  lib/fpm/package/rpm.rb
@@ -91,7 +91,7 @@ def converted_from(origin)
name, op, version = dep.split(/\s+/)
if op == "~>"
# ~> x.y means: > x.y and < (x+1).0
- fixed_deps << "#{name} > #{version}"
+ fixed_deps << "#{name} >= #{version}"
fixed_deps << "#{name} < #{version.to_i + 1}.0.0"
else
fixed_deps << dep
Something went wrong with that request. Please try again.