From b6f89f03afcb6e1e6aa5d1c437db1df54a4baaca Mon Sep 17 00:00:00 2001 From: Travis Willard Date: Sun, 26 Aug 2007 22:42:17 -0400 Subject: separate local from sync dbs on filesystem Introduce two new methods into the API - alpm_db_register_sync and alpm_db_register_local, which replace the functionality of alpm_db_register. db_register_local always returns the local DB, and db_register_sync will always try to register a sync DB. This conceptually separates the local DB from sync DBs in the code. Also updated the pacman frontend to use the new functions. In addition, this changes the location of all sync DBs in the filesystem from $DBPATH/$REPO to $DBPATH/sync/$REPO, This removes the silly limitation that a sync DB couldn't be named 'local', along with structurally separating sync DBs and the local DB in the filesystem. Signed-off-by: Travis Willard Signed-off-by: Dan McGee --- lib/libalpm/db.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/libalpm/db.h') diff --git a/lib/libalpm/db.h b/lib/libalpm/db.h index 2597c8c4..15cc4c4c 100644 --- a/lib/libalpm/db.h +++ b/lib/libalpm/db.h @@ -52,7 +52,8 @@ pmdb_t *_alpm_db_new(const char *dbpath, const char *treename); void _alpm_db_free(pmdb_t *db); int _alpm_db_cmp(const void *db1, const void *db2); alpm_list_t *_alpm_db_search(pmdb_t *db, const alpm_list_t *needles); -pmdb_t *_alpm_db_register(const char *treename); +pmdb_t *_alpm_db_register_local(void); +pmdb_t *_alpm_db_register_sync(const char *treename); /* be.c, backend specific calls */ int _alpm_db_install(pmdb_t *db, const char *dbfile); -- cgit v1.2.3-24-g4f1b