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 |
Message body not shown because it is not plain text.