aboutsummaryrefslogtreecommitdiffstats
path: root/URPM
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-09-05 15:19:30 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-09-05 15:19:30 +0000
commit0f5db2641ef8002192ac7f724e8582235b39d380 (patch)
tree7560a82c2745ef3431b12e49c731c93ea27277a5 /URPM
parent2d2ccb9dd2242189df7db74ad5b835b30928fe16 (diff)
downloadperl-URPM-0f5db2641ef8002192ac7f724e8582235b39d380.tar
perl-URPM-0f5db2641ef8002192ac7f724e8582235b39d380.tar.gz
perl-URPM-0f5db2641ef8002192ac7f724e8582235b39d380.tar.bz2
perl-URPM-0f5db2641ef8002192ac7f724e8582235b39d380.tar.xz
perl-URPM-0f5db2641ef8002192ac7f724e8582235b39d380.zip
- fix displaying @sorted whereas some elements have been removed from it
- more complete error message
Diffstat (limited to 'URPM')
-rw-r--r--URPM/Resolve.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm
index 945697d..8d80262 100644
--- a/URPM/Resolve.pm
+++ b/URPM/Resolve.pm
@@ -1430,10 +1430,11 @@ sub build_transaction_set {
#- order computed in first step and to update a list of packages to
#- install, to upgrade and to remove.
my %examined;
- while (@sorted) {
+ my @todo = @sorted;
+ while (@todo) {
my @ids;
- while (@sorted && @ids < $options{split_length}) {
- my $l = shift @sorted;
+ while (@todo && @ids < $options{split_length}) {
+ my $l = shift @todo;
push @ids, @$l;
}
my %requested = map { $_ => undef } @ids;
@@ -1455,7 +1456,7 @@ sub build_transaction_set {
if (my @bad_remove = grep { !$state->{rejected}{$_}{removed} || $state->{rejected}{$_}{obsoleted} } @remove) {
$urpm->{error}(sorted_rpms_to_string($urpm, @sorted)) if $urpm->{error};
- $urpm->{error}('transaction is too small: ' . join(' ', @bad_remove) . ' is rejected but it should not (current transaction: ' . join(' ', map { $urpm->{depslist}[$_]->name } @upgrade) . ')') if $urpm->{error};
+ $urpm->{error}('transaction is too small: ' . join(' ', @bad_remove) . ' is rejected but it should not (current transaction: ' . join(' ', map { scalar $urpm->{depslist}[$_]->fullname } @upgrade) . ', requested: ' . join('+', map { scalar $urpm->{depslist}[$_]->fullname } @ids) . ')') if $urpm->{error};
$state->{transaction} = [];
last;
}