]> git.donarmstrong.com Git - debhelper.git/commitdiff
r229: Initial Import
authorjoey <joey>
Tue, 17 Aug 1999 05:16:53 +0000 (05:16 +0000)
committerjoey <joey>
Tue, 17 Aug 1999 05:16:53 +0000 (05:16 +0000)
debian/changelog
dh_clean
dh_perl

index 0ae47f801fad84faaf27a8f2c73eea3f5778c4f7..20e02dc99709392652107d621ac4a7188952c629 100644 (file)
@@ -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
index 9ffb7437c0a864bc9c8232a270a513987cb35149..a328d12e7be86bb3b3798fc5bb3a1fd01f01d510 100755 (executable)
--- 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 d66dfce5d6cef6f2cf9fcf57837bf38b3db054b0..0614b9b8553a803f4f616ffa30247e6646143e0b 100755 (executable)
--- 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") {