diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-09-28 11:02:50 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-09-28 11:02:50 +0000 |
commit | 67d6654bf182dfdf3826b909656c6cd7b1be79e3 (patch) | |
tree | 3e94c94f174b3da8904c2e6b57811820733afd1a /URPM/Resolve.pm | |
parent | 0a394dc8a493fe78a09f0d73879f3be9b317b574 (diff) | |
download | perl-URPM-67d6654bf182dfdf3826b909656c6cd7b1be79e3.tar perl-URPM-67d6654bf182dfdf3826b909656c6cd7b1be79e3.tar.gz perl-URPM-67d6654bf182dfdf3826b909656c6cd7b1be79e3.tar.bz2 perl-URPM-67d6654bf182dfdf3826b909656c6cd7b1be79e3.tar.xz perl-URPM-67d6654bf182dfdf3826b909656c6cd7b1be79e3.zip |
- enhance sorted graph by better taking into account conflicts from state->{rejected}
(fixes "big transaction" in urpmi split-transactions--strict-require.t test)
Diffstat (limited to 'URPM/Resolve.pm')
-rw-r--r-- | URPM/Resolve.pm | 10 |
1 files changed, 9 insertions, 1 deletions
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); |