summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD/Dependencies.pm
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2007-05-14 17:52:09 +0000
committerMarc Espie <espie@cvs.openbsd.org>2007-05-14 17:52:09 +0000
commite38100debf2e39e58c0f9e49530ca8cb73badb5a (patch)
tree43790307b89174364af88608c2efea0cf642d580 /usr.sbin/pkg_add/OpenBSD/Dependencies.pm
parentfd33d02f476041fb56773b24f86b39f6e090b7eb (diff)
move verbose printing into a separate method.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/Dependencies.pm')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Dependencies.pm13
1 files changed, 9 insertions, 4 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Dependencies.pm b/usr.sbin/pkg_add/OpenBSD/Dependencies.pm
index 5fcb1162b44..ef512f23f4c 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.28 2007/05/14 17:48:32 espie Exp $
+# $OpenBSD: Dependencies.pm,v 1.29 2007/05/14 17:52:08 espie Exp $
#
# Copyright (c) 2005-2007 Marc Espie <espie@openbsd.org>
#
@@ -129,15 +129,20 @@ sub solve
$self->solve_dependency($state, $dep);
}
- if ($state->{verbose} && %{$self->{to_register}}) {
+ $handle->{solved_dependencies} = $self->{to_register};
+ return @{$self->{deplist}};
+}
+
+sub dump
+{
+ my $self = shift;
+ if (%{$self->{to_register}}) {
print "Dependencies for ", $self->{pkgname}, " resolve to: ",
join(', ', keys %{$self->{to_register}});
print " (todo: ", join(',', @{$self->{deplist}}), ")"
if @{$self->{deplist}} > 0;
print "\n";
}
- $handle->{solved_dependencies} = $self->{to_register};
- return @{$self->{deplist}};
}
sub check_lib_spec