summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pacman/query.c14
-rw-r--r--src/util/testpkg.c3
2 files changed, 15 insertions, 2 deletions
diff --git a/src/pacman/query.c b/src/pacman/query.c
index 2fb985a3..ec98c999 100644
--- a/src/pacman/query.c
+++ b/src/pacman/query.c
@@ -332,7 +332,7 @@ static int query_group(alpm_list_t *targets)
}
}
} else {
- pm_fprintf(stderr, ALPM_LOG_ERROR, _("group \"%s\" was not found\n"), grpname);
+ pm_fprintf(stderr, ALPM_LOG_ERROR, _("group '%s' was not found\n"), grpname);
ret++;
}
}
@@ -560,7 +560,17 @@ int pacman_query(alpm_list_t *targets)
}
if(pkg == NULL) {
- pm_fprintf(stderr, ALPM_LOG_ERROR, _("package \"%s\" not found\n"), strname);
+ switch(alpm_errno(config->handle)) {
+ case ALPM_ERR_PKG_NOT_FOUND:
+ pm_fprintf(stderr, ALPM_LOG_ERROR,
+ _("package '%s' was not found\n"), strname);
+ break;
+ default:
+ pm_fprintf(stderr, ALPM_LOG_ERROR,
+ _("could not load package '%s': %s\n"), strname,
+ alpm_strerror(alpm_errno(config->handle)));
+ break;
+ }
ret = 1;
continue;
}
diff --git a/src/util/testpkg.c b/src/util/testpkg.c
index ac2dde28..90758e16 100644
--- a/src/util/testpkg.c
+++ b/src/util/testpkg.c
@@ -63,6 +63,9 @@ int main(int argc, char *argv[])
|| pkg == NULL) {
err = alpm_errno(handle);
switch(err) {
+ case ALPM_ERR_PKG_NOT_FOUND:
+ printf("Cannot find the given file.\n");
+ break;
case ALPM_ERR_PKG_OPEN:
printf("Cannot open the given file.\n");
break;