From 44415f04fb76340726329de96b7319371a1ff441 Mon Sep 17 00:00:00 2001 From: espie Date: Sun, 8 Apr 2007 12:36:04 +0000 Subject: [PATCH] abort early if packing-list was not read correctly. --- infrastructure/package/check-newlib-depends | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/infrastructure/package/check-newlib-depends b/infrastructure/package/check-newlib-depends index 810157322a2..a3a5b241e3b 100755 --- a/infrastructure/package/check-newlib-depends +++ b/infrastructure/package/check-newlib-depends @@ -1,6 +1,6 @@ #!/usr/bin/perl -# $OpenBSD: check-newlib-depends,v 1.24 2007/04/03 10:13:27 espie Exp $ +# $OpenBSD: check-newlib-depends,v 1.25 2007/04/08 12:36:04 espie Exp $ # Copyright (c) 2004 Marc Espie # # Permission to use, copy, modify, and distribute this software for any @@ -370,9 +370,14 @@ sub do_pkg sub do_plist { my $plist = OpenBSD::PackingList->read(\*STDIN); - my $pkgname = $plist->pkgname(); - print "\n$pkgname:\n"; - analyze($plist, $db, $opt_B, FakeHandle->new()); + if (!defined $plist->{name}) { + print STDERR "Error reading plist\n"; + $errors++; + } else { + my $pkgname = $plist->pkgname(); + print "\n$pkgname:\n"; + analyze($plist, $db, $opt_B, FakeHandle->new()); + } } if (@ARGV == 0 && defined $opt_B) {