summaryrefslogtreecommitdiff
path: root/src/commit.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-06-19 21:39:01 +0300
committerTimo Teräs <timo.teras@iki.fi>2013-06-19 21:39:01 +0300
commit17145f82aeba9a9fdfdf03cb4f74cb41cf3ab913 (patch)
treed97030f3ce9abe46670952a35e1eba056177523c /src/commit.c
parent6da083fc24e4f1ef0363957074148d1bc11cef83 (diff)
downloadapk-tools-17145f82aeba9a9fdfdf03cb4f74cb41cf3ab913.tar.gz
apk-tools-17145f82aeba9a9fdfdf03cb4f74cb41cf3ab913.tar.bz2
apk-tools-17145f82aeba9a9fdfdf03cb4f74cb41cf3ab913.tar.xz
apk-tools-17145f82aeba9a9fdfdf03cb4f74cb41cf3ab913.zip
solver: fix package deletion to consier provides properly
Diffstat (limited to 'src/commit.c')
-rw-r--r--src/commit.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/commit.c b/src/commit.c
index fc4fafd..09e8b28 100644
--- a/src/commit.c
+++ b/src/commit.c
@@ -232,11 +232,10 @@ int apk_solver_commit_changeset(struct apk_database *db,
foreach_array_item(change, changeset->changes) {
count_change(change, &prog.total);
if (change->new_pkg)
- size_diff += change->new_pkg->installed_size;
+ size_diff += change->new_pkg->installed_size / 1024;
if (change->old_pkg)
- size_diff -= change->old_pkg->installed_size;
+ size_diff -= change->old_pkg->installed_size / 1024;
}
- size_diff /= 1024;
size_unit = 'K';
if (abs(size_diff) > 10000) {
size_diff /= 1024;