From: joey Date: Tue, 17 Aug 1999 05:16:53 +0000 (+0000) Subject: r229: Initial Import X-Git-Tag: debian_version_0_1~16 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b56939b95e6f1efab433eba09ce5cb6020df1436;p=debhelper.git r229: Initial Import --- diff --git a/debian/changelog b/debian/changelog index 0ae47f8..20e02dc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +debhelper (2.0.04) unstable; urgency=low + + * Patch from Raphael Hertzog 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 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 diff --git a/dh_clean b/dh_clean index 9ffb743..a328d12 100755 --- a/dh_clean +++ b/dh_clean @@ -42,3 +42,5 @@ if (! $dh{D_FLAG}) { -o -name TAGS -o -name core -o ( -path */.deps/* -a -name *.P ) ) -exec rm -f {} ;")); } + +doit('rm', '-rf', 'debian/tmp') if -x 'debian/tmp'; diff --git a/dh_perl b/dh_perl index d66dfce..0614b9b 100755 --- a/dh_perl +++ b/dh_perl @@ -8,6 +8,7 @@ use Dh_Lib; 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. @@ -16,6 +17,10 @@ if (defined $ENV{PERL}) { $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); @@ -33,7 +38,7 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) { $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; @@ -44,7 +49,7 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) { } if ($found and not $dep_arch) { - $dep = "perl5"; + $dep = "perl5$ext"; } elsif ($dep_arch) { $dep = $dep_arch; } @@ -90,6 +95,9 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) { 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") {