diff options
author | Allan McRae <allan@archlinux.org> | 2015-07-14 13:45:59 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2015-07-15 02:57:29 +0200 |
commit | f6c55b3c3f395839c0973c36b7a7e05984636a61 (patch) | |
tree | 16d85d4e4fca3bb8249a58f4b93f9088d6f5df55 /lib/libalpm/alpm.c | |
parent | 1ada16f0177f9bfcaed95cf3b71b7029290a5f1d (diff) | |
download | pacman-f6c55b3c3f395839c0973c36b7a7e05984636a61.tar.gz pacman-f6c55b3c3f395839c0973c36b7a7e05984636a61.tar.xz |
Allow frontends to specify the sync database extension
This allows frontends to select between the .db and .files databases
currently supplied by repo-add or any other compatible database.
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm/alpm.c')
-rw-r--r-- | lib/libalpm/alpm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c index 21102860..d77b43ab 100644 --- a/lib/libalpm/alpm.c +++ b/lib/libalpm/alpm.c @@ -64,6 +64,9 @@ alpm_handle_t SYMEXPORT *alpm_initialize(const char *root, const char *dbpath, goto cleanup; } + /* set default database extension */ + STRDUP(myhandle->dbext, ".db", goto cleanup); + lockfilelen = strlen(myhandle->dbpath) + strlen(lf) + 1; myhandle->lockfile = calloc(lockfilelen, sizeof(char)); snprintf(myhandle->lockfile, lockfilelen, "%s%s", myhandle->dbpath, lf); |