summaryrefslogtreecommitdiff
path: root/src/package.c
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-01-07 21:45:11 +0200
committerTimo Teras <timo.teras@iki.fi>2009-01-07 21:45:11 +0200
commit052fbe3f86eaab1940f25824705d809cd9af59e5 (patch)
tree248d8da56e8660db2aa09a17bd52d25e0256cf29 /src/package.c
parentc7ffc96a16c6963fe0a07be7ee75e8f1f7426882 (diff)
downloadapk-tools-052fbe3f86eaab1940f25824705d809cd9af59e5.tar.gz
apk-tools-052fbe3f86eaab1940f25824705d809cd9af59e5.tar.bz2
apk-tools-052fbe3f86eaab1940f25824705d809cd9af59e5.tar.xz
apk-tools-052fbe3f86eaab1940f25824705d809cd9af59e5.zip
various: make fancy progress bar and update todo
Diffstat (limited to 'src/package.c')
-rw-r--r--src/package.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/package.c b/src/package.c
index 875c001..b5d1ccc 100644
--- a/src/package.c
+++ b/src/package.c
@@ -275,7 +275,6 @@ static int read_info_entry(void *ctx, const struct apk_file_info *ae,
struct read_info_ctx *ri = (struct read_info_ctx *) ctx;
struct apk_database *db = ri->db;
struct apk_package *pkg = ri->pkg;
- const int bsize = 4 * 1024;
apk_blob_t name, version;
char *slash;
int i;
@@ -321,7 +320,7 @@ static int read_info_entry(void *ctx, const struct apk_file_info *ae,
apk_script_type(slash+1) == APK_SCRIPT_PRE_INSTALL)
ri->has_install = 1;
} else {
- pkg->installed_size += (ae->size + bsize - 1) & ~(bsize - 1);
+ pkg->installed_size += apk_calc_installed_size(ae->size);
}
return 0;