Open finncolman opened 6 years ago
This patch preserves the existing behaviour except for debian:
--- cpan.rb 2018-01-24 10:58:24.575510870 +1300
+++ cpan_new.rb 2018-01-19 08:09:23.000000000 +1300
@@ -385,16 +385,27 @@
end # def metadata
def cap_name(name)
- return "perl(" + name.gsub("-", "::") + ")"
+ case attributes[:output_type]
+ when "deb"; deb_name(name)
+ else; return "perl(" + name.gsub("-", "::") + ")"
+ end
end # def cap_name
def fix_name(name)
case name
when "perl"; return "perl"
- else; return [attributes[:cpan_package_name_prefix], name].join("-").gsub("::", "-")
+ else
+ case attributes[:output_type]
+ when "deb"; deb_name(name)
+ else; return [attributes[:cpan_package_name_prefix], name].join("-").gsub("::", "-")
+ end
end
end # def fix_name
+ def deb_name(name)
+ return "lib" + name.gsub("::", "-").downcase + "-perl"
+ end # def deb_name
+
def httpfetch(url)
uri = URI.parse(url)
if ENV['http_proxy']
On a Debian based distribution, the inclusion of this feature within v1.91. and newer of fpm: https://github.com/jordansissel/fpm/pull/1340 has resulted in a provides like of the form: perl(Capture::Tiny) when building CPAN based packages. This results in a error when you try to apt-get install the Debian package as this is not a valid Provides line for a Debian package. Also setting the provides attribute simply appends another setting, so there is no way to override this either.
I've found that if I patch the cpan.rb like this:
then the produced package doesn't introduce the problematic Provides line