summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNagy Gabor <ngaba@bibl.u-szeged.hu>2009-05-10 22:41:29 +0200
committerDan McGee <dan@archlinux.org>2009-05-12 04:36:43 +0200
commita783f3fbf1425fc9b8815a2ab658aa6530ce0c23 (patch)
tree8fc60f3f3616e400cf11d8efd8ec728ce6d82ca5 /src
parentf569c4a0425649853516634853159cbe8815dee6 (diff)
downloadpacman-a783f3fbf1425fc9b8815a2ab658aa6530ce0c23.tar.gz
pacman-a783f3fbf1425fc9b8815a2ab658aa6530ce0c23.tar.xz
Introduce -Qlq
With --quiet flag, -Ql doesn't print the package name, just lists the files. I made --quiet documentation up-to-date (I also added -Sgq/-Qgq). Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/package.c8
-rw-r--r--src/pacman/package.h2
-rw-r--r--src/pacman/query.c2
3 files changed, 8 insertions, 4 deletions
diff --git a/src/pacman/package.c b/src/pacman/package.c
index b23c577f..da2feb51 100644
--- a/src/pacman/package.c
+++ b/src/pacman/package.c
@@ -205,7 +205,7 @@ void dump_pkg_backups(pmpkg_t *pkg)
/* List all files contained in a package
*/
-void dump_pkg_files(pmpkg_t *pkg)
+void dump_pkg_files(pmpkg_t *pkg, int quiet)
{
const char *pkgname, *root, *filestr;
alpm_list_t *i, *pkgfiles;
@@ -216,7 +216,11 @@ void dump_pkg_files(pmpkg_t *pkg)
for(i = pkgfiles; i; i = alpm_list_next(i)) {
filestr = alpm_list_getdata(i);
- fprintf(stdout, "%s %s%s\n", pkgname, root, filestr);
+ if(!quiet){
+ fprintf(stdout, "%s %s%s\n", pkgname, root, filestr);
+ } else {
+ fprintf(stdout, "%s%s\n", root, filestr);
+ }
}
fflush(stdout);
diff --git a/src/pacman/package.h b/src/pacman/package.h
index 14bc7d65..aede2a11 100644
--- a/src/pacman/package.h
+++ b/src/pacman/package.h
@@ -25,7 +25,7 @@ void dump_pkg_full(pmpkg_t *pkg, int level);
void dump_pkg_sync(pmpkg_t *pkg, const char *treename);
void dump_pkg_backups(pmpkg_t *pkg);
-void dump_pkg_files(pmpkg_t *pkg);
+void dump_pkg_files(pmpkg_t *pkg, int quiet);
void dump_pkg_changelog(pmpkg_t *pkg);
#endif /* _PM_PACKAGE_H */
diff --git a/src/pacman/query.c b/src/pacman/query.c
index 0d48638f..14fa357f 100644
--- a/src/pacman/query.c
+++ b/src/pacman/query.c
@@ -320,7 +320,7 @@ static void display(pmpkg_t *pkg)
}
}
if(config->op_q_list) {
- dump_pkg_files(pkg);
+ dump_pkg_files(pkg, config->quiet);
}
if(config->op_q_changelog) {
dump_pkg_changelog(pkg);