summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXavier Chantry <shiningxc@gmail.com>2009-08-18 16:56:19 +0200
committerDan McGee <dan@archlinux.org>2009-08-18 20:37:54 -0500
commitbba234a92ed9560bab1f1846870faa8303f98064 (patch)
tree079757f386a7007bcb0cb06692bc8a123584bb75 /src
parent600782853ad5317ee51423a03487abcf34efd166 (diff)
downloadpacman-bba234a92ed9560bab1f1846870faa8303f98064.tar.xz
query.c : return 1 when no package match
For example, if no package is outdated, -Qu will return 1. This implements FS#15938 Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src')
-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 292cddfb..a9717074 100644
--- a/src/pacman/query.c
+++ b/src/pacman/query.c
@@ -394,6 +394,7 @@ static int display(pmpkg_t *pkg)
int pacman_query(alpm_list_t *targets)
{
int ret = 0;
+ int match = 0;
alpm_list_t *i;
pmpkg_t *pkg = NULL;
@@ -436,8 +437,12 @@ int pacman_query(alpm_list_t *targets)
if(value != 0) {
ret = 1;
}
+ match = 1;
}
}
+ if(!match) {
+ ret = 1;
+ }
return(ret);
}
@@ -471,6 +476,7 @@ int pacman_query(alpm_list_t *targets)
if(value != 0) {
ret = 1;
}
+ match = 1;
}
if(config->op_q_isfile) {
@@ -479,6 +485,10 @@ int pacman_query(alpm_list_t *targets)
}
}
+ if(!match) {
+ ret = 1;
+ }
+
return(ret);
}