From 8cb23fb5b612cda7a9ef7b2e1cf79319f7c3f285 Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Sat, 10 Apr 2010 11:04:22 +0000 Subject: finding dep in old names like this actually means we are replacing with stuff that won't match, so mark it for later. --- usr.sbin/pkg_add/OpenBSD/Dependencies.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'usr.sbin/pkg_add/OpenBSD') diff --git a/usr.sbin/pkg_add/OpenBSD/Dependencies.pm b/usr.sbin/pkg_add/OpenBSD/Dependencies.pm index 2f383b042ed..533656a349b 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.124 2010/04/10 10:48:57 espie Exp $ +# $OpenBSD: Dependencies.pm,v 1.125 2010/04/10 11:04:21 espie Exp $ # # Copyright (c) 2005-2010 Marc Espie # @@ -340,7 +340,7 @@ sub find_candidate sub new { my ($class, $set) = @_; - bless { set => $set }, $class; + bless { set => $set, bad => [] }, $class; } sub check_for_loops @@ -533,6 +533,7 @@ sub solve_dependency } $v = find_candidate($dep->spec, $self->{set}->older_names); if ($v) { + push(@{$self->{bad}}, $dep); return $v; } $v = $self->find_dep_in_stuff_to_install($state, $dep); @@ -601,7 +602,7 @@ sub solve_depends sub check_depends { my $self = shift; - my @bad = (); + my @bad = (@{$self->{bad}}); for my $dep ($self->dependencies) { push(@bad, $dep) -- cgit v1.2.3