summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Debian/Debhelper/Dh_Lib.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm
index 5449dca..6ccd096 100644
--- a/Debian/Debhelper/Dh_Lib.pm
+++ b/Debian/Debhelper/Dh_Lib.pm
@@ -255,8 +255,14 @@ sub compat {
elsif (-e 'debian/compat') {
# Try the file..
open (COMPAT_IN, "debian/compat") || error "debian/compat: $!";
- $c=<COMPAT_IN>;
- chomp $c;
+ my $l=<COMPAT_IN>;
+ if (! defined $l || ! length $l) {
+ warning("debian/compat is empty, assuming level $c");
+ }
+ else {
+ chomp $l;
+ $c=$l
+ }
}
if ($c > $max_compat) {