aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--URPM/Resolve.pm6
2 files changed, 7 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 13ac4fb..40eefd6 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,6 @@
- cleanups
+- fix computing size of added/freed disk space when updating involves removing
+ some packages (mga#4427)
Version 3.38.6 - 15 January 2012
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm
index 12b4a01..494cb11 100644
--- a/URPM/Resolve.pm
+++ b/URPM/Resolve.pm
@@ -1541,7 +1541,11 @@ sub _selected_size_filesize {
foreach (values %{$state->{rejected} || {}}) {
$_->{removed} || $_->{obsoleted} or next;
- $size -= $_->{size};
+ if ($_->{size} < 0) {
+ $size += $_->{size};
+ } else {
+ $size -= $_->{size};
+ }
}
foreach (@{$state->{orphans_to_remove} || []}) {