From d347e99fa15953082ebc6ecd9ab275f230160286 Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Fri, 4 Jun 2010 13:19:40 +0000 Subject: 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. --- usr.sbin/pkg_add/OpenBSD/Dependencies.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'usr.sbin/pkg_add/OpenBSD/Dependencies.pm') 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 # @@ -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}"); } -- cgit v1.2.3