Subject: [PATCH 16/25] Bail out if any file referenced in a .changes does not exist.

From: Adam D. Barratt <[email-masked]>
Date: Wed, 6 Jan 2010 21:55:01 +0000

---
 lib/Lintian/Schedule.pm |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/lib/Lintian/Schedule.pm b/lib/Lintian/Schedule.pm
index 5934d6b..2ebdece 100644
--- a/lib/Lintian/Schedule.pm
+++ b/lib/Lintian/Schedule.pm
@@ -130,6 +130,12 @@ sub add_changes {
 	next if $_ eq '';
 
 	my ($md5sum,$size,$section,$priority,$file) = split(/\s+/o, $_);
+
+	if (not -f "$arg_dir/$file") {
+	    warning("$file does not exist, exiting");
+	    exit 2;
+	}
+
 	if ($file =~ /\.deb$/) {
 	    $status += $self->add_deb('b', "$arg_dir/$file");
 	} elsif ($file =~ /\.udeb$/) {
-- 
1.6.6