diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2005-08-17 10:45:14 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2005-08-17 10:45:14 +0000 |
commit | be194ddc10e758146a9df6175500f9af3b76fb95 (patch) | |
tree | 62e7ca94c0763035355152c07150115281bd0e95 /usr.sbin | |
parent | e6f04badda54fbe8c18267602ecbf0526bbd7eb2 (diff) |
if we can't read the packing-list, it's because it's a bad pkgname.
reported by niklas@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pkg_add/pkg_add | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/pkg_add b/usr.sbin/pkg_add/pkg_add index b5b0a0060db..6284f615371 100644 --- a/usr.sbin/pkg_add/pkg_add +++ b/usr.sbin/pkg_add/pkg_add @@ -1,7 +1,7 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: pkg_add,v 1.189 2005/08/17 10:00:18 espie Exp $ +# $OpenBSD: pkg_add,v 1.190 2005/08/17 10:45:13 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -615,6 +615,9 @@ sub find_updates next; } my $plist = OpenBSD::PackingList->from_installation($pkgname, \&OpenBSD::PackingList::ExtraInfoOnly); + if (!defined $plist) { + Fatal("Can't locate $pkgname"); + } for my $candidate (@l) { my $handle = OpenBSD::PackageLocator->find($candidate, $state->{arch}); if (!$handle) { |