diff options
author | Dan McGee <dan@archlinux.org> | 2009-08-18 20:49:25 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2009-08-18 20:49:25 -0500 |
commit | 92f0775e76c75ebe9e30355cc99bb40cf365abcb (patch) | |
tree | 6268a6ce1457109bf5878d3aa66bfbf3a5c5afe2 /src/pacman | |
parent | 7dae79e7b95c517df136003728363dc9ad346a7e (diff) | |
parent | bdd8e92ff601aab44941e7572f6c48d7e32a3f24 (diff) | |
download | pacman-92f0775e76c75ebe9e30355cc99bb40cf365abcb.tar.xz |
Merge branch 'maint'
Conflicts:
lib/libalpm/dload.c
Diffstat (limited to 'src/pacman')
-rw-r--r-- | src/pacman/query.c | 12 | ||||
-rw-r--r-- | src/pacman/sync.c | 2 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/pacman/query.c b/src/pacman/query.c index 32752ffb..a9717074 100644 --- a/src/pacman/query.c +++ b/src/pacman/query.c @@ -172,7 +172,7 @@ static int query_search(alpm_list_t *targets) } /* print the package size with the output if ShowSize option set */ - if(config->showsize) { + if(!config->quiet && config->showsize) { /* Convert byte size to MB */ double mbsize = (double)alpm_pkg_get_size(pkg) / (1024.0 * 1024.0); @@ -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); } diff --git a/src/pacman/sync.c b/src/pacman/sync.c index 7bfe454b..dc936219 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -308,7 +308,7 @@ static int sync_search(alpm_list_t *syncs, alpm_list_t *targets) } /* print the package size with the output if ShowSize option set */ - if(config->showsize) { + if(!config->quiet && config->showsize) { /* Convert byte size to MB */ double mbsize = alpm_pkg_get_size(pkg) / (1024.0 * 1024.0); |