summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD/Dependencies.pm
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/Dependencies.pm')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Dependencies.pm18
1 files changed, 15 insertions, 3 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Dependencies.pm b/usr.sbin/pkg_add/OpenBSD/Dependencies.pm
index 699d632097b..b49d301e45c 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.111 2009/12/30 09:36:16 espie Exp $
+# $OpenBSD: Dependencies.pm,v 1.112 2009/12/30 17:37:36 espie Exp $
#
# Copyright (c) 2005-2007 Marc Espie <espie@openbsd.org>
#
@@ -212,6 +212,14 @@ sub do
return $$v;
}
+package _cache::bad;
+our @ISA=(qw(_cache));
+sub do
+{
+ my ($v, $solver, $state, $dep, $package) = @_;
+ return $$v;
+}
+
package _cache::to_install;
our @ISA=(qw(_cache));
sub do
@@ -513,13 +521,17 @@ sub solve_dependency
$v = $self->find_dep_in_repositories($state, $dep);
if ($v) {
+ if (defined $state->{tracker}{cant_install}{$v->name}) {
+ set_global($dep, _cache::bad->new($v->name));
+ return $v->name;
+ }
my $s = OpenBSD::UpdateSet->from_location($v);
$state->tracker->todo($s);
$self->add_dep($s);
- $self->set_cache($dep, _cache::to_install->new($v->{name}));
- return $v->{name};
+ $self->set_cache($dep, _cache::to_install->new($v->name));
+ return $v->name;
}
# resort to default if nothing else