r27598 - in /trunk/dh-make-perl: debian/changelog dh-make-perl

ryan52-guest at users.alioth.debian.org ryan52-guest at users.alioth.debian.org
Mon Dec 1 20:37:16 UTC 2008


Author: ryan52-guest
Date: Mon Dec  1 20:37:13 2008
New Revision: 27598

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=27598
Log:
make --notest work with dh7

Modified:
    trunk/dh-make-perl/debian/changelog
    trunk/dh-make-perl/dh-make-perl

Modified: trunk/dh-make-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/debian/changelog?rev=27598&op=diff
==============================================================================
--- trunk/dh-make-perl/debian/changelog (original)
+++ trunk/dh-make-perl/debian/changelog Mon Dec  1 20:37:13 2008
@@ -38,8 +38,9 @@
   [ Ryan Niebur ]
   * process META.yml file when refreshing
   * create debian/compat file while refreshing
-
- -- Ryan Niebur <ryanryan52 at gmail.com>  Mon, 01 Dec 2008 12:05:11 -0800
+  * make --notest work with dh7 (Closes: #506708)
+
+ -- Ryan Niebur <ryanryan52 at gmail.com>  Mon, 01 Dec 2008 12:32:53 -0800
 
 dh-make-perl (0.50) unstable; urgency=low
 

Modified: trunk/dh-make-perl/dh-make-perl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/dh-make-perl?rev=27598&op=diff
==============================================================================
--- trunk/dh-make-perl/dh-make-perl (original)
+++ trunk/dh-make-perl/dh-make-perl Mon Dec  1 20:37:13 2008
@@ -1492,6 +1492,12 @@
         @content );
     ( $rules_file, $changelog_file, $docs, $examples ) = @_;
 
+    $fh      = _file_rw($rules_file);
+    @content = $fh->getlines;
+
+    $fh->seek( 0, 0 ) || die "Can't rewind $rules_file: $!";
+    $fh->truncate(0) || die "Can't truncate $rules_file: $!";
+
     if ( $opt_dh < 7 ) {
         $test_line
             = ( $module_build eq 'Module-Build' )
@@ -1499,11 +1505,6 @@
             : '$(MAKE) test';
         $test_line = "#$test_line" if $opt_notest;
 
-        $fh      = _file_rw($rules_file);
-        @content = $fh->getlines;
-
-        $fh->seek( 0, 0 ) || die "Can't rewind $rules_file: $!";
-        $fh->truncate(0) || die "Can't truncate $rules_file: $!";
         for (@content) {
             s/#CHANGES#/$changelog_file/g;
             s/#EXAMPLES#/join " ", @examples/eg;
@@ -1513,9 +1514,14 @@
             s/#TEST#/$test_line/g;
             $fh->print($_);
         }
-        $fh->close;
     }
     else {
+        for (@content) {
+            if ($opt_notest) {
+                s/dh build/dh build --before dh_auto_test\n\tdh build --after dh_auto_test/;
+            }
+            $fh->print($_)
+        }
         if (@examples) {
             open F, '>>', "$maindir/debian/$pkgname.examples" or die $!;
             print F "$_\n" foreach @examples;
@@ -1527,6 +1533,7 @@
             close F;
         }
     }
+    $fh->close;
 }
 
 sub create_control {




More information about the Pkg-perl-cvs-commits mailing list