1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00

Add quiet printout to --owns functionality

If we specify -q/--quiet on an --owns operation, only print a matching
package name rather than the verbose human-readable message.

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2008-04-06 19:49:41 -05:00
parent 073bac794d
commit 404e0a0e10

View File

@ -1,7 +1,7 @@
/*
* query.c
*
* Copyright (c) 2002-2007 by Judd Vinet <jvinet@zeroflux.org>
* Copyright (c) 2002-2008 by Judd Vinet <jvinet@zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -119,8 +119,13 @@ static int query_fileowner(alpm_list_t *targets)
free(pdname);
if(ppath && strcmp(ppath, rpath) == 0) {
printf(_("%s is owned by %s %s\n"), filename,
alpm_pkg_get_name(info), alpm_pkg_get_version(info));
if (!config->quiet) {
printf(_("%s is owned by %s %s\n"), filename,
alpm_pkg_get_name(info), alpm_pkg_get_version(info));
} else {
printf("%s %s\n", alpm_pkg_get_name(info),
alpm_pkg_get_version(info));
}
found = 1;
}
free(ppath);