From 67d6654bf182dfdf3826b909656c6cd7b1be79e3 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 28 Sep 2007 11:02:50 +0000 Subject: - enhance sorted graph by better taking into account conflicts from state->{rejected} (fixes "big transaction" in urpmi split-transactions--strict-require.t test) --- URPM/Resolve.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'URPM') diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm index 82a1890..2d68424 100644 --- a/URPM/Resolve.pm +++ b/URPM/Resolve.pm @@ -1641,9 +1641,17 @@ sub _sort_by_dependencies__add_obsolete_edges { my @obsoletes = grep { $_->{obsoleted} } values %{$state->{rejected}} or return; my @groups = grep { @$_ > 1 } map { [ keys %{$_->{closure}} ] } @obsoletes; + my %groups; + foreach my $group (@groups) { + _add_group(\%groups, $group); + foreach (@$group) { + my $rej = $state->{rejected}{$_} or next; + _add_group(\%groups, [ $_, keys %{$rej->{closure}} ]); + } + } my %fullnames = map { scalar($urpm->{depslist}[$_]->fullname) => $_ } @$l; - foreach my $group (@groups) { + foreach my $group (uniq(values %groups)) { my @group = grep { defined $_ } map { $fullnames{$_} } @$group; foreach (@group) { @{$requires->{$_}} = uniq(@{$requires->{$_}}, @group); -- cgit v1.2.1