diff options
Diffstat (limited to 'src/pacman/query.c')
-rw-r--r-- | src/pacman/query.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/pacman/query.c b/src/pacman/query.c index de118e71..8ef47e6b 100644 --- a/src/pacman/query.c +++ b/src/pacman/query.c @@ -279,6 +279,16 @@ static int is_orphan(pmpkg_t *pkg) static int filter(pmpkg_t *pkg) { + /* check if this package was explicitly installed */ + if(config->op_q_explicit && + alpm_pkg_get_reason(pkg) != PM_PKG_REASON_EXPLICIT) { + return(0); + } + /* check if this package was installed as a dependency */ + if(config->op_q_deps && + alpm_pkg_get_reason(pkg) != PM_PKG_REASON_DEPEND) { + return(0); + } /* check if this pkg isn't in a sync DB */ if(config->op_q_foreign && !is_foreign(pkg)) { return(0); |