Skip to content

Commit

Permalink
Merge pull request #2066 from kduret/fix-rpm-perl-dependency-name
Browse files Browse the repository at this point in the history
fix(rpm): replace perl dependency by perl-interpreter
  • Loading branch information
jordansissel authored Dec 9, 2024
2 parents 98cc060 + e790380 commit 858d1c1
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion lib/fpm/package/rpm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,19 @@ def changelog

# See FPM::Package#converted_from
def converted_from(origin)
if origin == FPM::Package::Gem
if origin == FPM::Package::CPAN
fixed_deps = []
self.dependencies.collect do |dep|
# RPM package "perl" is a metapackage which install all the Perl bits and core modules, then gcc...
# this must be replaced by perl-interpreter
if name=/^perl([\s<>=].*)$/.match(dep)
fixed_deps.push("perl-interpreter#{name[1]}")
else
fixed_deps.push(dep)
end
end
self.dependencies = fixed_deps
elsif origin == FPM::Package::Gem
fixed_deps = []
self.dependencies.collect do |dep|
# Gem dependency operator "~>" is not compatible with rpm. Translate any found.
Expand Down

0 comments on commit 858d1c1

Please sign in to comment.