summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2009-12-31 14:43:55 +0000
committerMarc Espie <espie@cvs.openbsd.org>2009-12-31 14:43:55 +0000
commit884d280e65e63883dcfd9ffd64d03a65372d0296 (patch)
tree0b42584580bc1beb871379fee0669471fde0dfe2 /usr.sbin/pkg_add/OpenBSD
parent8c2ceeb7f0e1eb3618d29a8a8e498bfa8c0a83e9 (diff)
need to tweak from to_update to self, as this kind of thing happens all
the time.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Dependencies.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Dependencies.pm b/usr.sbin/pkg_add/OpenBSD/Dependencies.pm
index d215aa42570..8dc91a4f179 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.114 2009/12/31 11:52:25 espie Exp $
+# $OpenBSD: Dependencies.pm,v 1.115 2009/12/31 14:43:54 espie Exp $
#
# Copyright (c) 2005-2007 Marc Espie <espie@openbsd.org>
#
@@ -253,6 +253,13 @@ our @ISA=(qw(_cache));
sub do
{
my ($v, $solver, $state, $dep, $package) = @_;
+ my $alt = $solver->find_dep_in_self($state, $dep);
+ if ($alt) {
+ $solver->set_cache($dep, _cache::self->new($alt));
+ push(@{$package->{before}}, $alt);
+ return $alt;
+ }
+
if ($state->tracker->{to_update}{$$v}) {
$solver->add_dep($state->tracker->{to_update}{$$v});
return $$v;