Skip Menu |

This queue is for tickets about the DhMakePerl CPAN distribution.

Report information
The Basics
Id: 71708
Status: resolved
Priority: 0/
Queue: DhMakePerl

People
Owner: Nobody in particular
Requestors: DKOGAN [...] cpan.org
Cc: gregoa [...] cpan.org
NWELLNHOF [...] cpan.org
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.75

Attachments


This patch series is designed to make recursive building/installing work correctly. The command I was trying to make work was dh-make-perl --cpan ffmpeg --build --install --recursive The FFMPEG distribution on CPAN depends on Image::Magick::Iterator and Image::PBMlib which aren't available in the standard debian/unstable APT repo. The desired behavior I was looking for was the above command to pull in all the needed CPAN distributions, package them all, install them as needed so that in the end I'd get libffmpeg-perl installed along with its dependencies. (Note: the ffmpeg distribution on CPAN itself has bugs and doesn't build. A 'successful' run here is for everything to progress and fail when actually building ffmpeg.xs because of a missing header.) This uncovered several bugs in dh-make-perl, most of which are fixed in this patch series. There are two more outstanding issues that are NOT fixed in this series because I'm not sure how to best address them: 1. If a depended-on CPAN package is built first, it must be installed in order for dh-make-perl to proceed. This clearly requires root. I'd like to do everything root-less as much as possible, so maybe dh-make- perl should have a cmdline option to sudo the actual package install (and only the install itself). Thoughts? 2. At one point in make.pm there's an inadvertent chdir. This line: $dist->get || die "Cannot get ", $dist->pretty_id, "\n"; # <- here $ENV {'PWD'} gets set to $HOME/.cpan/build dh-make-perl is aware of this and tries to use global paths from that point on. In its current state this confuses recursive builds since the first distribution will be extracted in the current directory and all subsequent ones in ~/.cpan/build. Then the package ends up in the wrong place and install() can't find it. This can be fixed by making install () more careful about where it looks for the .deb or by simply placing a chdir $orig_pwd; immediately after that line of code to chdir back to where we were. This would simplify lots of other bits of the code too. Is there some underlying reason we don't chdir() back? dima
Subject: dh-make-perl-patches.tar.gz
Download dh-make-perl-patches.tar.gz
application/x-gzip 2.1k

Message body not shown because it is not plain text.

On Sat Oct 15 17:22:21 2011, DKOGAN wrote: Show quoted text
> This patch series is designed to make recursive building/installing > work correctly.
Thanks for your patches, and sorry for the late reply. I've applied them in our git repo now. (BTW: I you want to join dh-make-perl development just shout (and get an Alioth account and we can add you to the pkg-perl group)). Show quoted text
> 1. If a depended-on CPAN package is built first, it must be installed > in order for dh-make-perl to proceed. This clearly requires root. I'd > like to do everything root-less as much as possible, so maybe dh-make- > perl should have a cmdline option to sudo the actual package install > (and only the install itself). Thoughts?
Not sure about this one; I guess the problem is that probably none of us (Debian pkg-perl team) usese --build or --install. But yes, sudo-only-for-install, and only called when --install is given sounds acceptable. Show quoted text
> 2. At one point in make.pm there's an inadvertent chdir. This line: > > $dist->get || die "Cannot get ", $dist->pretty_id, "\n"; # <- here $ENV > {'PWD'} gets set to $HOME/.cpan/build > > dh-make-perl is aware of this and tries to use global paths from that > point on. In its current state this confuses recursive builds since the > first distribution will be extracted in the current directory and all > subsequent ones in ~/.cpan/build. Then the package ends up in the wrong > place and install() can't find it.
Ouch, that probably happened becaause --recursive was implemented (and never really tested) later. Show quoted text
> This can be fixed by making install > () more careful about where it looks for the .deb or by simply placing > a chdir $orig_pwd; immediately after that line of code to chdir back to > where we were. This would simplify lots of other bits of the code too. > Is there some underlying reason we don't chdir() back?
Probably not :) Also committed to git right now. (Hm, --recursive also doesn't seem to play nice with with --vcs git) Thanks again, gregor
Subject: RT#71708 DhMakePerl: patches to make recursive building work
На 08 дек. 2011, чт 02:13:28, GREGOA написа: Show quoted text
> On Sat Oct 15 17:22:21 2011, DKOGAN wrote:
> > This patch series is designed to make recursive building/installing > > work correctly.
> > Thanks for your patches, and sorry for the late reply. > I've applied them in our git repo now.
Thanks, gregor. I am closing this ticket now, since there is a release containing the patches. Show quoted text
> (BTW: I you want to join dh-make-perl development just shout (and get an > Alioth account and we can add you to the pkg-perl group)).
This still holds :) -- dam