summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoey <joey>1999-08-17 05:16:53 +0000
committerjoey <joey>1999-08-17 05:16:53 +0000
commitb56939b95e6f1efab433eba09ce5cb6020df1436 (patch)
treef6ea88b5196d1aa8f640a6a25ccf683bfff8881c
parent638b3dcc6f795a817a0fca1104af86ed8152bc38 (diff)
downloaddebhelper-b56939b95e6f1efab433eba09ce5cb6020df1436.tar.gz
r229: Initial Import
-rw-r--r--debian/changelog8
-rwxr-xr-xdh_clean2
-rwxr-xr-xdh_perl12
3 files changed, 20 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index 0ae47f80..20e02dc9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+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
diff --git a/dh_clean b/dh_clean
index 9ffb7437..a328d12e 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 d66dfce5..0614b9b8 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") {