index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2011-09-01 18:01:33 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-09-02 21:45:33 -0500 |
commit | 7c956d5d4bdf89bfece1244baa56a92f83bd9161 (patch) | |
tree | b933eb71f75d78726d7f850fdac05314cbb3d3ad /src | |
parent | 98fdfa1968f81596acd25ed5b77cc968dcd97ead (diff) |
-rw-r--r-- | src/pacman/query.c | 6 |
diff --git a/src/pacman/query.c b/src/pacman/query.c index 5f2b37eb..31252bd3 100644 --- a/src/pacman/query.c +++ b/src/pacman/query.c @@ -25,6 +25,7 @@ #include <limits.h> #include <string.h> #include <sys/stat.h> +#include <unistd.h> #include <errno.h> #include <alpm.h> @@ -564,6 +565,11 @@ int pacman_query(alpm_list_t *targets) case ALPM_ERR_PKG_NOT_FOUND: pm_fprintf(stderr, ALPM_LOG_ERROR, _("package '%s' was not found\n"), strname); + if(!config->op_q_isfile && access(strname, R_OK) == 0) { + pm_fprintf(stderr, ALPM_LOG_WARNING, + _("'%s' is a file, you might want to use %s."), + strname, "-p/--file"); + } break; default: pm_fprintf(stderr, ALPM_LOG_ERROR, |