diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2009-12-11 21:04:02 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2009-12-11 21:04:02 +0000 |
commit | 6af242a3e739f023250684a3d4f905df4a4fb67a (patch) | |
tree | f432ae30652ae3077eeb6d0c5b34a1fbbabb42ca /usr.sbin/pkg_add/OpenBSD | |
parent | cb8bc2f75993d068c5594621b46dab43a5a26c5b (diff) |
record internal updateset dependencies for new packages, and respect them
while installing (need doing something similar for old packages)
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Dependencies.pm | 7 |
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 36149c89342..2286ed2e41d 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.96 2009/12/07 13:41:02 espie Exp $ +# $OpenBSD: Dependencies.pm,v 1.97 2009/12/11 21:04:01 espie Exp $ # # Copyright (c) 2005-2007 Marc Espie <espie@openbsd.org> # @@ -283,7 +283,7 @@ sub find_dep_in_stuff_to_install sub solve_dependency { - my ($self, $state, $dep) = @_; + my ($self, $state, $dep, $package) = @_; my $v; @@ -291,6 +291,7 @@ sub solve_dependency $v = $self->find_dep_in_self($state, $dep); if ($v) { + push(@{$package->{before}}, $v); return $v; } $v = $self->find_dep_in_stuff_to_install($state, $dep); @@ -347,7 +348,7 @@ sub solve_depends for my $package ($self->{set}->newer) { for my $dep (@{$package->{plist}->{depend}}) { - my $v = $self->solve_dependency($state, $dep); + my $v = $self->solve_dependency($state, $dep, $package); $self->{all_dependencies}->{$v} = $dep; $self->{to_register}->{$package}->{$v} = $dep; } |