summaryrefslogtreecommitdiffstats
path: root/src/pacman/query.c
diff options
context:
space:
mode:
authorChantry Xavier <xav@chantry.homelinux.org>2007-05-20 08:20:07 +0200
committerAaron Griffin <aaronmgriffin@gmail.com>2007-05-20 08:20:07 +0200
commit51225b326310af23e5ceda0c6cd6cc563901ccab (patch)
tree27d5d1d34c59f9fb7a6b865dea7b619b640c3308 /src/pacman/query.c
parentebad1996149d72cf4a1fe15fe8326f2b4996f585 (diff)
downloadpacman-51225b326310af23e5ceda0c6cd6cc563901ccab.tar.gz
pacman-51225b326310af23e5ceda0c6cd6cc563901ccab.tar.xz
Add -Qee option for the original behavior of -Qe
-Qee now lists "orphans" the way pacman used to - that is, -Qe lists packages required by nothing that were installed as a dependency, but -Qee lists all packages not required by something else. Also, I snuck in a compile fix for my real_path cleanup earlier, heh Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Diffstat (limited to 'src/pacman/query.c')
-rw-r--r--src/pacman/query.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pacman/query.c b/src/pacman/query.c
index 06d111b0..4abb674d 100644
--- a/src/pacman/query.c
+++ b/src/pacman/query.c
@@ -51,7 +51,7 @@ static char *resolve_path(const char* file)
return(NULL);
}
- if(!realpath(copy, str)) {
+ if(!realpath(file, str)) {
return(NULL);
}
@@ -289,7 +289,8 @@ int pacman_query(alpm_list_t *targets)
dump_pkg_files(info);
} else if(config->op_q_orphans) {
if(alpm_pkg_get_requiredby(info) == NULL
- && (long)alpm_pkg_get_reason(info) == PM_PKG_REASON_DEPEND) {
+ && ((long)alpm_pkg_get_reason(info) == PM_PKG_REASON_DEPEND
+ || config->op_q_orphans > 1)) {
printf("%s %s\n", pkgname, pkgver);
}
} else {