summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>2018-04-25 09:45:30 +0000
committerespie <espie@openbsd.org>2018-04-25 09:45:30 +0000
commite1c877053823384fdc737fa6fe18c4761e1ebf1d (patch)
treeb16e7fc31534288b2596326a565d0592ac5ec5df
parentReturn-Path should be in brackets as per RFC5322 (diff)
downloadwireguard-openbsd-e1c877053823384fdc737fa6fe18c4761e1ebf1d.tar.xz
wireguard-openbsd-e1c877053823384fdc737fa6fe18c4761e1ebf1d.zip
we might not get update_info if unsigned!
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Search.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Search.pm b/usr.sbin/pkg_add/OpenBSD/Search.pm
index 71199ce64d1..0f80290f41b 100644
--- a/usr.sbin/pkg_add/OpenBSD/Search.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Search.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Search.pm,v 1.29 2016/06/14 15:41:31 espie Exp $
+# $OpenBSD: Search.pm,v 1.30 2018/04/25 09:45:30 espie Exp $
#
# Copyright (c) 2007 Marc Espie <espie@openbsd.org>
#
@@ -239,8 +239,14 @@ sub {
if ($f->pkgname->flavor_string ne $e->pkgname->flavor_string) {
next;
}
+ # unsigned packages will break here
+ my $u = $e->update_info;
+ if (!defined $u) {
+ $keep = 0;
+ last;
+ }
# okay, now we need to prove there's a common pkgpath
- if (!$e->update_info->match_pkgpath($f->update_info)) {
+ if (!$u->match_pkgpath($f->update_info)) {
next;
}