diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2007-06-02 12:37:38 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2007-06-02 12:37:38 +0000 |
commit | c6b3b36856c4cf696cde8eae0c0cc5c5b3c253d3 (patch) | |
tree | 0242068f1b1d677a968ca810ae5211c01efdad6a /usr.sbin/pkg_add/OpenBSD/Dependencies.pm | |
parent | 918e6d8248ee4db4c1f6cfa815dbb844121bbd4c (diff) |
move the check that dependencies are satisfied inside the solver object
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/Dependencies.pm')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Dependencies.pm | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Dependencies.pm b/usr.sbin/pkg_add/OpenBSD/Dependencies.pm index ea81feb1756..56f883f429e 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.48 2007/06/02 12:21:14 espie Exp $ +# $OpenBSD: Dependencies.pm,v 1.49 2007/06/02 12:37:37 espie Exp $ # # Copyright (c) 2005-2007 Marc Espie <espie@openbsd.org> # @@ -165,6 +165,17 @@ sub solve_depends return @{$self->{deplist}}; } +sub check_depends +{ + my $self = shift; + my @bad = (); + + for my $dep ($self->dependencies) { + push(@bad, $dep) unless is_installed($dep); + } + return @bad; +} + sub dump { my $self = shift; |