Re: Creating Debian dependencies while using CPAN?
Christian Hammers <ch@westend.com> writes:
> Would there be a way if we modify the CPAN command line tool in such
> a way that it generates a control file automagically when getting
> a new module or taking a control file from a set of Debian created
> files (with manually edited dependencies) and decides upon this if it
> will install this module or not - CPAN modules are pretty unified
> named and versioned so that would not be a problem.
>
> I.e. if I say "install Net::NiceProtocol" our modified CPAN creates an
> entry in the available/status file saying
> Package: libnet-niceprotocol-perl
> Dependencies: perl-5.005, ${dh_perldep_output}
> Description: CPAN installed module Net::NiceProtocol
> then it would scan this blib directory and from this create a
> /var/lib/dpkg/info/libnet-niceprotocol-perl.files, an assumation
> on dependencies based on "use" and "require" lines and maybe some
> postinst/preinst scripts and run them.
"use" and "require" are often used for modules bundled with core
perl. So you would get a lot of requirements for perl modules that
will be be debian package.
Why not use the PREREQ_PM hash that is (or supposed to be) maintained
in the Makefile.PL by perl module authors to tell CPAN what are the
modules dependancies?
See this example from Log::Dispatch::Tk, this module requires Tk,
Log::Dispatch v1.11 and Log::Dispatch::Output v1.011 :
use ExtUtils::MakeMaker;
WriteMakefile
(
'NAME' => 'Log-Dispatch-Tk',
'VERSION' => '1.3',
'dist' => {COMPRESS=>'gzip -9f', SUFFIX => 'gz'},
'PREREQ_PM' =>
{
'Tk' => 0,
'Log::Dispatch' => '1.11',
'Log::Dispatch::Output' => '1.011'
},
($] >= 5.005 ?
(ABSTRACT => 'Tk i/f class and Text widget for Log::Dispatch messages',
AUTHOR => 'Dominique Dumont (domi@barrayar.grenoble.hp.com)') : ())
);
HTH
--
Dominique_Dumont@grenoble.hp.com
Reply to: