summaryrefslogtreecommitdiffstats
path: root/src/pacman/remove.c
diff options
context:
space:
mode:
authorXavier Chantry <shiningxc@gmail.com>2009-07-19 11:15:11 +0200
committerDan McGee <dan@archlinux.org>2010-03-15 00:44:40 +0100
commitd39b1dbe627af218e49be6424857089a5888903b (patch)
tree9225a360217ede5c5817fa41fb182454008dce6e /src/pacman/remove.c
parent67700b926a1eff745272975e7b089b80bf72cc30 (diff)
downloadpacman-d39b1dbe627af218e49be6424857089a5888903b.tar.gz
pacman-d39b1dbe627af218e49be6424857089a5888903b.tar.xz
Add new --print operation for all operations
And a new --print-format option to configure the output. This implements FS#14208 Example usage : pacman -Sp --print-format "%r/%n-%v : %l [%s]" kdelibs extra/kdelibs-4.3.2-4 : ftp://mir2.archlinuxfr.org/archlinux/extra/os/i686/kdelibs-4.3.2-4-i686.pkg.tar.gz [0,00] Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/pacman/remove.c')
-rw-r--r--src/pacman/remove.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pacman/remove.c b/src/pacman/remove.c
index 61b57c77..4a5d9bfb 100644
--- a/src/pacman/remove.c
+++ b/src/pacman/remove.c
@@ -121,6 +121,12 @@ int pacman_remove(alpm_list_t *targets)
printf(_(" there is nothing to do\n"));
goto cleanup; /* we are done */
}
+
+ if(config->print) {
+ print_packages(pkglist);
+ goto cleanup;
+ }
+
/* print targets and ask user confirmation */
display_targets(pkglist, 0);
printf("\n");