1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-10-31 15:45:03 -04:00

Small fix to download size lookup and a logger

These were just two small things I came across today and found could be
fixed or helpful, so I've added them and I'm not sure what else to bundle
them with. commit_count++

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2011-01-11 20:16:54 -06:00
parent a9cbd15260
commit 9a82cb92a4
2 changed files with 5 additions and 1 deletions

View File

@ -279,6 +279,8 @@ static pmpkg_t *pkg_load(const char *pkgfile, int full)
newpkg->filename = strdup(pkgfile); newpkg->filename = strdup(pkgfile);
newpkg->size = st.st_size; newpkg->size = st.st_size;
_alpm_log(PM_LOG_DEBUG, "starting package load for %s\n", pkgfile);
/* If full is false, only read through the archive until we find our needed /* If full is false, only read through the archive until we find our needed
* metadata. If it is true, read through the entire archive, which serves * metadata. If it is true, read through the entire archive, which serves
* as a verfication of integrity and allows us to create the filelist. */ * as a verfication of integrity and allows us to create the filelist. */

View File

@ -523,7 +523,9 @@ void display_targets(const alpm_list_t *pkgs, int install)
for(i = pkgs; i; i = alpm_list_next(i)) { for(i = pkgs; i; i = alpm_list_next(i)) {
pmpkg_t *pkg = alpm_list_getdata(i); pmpkg_t *pkg = alpm_list_getdata(i);
if(install) {
dlsize += alpm_pkg_download_size(pkg); dlsize += alpm_pkg_download_size(pkg);
}
isize += alpm_pkg_get_isize(pkg); isize += alpm_pkg_get_isize(pkg);
/* print the package size with the output if ShowSize option set */ /* print the package size with the output if ShowSize option set */