diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2004-12-19 20:25:18 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2004-12-19 20:25:18 +0000 |
commit | 048bc7558c51d18f7302533dc33f937ecefd204a (patch) | |
tree | 317eb09f6ff212129b491b401919e0cf264691d0 /usr.sbin/pkg_add | |
parent | e54ad34b4f8a1af86f0a0a35d0c770ec46fcfb82 (diff) |
sanity check: in -n mode, we end up replacing stuff that doesn't exist ?
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Update.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Update.pm b/usr.sbin/pkg_add/OpenBSD/Update.pm index b8ff6ca6956..bd66cb05610 100644 --- a/usr.sbin/pkg_add/OpenBSD/Update.pm +++ b/usr.sbin/pkg_add/OpenBSD/Update.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Update.pm,v 1.43 2004/12/19 20:03:09 espie Exp $ +# $OpenBSD: Update.pm,v 1.44 2004/12/19 20:25:17 espie Exp $ # # Copyright (c) 2004 Marc Espie <espie@openbsd.org> # @@ -239,6 +239,9 @@ sub can_do $state->{okay} = 1; $state->{libs_to_check} = []; my $plist = OpenBSD::PackingList->from_installation($toreplace); + if (!defined $plist) { + Fatal "Couldn't find packing-list for $toreplace\n"; + } $plist->visit('can_update', 0, $state); if ($state->{okay} == 0) { Warn "Old package ", $plist->pkgname(), " contains unsafe operations\n"; |