Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src/pacman/query.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pacman/query.c')
-rw-r--r--src/pacman/query.c10
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);