Skip to content

Commit

Permalink
Merge pull request #404 from r4um/fix_396
Browse files Browse the repository at this point in the history
Closes #396 Convert all != dependencies to Conflicts
  • Loading branch information
jordansissel committed Apr 9, 2013
2 parents 00e53d6 + 545a8d0 commit 8e938d7
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 8e938d7

Please sign in to comment.