diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2012-04-28 11:55:54 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2012-04-28 11:55:54 +0000 |
commit | 7a07ed50371f2da8c77aee54fc925341d133a411 (patch) | |
tree | 6c165ca142f29534df24d4e6cbd51f2ef146f617 /usr.sbin/pkg_add/OpenBSD | |
parent | da1bdba8cf00d7dc7f8e4864453ab1aaaa7e5c60 (diff) |
work-around the fact that BaseSystem updates have specific dependency
handling
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/ForwardDependencies.pm | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/ForwardDependencies.pm b/usr.sbin/pkg_add/OpenBSD/ForwardDependencies.pm index e05eee3a3e1..bb5db9adee1 100644 --- a/usr.sbin/pkg_add/OpenBSD/ForwardDependencies.pm +++ b/usr.sbin/pkg_add/OpenBSD/ForwardDependencies.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: ForwardDependencies.pm,v 1.11 2010/12/24 09:04:14 espie Exp $ +# $OpenBSD: ForwardDependencies.pm,v 1.12 2012/04/28 11:55:53 espie Exp $ # # Copyright (c) 2009 Marc Espie <espie@openbsd.org> # @@ -51,14 +51,21 @@ sub adjust $state->errsay("XXX #1", $check); $deps_f->delete($check); } else { - my $r = $h->{update_found}->pkgname; + my $r = $h->{update_found}; + my $p = $r->pkgname; $state->say("Adjusting #1 to #2 in #3", - $check, $r, $f) + $check, $p, $f) if $state->verbose >= 3; - if ($check ne $r) { - $deps_f->delete($check)->add($r); + if ($check ne $p) { + if ($r->is_real) { + $deps_f->delete($check)->add($p); + } else { + $deps_f->delete($check); + } + } + if ($r->is_real) { + OpenBSD::RequiredBy->new($p)->add($f); } - OpenBSD::RequiredBy->new($r)->add($f); } } } |