Re: dh-make-perl and building prerequisites
On Nov 17, 2009, at 2:34, Nick Woolley wrote:
> Another newcomer here.
> I've been using dh-make-perl (v0.50) and have an experimental wrapper script 
> which generates a Perl module install sequence using CPANPLUS.
I don't think another degree of indirection in this case is useful, could you integrate the script as a module instead of a wrapper? Wrappers tend to just force someone to go and read code somewhere else. Of course others may disagree with me.
> Given a Perl
> module name the script will find the list of uninstalled prerequisites, and go
> and build them into Debian packages using dh-make-perl. (So far, it does not
> find non-Perl dependencies, nor does it know what packages are available via apt.)
Re-inventing APT and its dependency handling seems both hard and unnecessary.
> I'm still in the process of discovering what prior art exists - I know it's
> quite possible someone else has a better solution than mine. However, a brief
> look at the latest source for dh-make-perl in SVN trunk suggests that it doesn't
> have the capability I've been working on - correct?
> On the other hand, a taking look through the bugs list for dh-make-perl, I
> notice #342751, "[PATCH] make required debs from module dependency":
> This looks like it did exactly what I have in mind, but time has passed and it
> would seem to require a fair amount of adapting to work with dh-make-perl as it
> is now. (It also seems to build a package before its prerequisites, so even
> after my initial attempt to fix it, it failed on the first build.)
> The discussion thread there suggests that there were finally no objections to
> incorporate it, just no-one found the time. Is that also correct?
> Another thing I notice, bug #481466 suggests that use of CPANPLUS may be an
> issue (but so far as I can see, not why).
I believe the objection was that CPANPLUS did not build de-installable debian packages. That was at least one of the problems mentioned to me by someone who was testing it so I have to add a caveat. CPANPLUS appears oriented towards the end user, or administrator, allowing one to create debian packages on the fly as it were. While this might be useful, it short circuits the current debian QA process which includes some pretty experienced debian developers actually looking at the package. This QA process is one of the reasons why the debian-perl team is so productive, and has a very low RC bug count.
> So I'd like to ask:
> - Is my script worth pursuing, so far as debian-perl is concerned?
I think so.
> - Or is there another preferred approach to building dependencies?
You may want to look at aptitude's sophisticated dependency handling.
> - If so, is anybody working on this?
Yeah, there are also a couple of other projects out there doing something similar, and this kind of project seems to pop up now and then.
> - Is use of CPANPLUS a barrier to incorporation into dh-make-perl?
I don't think there is any barrier in terms of code, rather implementation. Building perl modules in an automated fashion runs the risk that you are introducing subtle policy bugs and packages that are not going through the entire debian QA process will skew away from debian policy, which changes fairly rapidly for such a big project. It may be hard for a user to differentiate between locally built debs and debs actually coming from debian's repos. And if the process of automatically building debs becomes widespread, a lot of repos will open up providing a potentially buggy debianized DarkPAN. This may be cause for concern.
The regular nature of the CPAN, its simplicity, along with the regular nature of debian and debian's use of perl as OS glue makes CPAN to debian automation seem like a possible goal. Hic sunt dracones.
> (wu-lee-guest on Alioth)
> 1. My work-in-progress is on github:
> To try it:
> $ git clone git://github.com/wu-lee/CPAN-InstallSequence.git
> $ cd CPAN-InstallSequence
> # This just checks you have all the dependencies installed:
> $ perl Build.PL
> # Build a module+prereqs from CPAN like this:
> $ perl -Ilib script/dh-make-perl-deps Chart::Clicker
> Results in ~/dh-make-perl-deps/build by default.
> To UNSUBSCRIBE, email to debian-perl-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact firstname.lastname@example.org