summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pacman/query.c12
-rw-r--r--src/pacman/sync.c2
-rw-r--r--src/util/testdb.c6
3 files changed, 14 insertions, 6 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);
diff --git a/src/util/testdb.c b/src/util/testdb.c
index abbc62f1..e521e6b3 100644
--- a/src/util/testdb.c
+++ b/src/util/testdb.c
@@ -183,9 +183,9 @@ int check_syncdbs(char *dbpath, alpm_list_t *dbnames) {
void usage() {
fprintf(stderr, "usage:\n");
- fprintf(stderr,
+ fprintf(stderr,
"\t%s [-b <pacman db>] : check the local database\n", BASENAME);
- fprintf(stderr,
+ fprintf(stderr,
"\t%s [-b <pacman db>] core extra ... : check the listed sync databases\n", BASENAME);
exit(1);
}
@@ -224,10 +224,8 @@ int main(int argc, char **argv)
alpm_option_set_dbpath(dbpath);
if(!dbnames) {
- printf("Checking the integrity of the local database in %s\n",dbpath);
ret = check_localdb(dbpath);
} else {
- printf("Checking the integrity of the sync databases in %s\n",dbpath);
ret = check_syncdbs(dbpath,dbnames);
}