Package: devscripts
Version: 2.10.69+squeeze2
Severity: normal
Tags: patch

As of devscripts 2.10.69+squeeze2 in squeeze and (judging from the
changelog) 2.11.4 in sid, debdiff returns an exit code 1 when it finds
no differences between binary packages.

Note that this is a regression in squeeze, and breaks scripts relying on
the debdiff exit code.

Trivial patch is attached.

Nikolaus


PS. I'm forwarding this from the mailing list to the BTS so that it
    doesn't get ignored.

-- System Information:
Debian Release: 6.0.5
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)
>From 2a1bff244d89c6ff15cbe7553564eb45f90997ac Mon Sep 17 00:00:00 2001
From: Nikolaus Schulz <[email protected]>
Date: Thu, 23 Aug 2012 21:46:14 +0200
Subject: [PATCH] Fix debdiff exit code (regression)

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",@output), "\n";
+		$status = 1;
 	    }
-	    $status = 1;
 	}
     }
 
-- 
1.7.2.5

_______________________________________________
devscripts-devel mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel

Reply via email to