summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/package.h
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-09-20 03:40:32 +0200
committerDan McGee <dan@archlinux.org>2011-09-20 17:23:11 +0200
commitafdbfc05f771f2c684ee195b46d26b3d08a67085 (patch)
treeb4906677251278e46545e1354676c0ab0f9fe614 /lib/libalpm/package.h
parent7eb2f0cd151998d36746e2eb14cad2a3f8fb708b (diff)
downloadpacman-afdbfc05f771f2c684ee195b46d26b3d08a67085.tar.gz
pacman-afdbfc05f771f2c684ee195b46d26b3d08a67085.tar.xz
Extract an _alpm_pkg_validate_internal() method
_alpm_pkg_load_internal() was becoming a monster. Extract the top bit of the method that dealt with checksum and signature validation into a separate method that should be called before one loads a package to ensure it is valid. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/package.h')
-rw-r--r--lib/libalpm/package.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libalpm/package.h b/lib/libalpm/package.h
index c19625c1..fbae766c 100644
--- a/lib/libalpm/package.h
+++ b/lib/libalpm/package.h
@@ -135,8 +135,10 @@ void _alpm_pkg_free(alpm_pkg_t *pkg);
void _alpm_pkg_free_trans(alpm_pkg_t *pkg);
-alpm_pkg_t *_alpm_pkg_load_internal(alpm_handle_t *handle, const char *pkgfile,
- alpm_pkg_t *syncpkg, int full, alpm_siglevel_t level);
+int _alpm_pkg_validate_internal(alpm_handle_t *handle,
+ const char *pkgfile, alpm_pkg_t *syncpkg, alpm_siglevel_t level);
+alpm_pkg_t *_alpm_pkg_load_internal(alpm_handle_t *handle,
+ const char *pkgfile, int full);
int _alpm_pkg_cmp(const void *p1, const void *p2);
int _alpm_pkg_compare_versions(alpm_pkg_t *local_pkg, alpm_pkg_t *pkg);