Skip to content

Commit

Permalink
jordansissel#396 Convert all != dependencies to Conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
pranay.kanwar committed Apr 8, 2013
1 parent 30a58db commit a7b7459
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions lib/fpm/package/rpm.rb
Expand Up @@ -161,16 +161,14 @@ def converted_from(origin)
end

# Convert != dependency as Conflict =, as rpm doesn't understand !=
if origin == FPM::Package::Python
self.dependencies = self.dependencies.select do |dep|
name, op, version = dep.split(/\s+/)
dep_ok = true
if op == '!='
self.conflicts << "#{name} = #{version}"
dep_ok = false
end
dep_ok
self.dependencies = self.dependencies.select do |dep|
name, op, version = dep.split(/\s+/)
dep_ok = true
if op == '!='
self.conflicts << "#{name} = #{version}"
dep_ok = false
end
dep_ok
end

# Convert any dashes in version strings to underscores.
Expand Down

0 comments on commit a7b7459

Please sign in to comment.