summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/be_sync.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-09-03 02:26:07 +0200
committerDan McGee <dan@archlinux.org>2011-09-03 02:26:07 +0200
commit83a1e4fee39321358858841069e1fe36d44edefc (patch)
tree9638a56a69aa45c071dd3934dfcb2b9fca8e5791 /lib/libalpm/be_sync.c
parentc51b9ca0ad897428a008701e35f8f11fa0ad9046 (diff)
downloadpacman-83a1e4fee39321358858841069e1fe36d44edefc.tar.gz
pacman-83a1e4fee39321358858841069e1fe36d44edefc.tar.xz
Clean up handling of size fields
We currently have csize, isize, and size concepts, and sometimes the difference isn't clear. Ensure the following holds: * size (aka csize): always the compressed size of the package; available for everything except local packages (where it will return 0) * isize: always the installed size of the package; available for all three package types Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/be_sync.c')
-rw-r--r--lib/libalpm/be_sync.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c
index 982d3556..7eb2539b 100644
--- a/lib/libalpm/be_sync.c
+++ b/lib/libalpm/be_sync.c
@@ -561,16 +561,8 @@ static int sync_db_read(alpm_db_t *db, struct archive *archive,
} else if(strcmp(line, "%PACKAGER%") == 0) {
READ_AND_STORE(pkg->packager);
} else if(strcmp(line, "%CSIZE%") == 0) {
- /* Note: the CSIZE and SIZE fields both share the "size" field in the
- * pkginfo_t struct. This can be done b/c CSIZE is currently only used
- * in sync databases, and SIZE is only used in local databases.
- */
READ_NEXT();
pkg->size = _alpm_strtoofft(line);
- /* also store this value to isize if isize is unset */
- if(pkg->isize == 0) {
- pkg->isize = pkg->size;
- }
} else if(strcmp(line, "%ISIZE%") == 0) {
READ_NEXT();
pkg->isize = _alpm_strtoofft(line);