diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2007-05-29 23:12:27 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2007-05-29 23:12:27 +0000 |
commit | 3657b9f8de0def746e0c4241bee2fe4cc6f1e885 (patch) | |
tree | e0c7868cbb139bf1500d0858f7da553883c91992 /usr.sbin/pkg_add/OpenBSD | |
parent | 021ec44711c28964427ce40d104d204a5219286c (diff) |
In update mode, restore previous behavior: some updated packages may have
names that match installed packages, but still mark them to be installed,
so that they're returned as dependencies, and get updated first.
Write in TODO that the current situation is brittle, solved dependencies
should get adjusted in real time to be 100% sure this won't cause problems...
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Dependencies.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Dependencies.pm b/usr.sbin/pkg_add/OpenBSD/Dependencies.pm index caf426398fb..23868951f9c 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.40 2007/05/27 11:36:21 espie Exp $ +# $OpenBSD: Dependencies.pm,v 1.41 2007/05/29 23:12:26 espie Exp $ # # Copyright (c) 2005-2007 Marc Espie <espie@openbsd.org> # @@ -121,6 +121,11 @@ sub solve_dependency if ($state->{allow_replacing}) { $v = $self->find_dep_in_stuff_to_install($state, $dep); + if ($v) { + push(@{$self->{deplist}}, $v); + $self->{to_register}->{$v} = $dep; + return; + } } if (!$v) { |