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

Re: Creating Debian dependencies while using CPAN?



On Sat, Jul 29, 2000 at 11:08:58AM +0200, Christian Hammers wrote:
> > > [automatically creating package files from CPAN modules on the fly]
> > > On Mon, Jul 24, 2000 at 10:40:04AM +0200, Dominique Dumont wrote:
> > > > > 	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.
>  
> > Pleaase, take note that all this could only be used for local packages...
> > All Debian package in main should have all their dependencies resolved, so
> > that CD only installation are possibles. I didn't see any need for making
> No problem just mirror a selected part of CPAN and add something like a 
> "cpan" line next to the "deb" and "deb-src" to /etc/apt/sources.conf.

which part then? And what this will add to debian? Most users will find it
quite complicated, IMHO, if we made cdrom with both a CPAN archive and a Debian
archive on them... Keep in mind that Debian main MUST be self-contained and
don't need any extra dependencies. So, as I said, it should only be for local use
and couldn't replace a debian package if another packages depend on it.

> > However, a recent thread in debian-perl (hey, it was only two weeks ago!)
> > talks about this issue and we get two differents solutions: a CPAN::Debian
> > that let dpkg know about the cpan modules, their files locations and what
> > they provides; and a deb-make target for perl modules that let a maintainer
> > create a standard skeleton for all modules, with a special cpan-update target
> > in the debian/rules file.
> The first would have the advantage that we don't have to repackage those
> thousands of CPAN modules - we could, maybe apart from perl-base, use
> modules shipped with debian as like modules the use wants to install for
> his own.

Both let you do that! The main difference between both is that the first one
will have to used a tricky trick to install the package in dpkg database. Remember
that the format of dpkg files can be changed anytime and that dpkg those not
provides any mechanism to register some files into the db other than by installing
a deb package. So, you'll have to create the debs anyway. Therefore, the first
solution consist in creating at least a binary debs using the blib directory and
other informations find in CPAN modules.

The second solutions is maybe more long but cleanest IMHO, since it create
true debian packages (source included), can support debian override (by downloading
any diff.gz if some exists first), and make it easy to create new debian perl
package or update old ones when needed by debian maintainer. My plan is too have
a sort-of script that automated all the trouble:

	if [ debian package exist ] ; then
		apt-get source deb-package-name
		cd deb-package-name-version
		debian/rules cpan-update
		dpkg-buildpackage ${OPTIONS}
	else
		perl -MCPAN::Debian -e 'download $package'
		deb-make $package
		cd deb-package-name-version
		dpkg-buildpackage ${OPTIONS}
	fi

or something along the same lines. So, giving a good script for handling all this,
aren't both solutions good? BTW, I really think that both can be useful and can exist.

That doesn't mean that every cpan modules should be debianized! In fact, both solutions
is a try to avoid to populate debian with everything from cpan but I'm really not
convince that we should make debian packages depends on package that aren't even in the
debian archives. Some users aren't well connected and the quality of cpan modules aren't
check the way debian packages are.

BTW, I would really like to have a cpan method in apt but I'm still somewhat doubtful
on how this could be done or even if it's doable. Package lists, dependencies, and
automatic installation/configuration are my three main concerned regarding this,
especially that CPAN doesn't provides any binary packages. However, using either of
the previous methods, we can start a buildd that collected their resulting packages
into a cpan.debian.org archives for people who want the latest and greatest of
CPAN (just like the ppm archives for Windows users). Using the second method let
you have both the deb and the deb-src archives so from time to time, we can push
some of those packages into the debian main archives when needed by other packages.

> (But I will take a look at this discussion if it's not the one I participated
> in)
> 
> bye,
> 
>  -christian-
> 
> -- 
>        Real programmers confuse Christmas and Halloween,
> 		  because Dec 25 = Oct 31 !!!
> ---------------------------------------------------------------------------
> Linux - the choice of the GNU generation.           Join the Debian Project 
>                                                       http://www.debian.org 
> Christian Hammers * Oberer Heidweg 35 * D-52477 Alsdorf * Tel.: 02404-25624
> 0AA3 E879 1D82 F59E 77A4 0096 911F 4AE6 86A1 18E6 1024D/86A118E6 1999-09-17

-- 
-------------------------------*  *-------------------------
Fabien Niñoles                /  /          fabien@tzone.org
Chevalier Servant de Sa Dame /  /   C15D FE9E BB35 F596 127F
Veneur Gris par la Clef     /  /    BF7D 8F1F DFC9 BCE0 9436
Chaton pour Debian         /  / http://www.tzone.org/~fabien
--------------------------*  *------------------------------



Reply to: