summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2010-04-10 11:04:22 +0000
committerMarc Espie <espie@cvs.openbsd.org>2010-04-10 11:04:22 +0000
commit8cb23fb5b612cda7a9ef7b2e1cf79319f7c3f285 (patch)
treecf58299bbacd7290a921aa076e5221e804816978 /usr.sbin/pkg_add/OpenBSD
parent613ed1ff2449365fee079b179453da497be238c3 (diff)
finding dep in old names like this actually means we are replacing with
stuff that won't match, so mark it for later.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Dependencies.pm7
1 files changed, 4 insertions, 3 deletions
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 <espie@openbsd.org>
#
@@ -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)