From 83a1e4fee39321358858841069e1fe36d44edefc Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Fri, 2 Sep 2011 19:26:07 -0500 Subject: 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 --- lib/libalpm/be_sync.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'lib/libalpm/be_sync.c') 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); -- cgit v1.2.3-24-g4f1b