summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2009-12-04 15:42:25 +0000
committerMarc Espie <espie@cvs.openbsd.org>2009-12-04 15:42:25 +0000
commitb9cc16f5f32c7702ad3d5bdc1286b0bb700212c6 (patch)
tree991891970b2a39d86bd04e504a60e13fb50879fb
parenteec8725033921ff1dd32766e7a63db4df6b35c88 (diff)
create new updatesets when needed
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Dependencies.pm11
1 files changed, 10 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Dependencies.pm b/usr.sbin/pkg_add/OpenBSD/Dependencies.pm
index 1cb6b09901f..3f5e2b4ee6a 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.93 2009/12/04 10:45:20 espie Exp $
+# $OpenBSD: Dependencies.pm,v 1.94 2009/12/04 15:42:24 espie Exp $
#
# Copyright (c) 2005-2007 Marc Espie <espie@openbsd.org>
#
@@ -305,6 +305,15 @@ sub solve_dependency
}
$v = find_candidate($dep->spec, @l);
if ($v) {
+ if ($state->{newupdates}) {
+ if ($state->tracker->is_known($v)) {
+ return $v;
+ }
+ my $set = OpenBSD::UpdateSet->new->add_older(OpenBSD::Handle->create_old($v, $state));
+ push(@{$self->{deplist}}, $set);
+ $state->tracker->add_set($set);
+ $self->{not_ready} = 1;
+ }
return $v;
}
if (!$state->{allow_replacing}) {