]> git.donarmstrong.com Git - debhelper.git/commitdiff
log file loading bug fixes
authorJoey Hess <joey@kodama.kitenet.net>
Thu, 24 Apr 2008 01:54:13 +0000 (21:54 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Thu, 24 Apr 2008 01:54:13 +0000 (21:54 -0400)
debian/changelog
dh

index 1a7257e420a59573292f43936235a473691c836c..00bdeedfb0195bf5e44a50c723705ea56a318f10 100644 (file)
@@ -1,9 +1,9 @@
 debhelper (7.0.0) UNRELEASED; urgency=low
 
-  * dh_clean: Don't delete core dumps. (Too DWIM, and "core" is not
-    necessarily a core dump.) Closes: #477391
-  * Record debhelper commands that successfully finish in a per-package log
-    file.
+  * dh: New program that runs a series of debhelper commands in a sequence.
+    This can be used to construct very short rules files (as short as 3
+    lines), while still exposing the full power of debhelper when it's
+    needed.
   * dh_auto_configure: New program, automates running ./configure,
     Makefile.PL, and python distutils. Calls them with exactly the same
     options as cdbs does by default, and allows adding/overriding options.
@@ -19,19 +19,17 @@ debhelper (7.0.0) UNRELEASED; urgency=low
     MakeMaker Makefiles. (Support for cmake and other build systems planned
     but not yet implemented.)
   * New v7 mode, which only has two changes from v6, and is the new
-    recommended default.
+    recommended default, especially when using dh.
   * dh_install: In v7 mode, if --sourcedir is not specified, first look for
     files in debian/tmp, and then will look in the current directory. This
     allows dh_install to interoperate with dh_auto_install without needing any
     special parameters.
   * dh_clean: In v7 mode, read debian/clean and delete all files listed
     therein.
-  * dh: New program that runs a series of debhelper commands in a sequence.
-    This can be used to construct very short rules files (as short as 3
-    lines), while still exposing the full power of debhelper when it's
-    needed.
   * Add a Makefile and simplify this package's own rules file using
     all the new toys.
+  * dh_clean: Don't delete core dumps. (Too DWIM, and "core" is not
+    necessarily a core dump.) Closes: #477391
 
  -- Joey Hess <joeyh@debian.org>  Tue, 22 Apr 2008 17:54:20 -0400
 
diff --git a/dh b/dh
index 793146e676423e3709b29f3f6c4ef283694f19e1..ab814d7f2b98885678059e9628776ae077e3ca00 100755 (executable)
--- a/dh
+++ b/dh
@@ -286,6 +286,7 @@ while (@ARGV_orig) {
 my %logged;
 my %startpoint;
 foreach my $package (@{$dh{DOPACKAGES}}) {
+       my @log=loadlog($package);
        if ($dh{AFTER}) {
                # Run commands in the sequence that come after the
                # specified command.
@@ -300,7 +301,6 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                # Find the last logged command that is in the sequence, and
                # continue with the next command after it. If no logged
                # command is in the sequence, we're starting at the beginning..                         
-               my @log=loadlog($package);
                $startpoint{$package}=0;
 COMMAND:       foreach my $command (reverse @log) {
                        foreach my $i (0..$#sequence) {
@@ -381,7 +381,7 @@ sub loadlog {
        my $ext=pkgext($package);
        
        my @log;
-       open(LOG, "<", "debian/${ext}debhelper.log");
+       open(LOG, "<", "debian/${ext}debhelper.log") || return;
        while (<LOG>) {
                chomp;
                push @log, $_;