diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2010-06-04 13:19:40 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2010-06-04 13:19:40 +0000 |
commit | d347e99fa15953082ebc6ecd9ab275f230160286 (patch) | |
tree | 1562e32bb52a4dd668c5dbaa5f78b7e726bcfb68 /usr.sbin/pkg_add/OpenBSD/Dependencies.pm | |
parent | 6f138fc6e7d30828b49aac1867054afe01ffd608 (diff) |
move code around, so that commands can be used as modules.
pkg becomes the start hub, which does nothing except require the
correct module.
Saner code wrt Add/Delete, and more sharing.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/Dependencies.pm')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Dependencies.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Dependencies.pm b/usr.sbin/pkg_add/OpenBSD/Dependencies.pm index 535e385d013..29c1ea51faa 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.126 2010/05/10 09:17:55 espie Exp $ +# $OpenBSD: Dependencies.pm,v 1.127 2010/06/04 13:19:39 espie Exp $ # # Copyright (c) 2005-2010 Marc Espie <espie@openbsd.org> # @@ -405,7 +405,7 @@ sub find_dep_in_repositories return unless $dep->spec->is_valid; my $candidates = $self->{set}->match_locations($dep->spec); - if (!$state->{defines}->{allversions}) { + if (!$state->defines('allversions')) { require OpenBSD::Search; $candidates = OpenBSD::Search::FilterLocation-> keep_most_recent->filter_locations($candidates); @@ -509,7 +509,7 @@ sub solve_dependency my $v; if (defined $self->cached($dep)) { - if ($state->{defines}->{stat_cache}) { + if ($state->defines('stat_cache')) { if (defined $global_cache->{$dep->{pattern}}) { $state->print("Global "); } @@ -519,7 +519,7 @@ sub solve_dependency $v = $self->cached($dep)->do($self, $state, $dep, $package); return $v if $v; } - if ($state->{defines}->{stat_cache}) { + if ($state->defines('stat_cache')) { $state->say("No cache hit on $dep->{pattern}"); } |