summaryrefslogtreecommitdiffstats
path: root/src/pacman/query.c
diff options
context:
space:
mode:
authorSimon Gomizelj <simongmzlj@gmail.com>2012-11-16 07:26:44 +0100
committerAllan McRae <allan@archlinux.org>2012-11-27 06:16:15 +0100
commitfc35b16fd48fd4c6b89826ebe268425600e76f34 (patch)
tree8c552ec9a1bccdb7a0392c77bbe61a45ed684595 /src/pacman/query.c
parentb1d614a01db7a89543d96747afde009ec3b6545d (diff)
downloadpacman-fc35b16fd48fd4c6b89826ebe268425600e76f34.tar.gz
pacman-fc35b16fd48fd4c6b89826ebe268425600e76f34.tar.xz
pacman: add -n/--native filter to -Q
Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'src/pacman/query.c')
-rw-r--r--src/pacman/query.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pacman/query.c b/src/pacman/query.c
index 398adac4..2736672c 100644
--- a/src/pacman/query.c
+++ b/src/pacman/query.c
@@ -380,6 +380,10 @@ static int filter(alpm_pkg_t *pkg)
alpm_pkg_get_reason(pkg) != ALPM_PKG_REASON_DEPEND) {
return 0;
}
+ /* check if this pkg is in a sync DB */
+ if(config->op_q_native && is_foreign(pkg)) {
+ return 0;
+ }
/* check if this pkg isn't in a sync DB */
if(config->op_q_foreign && !is_foreign(pkg)) {
return 0;