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>
This commit is contained in:
parent
600782853a
commit
bba234a92e
1 changed files with 10 additions and 0 deletions
|
@ -394,6 +394,7 @@ static int display(pmpkg_t *pkg)
|
||||||
int pacman_query(alpm_list_t *targets)
|
int pacman_query(alpm_list_t *targets)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
int match = 0;
|
||||||
alpm_list_t *i;
|
alpm_list_t *i;
|
||||||
pmpkg_t *pkg = NULL;
|
pmpkg_t *pkg = NULL;
|
||||||
|
|
||||||
|
@ -436,8 +437,12 @@ int pacman_query(alpm_list_t *targets)
|
||||||
if(value != 0) {
|
if(value != 0) {
|
||||||
ret = 1;
|
ret = 1;
|
||||||
}
|
}
|
||||||
|
match = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(!match) {
|
||||||
|
ret = 1;
|
||||||
|
}
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -471,6 +476,7 @@ int pacman_query(alpm_list_t *targets)
|
||||||
if(value != 0) {
|
if(value != 0) {
|
||||||
ret = 1;
|
ret = 1;
|
||||||
}
|
}
|
||||||
|
match = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(config->op_q_isfile) {
|
if(config->op_q_isfile) {
|
||||||
|
@ -479,6 +485,10 @@ int pacman_query(alpm_list_t *targets)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!match) {
|
||||||
|
ret = 1;
|
||||||
|
}
|
||||||
|
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue