diff options
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Dependencies.pm | 51 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Replace.pm | 12 |
2 files changed, 2 insertions, 61 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Dependencies.pm b/usr.sbin/pkg_add/OpenBSD/Dependencies.pm index 9c68db79542..0f742afceee 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.102 2009/12/28 10:42:02 espie Exp $ +# $OpenBSD: Dependencies.pm,v 1.103 2009/12/28 21:30:09 espie Exp $ # # Copyright (c) 2005-2007 Marc Espie <espie@openbsd.org> # @@ -435,55 +435,6 @@ sub register_dependencies delete $self->{deplist}; } -sub record_old_dependencies -{ - my ($self, $state) = @_; - for my $o ($self->{set}->older_to_do) { - require OpenBSD::RequiredBy; - my @wantlist = OpenBSD::RequiredBy->new($o->pkgname)->list; - $o->{wantlist} = \@wantlist; - } -} - -sub adjust_old_dependency_on -{ - my ($self, $pkgname, $state) = @_; - - my $set = $self->{set}; - - for my $o ($set->older) { - next unless defined $o->{wantlist}; - require OpenBSD::Replace; - require OpenBSD::RequiredBy; - - my $oldname = $o->pkgname; - - $state->say("Adjusting dependencies for ", - "$oldname->$pkgname") if $state->verbose >= 3; - my $d = OpenBSD::RequiredBy->new($pkgname); - for my $dep (@{$o->{wantlist}}) { - if (defined $set->{older}->{$dep}) { - $state->say("\tskipping $dep") - if $state->verbose >= 4; - next; - } - $state->say("\t$dep") if $state->verbose >= 4; - $d->add($dep); - OpenBSD::Replace::adjust_dependency($dep, - $oldname, $pkgname) if $oldname ne $pkgname; - } - } -} - -sub adjust_old_dependencies -{ - my ($self, $state) = @_; - - for my $pkg ($self->{set}->newer) { - $self->adjust_old_dependency_on($pkg->pkgname, $state); - } -} - sub repair_dependencies { my ($self, $state) = @_; diff --git a/usr.sbin/pkg_add/OpenBSD/Replace.pm b/usr.sbin/pkg_add/OpenBSD/Replace.pm index 36bd8b3733c..21a99a621fa 100644 --- a/usr.sbin/pkg_add/OpenBSD/Replace.pm +++ b/usr.sbin/pkg_add/OpenBSD/Replace.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Replace.pm,v 1.65 2009/12/28 12:51:26 espie Exp $ +# $OpenBSD: Replace.pm,v 1.66 2009/12/28 21:30:09 espie Exp $ # # Copyright (c) 2004-2006 Marc Espie <espie@openbsd.org> # @@ -456,14 +456,4 @@ sub save_old_libraries } } - -sub adjust_dependency -{ - my ($dep, $from, $into) = @_; - - my $l = OpenBSD::Requiring->new($dep); - $l->delete($from); - $l->add($into); -} - 1; |