index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Nagy Gabor <ngaba@bibl.u-szeged.hu> | 2008-01-27 12:24:50 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2008-01-27 12:05:33 -0600 |
commit | 1fc83f4af6d827bf2e69c7a10e3d2010c9211974 (patch) | |
tree | e19a2c3e8f84bbc3e7f63c5967d35bd5c635bb7f /src | |
parent | 9fbb77c91ba411fa46b1f2955893e7a39291f46a (diff) |
-rw-r--r-- | src/pacman/util.c | 25 |
diff --git a/src/pacman/util.c b/src/pacman/util.c index 19e64442..c646d7aa 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -409,20 +409,17 @@ void display_targets(const alpm_list_t *syncpkgs, pmdb_t *db_local) pmsyncpkg_t *sync = alpm_list_getdata(i); pmpkg_t *pkg = alpm_sync_get_pkg(sync); - /* If this sync record is a replacement, the data member contains - * a list of packages to be removed due to the package that is being - * installed. */ - if(alpm_sync_get_type(sync) == PM_SYNC_TYPE_REPLACE) { - alpm_list_t *to_replace = alpm_sync_get_data(sync); - - for(j = to_replace; j; j = alpm_list_next(j)) { - pmpkg_t *rp = alpm_list_getdata(j); - const char *name = alpm_pkg_get_name(rp); - - if(!alpm_list_find_str(to_remove, name)) { - rsize += alpm_pkg_get_isize(rp); - to_remove = alpm_list_add(to_remove, strdup(name)); - } + /* The removes member contains a list of packages to be removed + * due to the package that is being installed. */ + alpm_list_t *to_replace = alpm_sync_get_removes(sync); + + for(j = to_replace; j; j = alpm_list_next(j)) { + pmpkg_t *rp = alpm_list_getdata(j); + const char *name = alpm_pkg_get_name(rp); + + if(!alpm_list_find_str(to_remove, name)) { + rsize += alpm_pkg_get_isize(rp); + to_remove = alpm_list_add(to_remove, strdup(name)); } } |