Subject: [PATCH 06/25] Fix .changes scheduling logic so that subfiles actually get scheduled

From: Adam D. Barratt <[email-masked]>
Date: Wed, 6 Jan 2010 09:43:14 +0000

Each of the add_*() functions return 1 on success, so the net effect of
using ||= to accumulate the exit status of each subfile's scheduling was
that as soon as one file was successfully scheduled all remaining files
were skipped.
---
 lib/Lintian/Schedule.pm |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/Lintian/Schedule.pm b/lib/Lintian/Schedule.pm
index a61d1a6..7ffdd4f 100644
--- a/lib/Lintian/Schedule.pm
+++ b/lib/Lintian/Schedule.pm
@@ -131,15 +131,15 @@ sub add_changes {
 
 	my ($md5sum,$size,$section,$priority,$file) = split(/\s+/o, $_);
 	if ($file =~ /\.deb$/) {
-	    $status ||= $self->add_deb('b', "$arg_dir/$file");
+	    $status += $self->add_deb('b', "$arg_dir/$file");
 	} elsif ($file =~ /\.udeb$/) {
-	    $status ||= $self->add_deb('u', "$arg_dir/$file");
+	    $status += $self->add_deb('u', "$arg_dir/$file");
 	} elsif ($file =~ /\.dsc$/) {
-	    $status ||= $self->add_dsc("$arg_dir/$file");
+	    $status += $self->add_dsc("$arg_dir/$file");
 	}
     }                                    
 
-    return $status;
+    return ($status ? 0 : 1);
 }
 
 # for each package (the sort is to make sure that source packages are
-- 
1.6.6