[PATCH] Fix debdiff exit code (regression)

Nikolaus Schulz schulz at macnetix.de
Thu Aug 23 20:07:21 UTC 2012


Commit 9cbe605 "debdiff: fix CVE-2012-2012 [...]" broke the exit code of
debdiff, at it made wdiff_control_files return 1 if wdiff found no
differences in the control files, which in turn made debdiff exit with an
exit code of 1.
---
 scripts/debdiff.pl |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/scripts/debdiff.pl b/scripts/debdiff.pl
index 7857836..20a0ced 100755
--- a/scripts/debdiff.pl
+++ b/scripts/debdiff.pl
@@ -1034,6 +1034,7 @@ sub wdiff_control_files($$$$$)
 		my $msg = ucfirst($cf) . " files$usepkgname: wdiff output";
 		print "\n", $msg, "\n", '-' x length $msg, "\n";
 		print $wdiff;
+		$status = 1;
 	    } else {
 		my @output;
 		@output = split /\n/, $wdiff;
@@ -1041,8 +1042,8 @@ sub wdiff_control_files($$$$$)
 		my $msg = ucfirst($cf) . " files$usepkgname: lines which differ (wdiff format)";
 		print "\n", $msg, "\n", '-' x length $msg, "\n";
 		print join("\n", at output), "\n";
+		$status = 1;
 	    }
-	    $status = 1;
 	}
     }
 
-- 
1.7.2.5




More information about the devscripts-devel mailing list