summaryrefslogtreecommitdiff
path: root/src/solver.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2011-12-27 14:06:03 +0200
committerTimo Teräs <timo.teras@iki.fi>2011-12-27 14:06:03 +0200
commit34756e6b87e7c8c055a6e050cad90e0b0a549357 (patch)
tree55fbdd7fbc5c44b0394573415341b966a7914b1c /src/solver.c
parent83b098d357fa8508834d65bf2fbfee6c288cbd20 (diff)
downloadapk-tools-34756e6b87e7c8c055a6e050cad90e0b0a549357.tar.gz
apk-tools-34756e6b87e7c8c055a6e050cad90e0b0a549357.tar.bz2
apk-tools-34756e6b87e7c8c055a6e050cad90e0b0a549357.tar.xz
apk-tools-34756e6b87e7c8c055a6e050cad90e0b0a549357.zip
solver: report number of (mega)bytes used
Diffstat (limited to 'src/solver.c')
-rw-r--r--src/solver.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/solver.c b/src/solver.c
index 644408b..965694b 100644
--- a/src/solver.c
+++ b/src/solver.c
@@ -1331,10 +1331,17 @@ all_done:
apk_db_write_config(db);
if (r == 0 && !db->performing_self_update) {
- apk_message("OK: %d packages, %d dirs, %d files",
- db->installed.stats.packages,
- db->installed.stats.dirs,
- db->installed.stats.files);
+ if (apk_verbosity > 1) {
+ apk_message("OK: %d packages, %d dirs, %d files, %zu MiB",
+ db->installed.stats.packages,
+ db->installed.stats.dirs,
+ db->installed.stats.files,
+ db->installed.stats.bytes / (1024 * 1024));
+ } else {
+ apk_message("OK: %zu MiB in %d packages",
+ db->installed.stats.bytes / (1024 * 1024),
+ db->installed.stats.packages);
+ }
}
return r;