diff options
author | Dan McGee <dan@archlinux.org> | 2011-06-08 06:05:21 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-06-30 23:05:20 +0200 |
commit | 68284da0d72bf27ac3dc5cfc1cd02d16f824130c (patch) | |
tree | 8835a9047bd9ebd95d4ea7f72c2fe7e054d23180 /lib/libalpm/alpm.h | |
parent | 6633b8e5c290dbb1b0382f3f960e1f7134247a68 (diff) | |
download | pacman-68284da0d72bf27ac3dc5cfc1cd02d16f824130c.tar.gz pacman-68284da0d72bf27ac3dc5cfc1cd02d16f824130c.tar.xz |
Add an alpm_db_get_valid() public function
This allows one to check if a database is valid or invalid.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/alpm.h')
-rw-r--r-- | lib/libalpm/alpm.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 33707dd3..b702c030 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -382,6 +382,14 @@ int alpm_db_unregister_all(alpm_handle_t *handle); */ const char *alpm_db_get_name(const alpm_db_t *db); +/** Check the validity of a database. + * This is most useful for sync databases and verifying signature status. + * If invalid, the handle error code will be set accordingly. + * @param db pointer to the package database + * @return 0 if valid, -1 if invalid (pm_errno is set accordingly) + */ +int alpm_db_get_valid(alpm_db_t *db); + /** @name Accessors to the list of servers for a database. * @{ */ |