+debhelper (2.0.04) unstable; urgency=low
+
+ * Patch from Raphael Hertzog <rhertzog@hrnet.fr> to make dh_perl support a
+ -d flag that makes it add a dependancy on the sppropriate perl-XXX-base
+ package. Few packages will really need this. (Closes: #40631)
+
+ -- Joey Hess <joeyh@master.debian.org> Fri, 2 Jul 1999 11:22:00 -0700
+
debhelper (2.0.03) unstable; urgency=low
* Depend on file >= 2.23-1, because dh_perl uses file -b, introduced at
-o -name TAGS -o -name core -o ( -path */.deps/* -a -name *.P )
) -exec rm -f {} ;"));
}
+
+doit('rm', '-rf', 'debian/tmp') if -x 'debian/tmp';
init();
my $perl = $ENV{PERL} || '/usr/bin/perl';
+my $ext = '';
# Figure out the version of perl. If $ENV{PERL} is set, query the perl binary
# it points to, otherwise query perl directly.
$version=`$ENV{PERL} -e 'printf "%.3f", \$]'`;
}
+# If -d is given, then we'll try to depend on one of the perl-5.00X-base
+# package instead of perl-5.00X
+$ext='-base' if ($dh{'D_FLAG'});
+
foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
$TMP=tmpdir($PACKAGE);
$EXT=pkgext($PACKAGE);
$v = $1;
$arch = $2;
check_module_version ($v, $version);
- $v .= '-thread' if ($arch =~ /-thread/);
+ $v .= '-thread' if ($arch =~ /-thread/);
$dep_arch = add_deps ($dep_arch, "perl-$v");
} elsif ($file =~ m<^$TMP/usr/lib/perl5/(\d.\d{3})/>) {
$v = $1;
}
if ($found and not $dep_arch) {
- $dep = "perl5";
+ $dep = "perl5$ext";
} elsif ($dep_arch) {
$dep = $dep_arch;
}
sub add_deps {
my ($dep, $new) = @_;
+ # If the $new-base package can exist then add $ext to $new
+ $new = "$new$ext" if ($new =~ m/^(?:perl5|perl-\d\.\d{3})$/);
+
# If $new = perl5 or perl5-thread check if perl-X.XXX(-thread)?
# is not already in the dependencies
if ($new eq "perl5") {