summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD/Dependencies.pm
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2010-03-06 13:38:43 +0000
committerMarc Espie <espie@cvs.openbsd.org>2010-03-06 13:38:43 +0000
commitff1e21695c53b2e7f1bbcd1f36682d52d9a223a7 (patch)
tree6b2d94ac357ec4d8410ed456af9f354a9d565ef3 /usr.sbin/pkg_add/OpenBSD/Dependencies.pm
parent8a5ed02f370ebc65685dba1ac74ff938fe57a9d1 (diff)
match_locations doesn't work on invalid specs, so don't go there
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/Dependencies.pm')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Dependencies.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Dependencies.pm b/usr.sbin/pkg_add/OpenBSD/Dependencies.pm
index f4068c26e5f..9b8578409fc 100644
--- a/usr.sbin/pkg_add/OpenBSD/Dependencies.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Dependencies.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Dependencies.pm,v 1.122 2010/01/24 15:13:15 espie Exp $
+# $OpenBSD: Dependencies.pm,v 1.123 2010/03/06 13:38:42 espie Exp $
#
# Copyright (c) 2005-2010 Marc Espie <espie@openbsd.org>
#
@@ -401,6 +401,8 @@ sub find_dep_in_repositories
{
my ($self, $state, $dep) = @_;
+ return unless $dep->spec->is_valid;
+
my $candidates = $self->{set}->match_locations($dep->spec);
if (!$state->{defines}->{allversions}) {
require OpenBSD::Search;