index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Xavier Chantry <shiningxc@gmail.com> | 2008-07-25 02:02:36 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2008-07-24 22:16:29 -0500 |
commit | dfae7bdd52476673424f8020befef166cf95f3fc (patch) | |
tree | dfa54d7df22f17f29d27673cf416a81b46bf9acb /src/pacman/remove.c | |
parent | e6fb229534332396363f69bdb46081f45271bc53 (diff) |
-rw-r--r-- | src/pacman/remove.c | 15 |
diff --git a/src/pacman/remove.c b/src/pacman/remove.c index 83947cae..f091fa4d 100644 --- a/src/pacman/remove.c +++ b/src/pacman/remove.c @@ -125,21 +125,16 @@ int pacman_remove(alpm_list_t *targets) if(config->flags & PM_TRANS_FLAG_RECURSE || config->flags & PM_TRANS_FLAG_CASCADE) { /* list transaction targets */ - alpm_list_t *lst = NULL; - /* create a new list of package names only */ - for(i = alpm_trans_get_pkgs(); i; i = alpm_list_next(i)) { - pmpkg_t *pkg = alpm_list_getdata(i); - lst = alpm_list_add(lst, strdup(alpm_pkg_get_name(pkg))); - } + alpm_list_t *pkglist = alpm_trans_get_pkgs(); + + display_targets(pkglist, 0); printf("\n"); - list_display(_("Targets:"), lst); - FREELIST(lst); + /* get confirmation */ - if(yesno(1, _("\nDo you want to remove these packages?")) == 0) { + if(yesno(1, _("Do you want to remove these packages?")) == 0) { retval = 1; goto cleanup; } - printf("\n"); } /* Step 3: actually perform the removal */ |