summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2010-06-05 18:08:32 +0000
committerMarc Espie <espie@cvs.openbsd.org>2010-06-05 18:08:32 +0000
commit72e79c92f925d1d66b249a1c97ee1e0bf38c1f30 (patch)
tree67932ac3544c45a92ef6dc288e0efa3017c3bfc9 /usr.sbin/pkg_add
parent63986103a68caf5cb83e39a817800ed03e4eb9c9 (diff)
empty plist is bad too.
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PkgCheck.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgCheck.pm b/usr.sbin/pkg_add/OpenBSD/PkgCheck.pm
index 854aa447a32..67b237c0c54 100644
--- a/usr.sbin/pkg_add/OpenBSD/PkgCheck.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PkgCheck.pm
@@ -1,7 +1,7 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: PkgCheck.pm,v 1.1 2010/06/05 17:15:32 espie Exp $
+# $OpenBSD: PkgCheck.pm,v 1.2 2010/06/05 18:08:31 espie Exp $
#
# Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org>
#
@@ -304,7 +304,7 @@ sub sanity_check
eval {
$plist = OpenBSD::PackingList->fromfile($contents);
};
- if ($@) {
+ if ($@ || !defined $plist) {
$state->errsay("$name: bad plist");
$self->may_remove($state, $name);
next;