Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/db.h
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-02-28 10:46:00 -0600
committerDan McGee <dan@archlinux.org>2011-02-28 10:46:00 -0600
commitf45369800abdeb54847d9ea6a326eb613f30cd3b (patch)
tree41ed4f7ae8c9fa18ed60a5b5ca1ccf6d4540bc62 /lib/libalpm/db.h
parent5ea4706f57e15de23a5fd36eff3bc4619aeac224 (diff)
Check local DB version before continuing transaction
Ensure we have a local DB version that is up to par with what we expect before we go down any road that might modify it. This should prevent stupid mistakes with the 3.5.X upgrade and people not running pacman-db-upgrade after the transaction as they will need to. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/db.h')
-rw-r--r--lib/libalpm/db.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libalpm/db.h b/lib/libalpm/db.h
index a530a2e9..75776d71 100644
--- a/lib/libalpm/db.h
+++ b/lib/libalpm/db.h
@@ -45,6 +45,7 @@ typedef enum _pmdbinfrq_t {
struct db_operations {
int (*populate) (pmdb_t *);
void (*unregister) (pmdb_t *);
+ int (*version) (pmdb_t *);
};
/* Database */
@@ -65,14 +66,15 @@ struct __pmdb_t {
/* db.c, database general calls */
+pmdb_t *_alpm_db_new(const char *treename, int is_local);
void _alpm_db_free(pmdb_t *db);
const char *_alpm_db_path(pmdb_t *db);
+int _alpm_db_version(pmdb_t *db);
int _alpm_db_cmp(const void *d1, const void *d2);
alpm_list_t *_alpm_db_search(pmdb_t *db, const alpm_list_t *needles);
pmdb_t *_alpm_db_register_local(void);
pmdb_t *_alpm_db_register_sync(const char *treename);
void _alpm_db_unregister(pmdb_t *db);
-pmdb_t *_alpm_db_new(const char *treename, int is_local);
/* be_*.c, backend specific calls */
int _alpm_local_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq);