summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD/SharedItems.pm
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2007-06-20 13:44:41 +0000
committerMarc Espie <espie@cvs.openbsd.org>2007-06-20 13:44:41 +0000
commit9d2c36d6f220ce9faf8df6efe2377724f9b02197 (patch)
treec47d4ac5f24e1e30149345d82aa8afe2963a585a /usr.sbin/pkg_add/OpenBSD/SharedItems.pm
parent2c65e007f49588715f8ed6d9791487a8e8975a73 (diff)
sprinkle code to deal gracefully with absent packing-lists.
makes it easier for people to recover after a disk crash that leaves /var/db/pkg half-empty.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/SharedItems.pm')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/SharedItems.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/SharedItems.pm b/usr.sbin/pkg_add/OpenBSD/SharedItems.pm
index 960defa5c6e..fcc01e43fc5 100644
--- a/usr.sbin/pkg_add/OpenBSD/SharedItems.pm
+++ b/usr.sbin/pkg_add/OpenBSD/SharedItems.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: SharedItems.pm,v 1.12 2007/06/16 09:29:37 espie Exp $
+# $OpenBSD: SharedItems.pm,v 1.13 2007/06/20 13:44:40 espie Exp $
#
# Copyright (c) 2004-2006 Marc Espie <espie@openbsd.org>
#
@@ -36,6 +36,7 @@ sub find_items_in_installed_packages
$progress->show($done, $total);
my $plist = OpenBSD::PackingList->from_installation($e,
\&OpenBSD::PackingList::SharedItemsOnly) or next;
+ next if !defined $plist;
$plist->record_shared($db, $e);
$done++;
}