[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: CPAN modules used by non-CPAN packages



-=| Sven Dowideit, Sat, Feb 28, 2009 at 06:21:25PM +1100 |=-
> I too wonder if there is a 'proper' way to go from perl module name to deb

In general it is Foo::Bar --> libfoo-bar-perl. Not all modules use 
that convention though, and obviously there are packages containing 
more than one module.

To remedy this, you need to get dh-make-perl 0.52 and apt-file, run 
'apt-file update', then use 'dh-make-perl --locate Foo::Bar'. Program 
interface is available via Debian::AptContents. The  information is 
cached so lookups are pretty fast.

> > I'd like to provide some improvement to this by collecting
> > the dependency information from Debian.
> > I'd like to gather the list of packages that use CPAN modules.
> >
> > How can I do that?

The fact that certain package comes from CPAN is not recorded 
explicitly. There are traces, but that would not give you 100% 
covrage:

 * binary packages's control file has Homepage: field that looks like 
   http://search.cpan.org/dist/Foo-Bar/
 * source package's watch file contains similar pattern

> > e.g. Bugzilla is packaged by Debian
> > How can I list all the modules it uses ?

You can see what Debian packages it depends on, bot going from that to 
CPAN distribution is fuzzy.

> > In the opposite direction given a CPAN module
> > how can I find all the Debian packages
> > depending on that package?

You first find if the CPAN module is packaged (see above), then look 
the reverse-dependencies (apt-cache rdepends), but that again gives 
you a list of Debian packages, which you can't easily correlate to 
CPAN modules.

Perhaps debtags can be used to add information like that? Any 
experienced with it?

-- 
dam            JabberID: dam@jabber.minus273.org

Attachment: signature.asc
Description: Digital signature


Reply to: