diff options
author | Chantry Xavier <shiningxc@gmail.com> | 2007-07-15 00:44:06 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-08-16 02:21:43 +0200 |
commit | 0f539832f45fa2c183cfe52c1881b3acaa54e3e6 (patch) | |
tree | f173e3934a819fd061ca4b3c2fa5a6b36bf1dc56 /src/pacman/query.c | |
parent | 064de149b7e4f6ea2891ae522102c4ae958f55e5 (diff) | |
download | pacman-0f539832f45fa2c183cfe52c1881b3acaa54e3e6.tar.gz pacman-0f539832f45fa2c183cfe52c1881b3acaa54e3e6.tar.xz |
new query options : explicit (-Qe) and deps (-Qd).
The t shortcut for --test was removed,
the orphan option (previously -Qe) was renamed to -Qt,
-Qe lists all packages installed explictly,
and -Qd lists all packages installed as dependencies.
Besides, t can be combined with either e or d.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
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); |