summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-08-25 18:29:00 -0500
committerDan McGee <dan@archlinux.org>2011-08-28 19:52:41 -0500
commit2cfcc874b9332ad207398b9e20dc8880d93e8ae4 (patch)
tree6276468d8aa91c6e8546704a5c92166752c01ac6 /lib/libalpm
parentdc3336c27728fc16d2f9e68cb818648e7ca88467 (diff)
downloadpacman-2cfcc874b9332ad207398b9e20dc8880d93e8ae4.tar.xz
Better error handling out of package load method
There are many other ways to fail a package load other than "file not found". We should also use the correct error code in this case. Clean it up a bit in the various callers. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/be_package.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/be_package.c b/lib/libalpm/be_package.c
index 2566574d..0e58d20a 100644
--- a/lib/libalpm/be_package.c
+++ b/lib/libalpm/be_package.c
@@ -308,7 +308,7 @@ alpm_pkg_t *_alpm_pkg_load_internal(alpm_handle_t *handle, const char *pkgfile,
newpkg->size = st.st_size;
} else {
/* couldn't stat the pkgfile, return an error */
- RET_ERR(handle, ALPM_ERR_PKG_OPEN, NULL);
+ RET_ERR(handle, ALPM_ERR_PKG_NOT_FOUND, NULL);
}
/* can we get away with skipping checksums? */