summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2010-06-03 16:10:50 +0200
committerDan McGee <dan@archlinux.org>2010-07-07 14:25:55 +0200
commit68dcabdfbeadc43c74eccf395a9f04565c5d682e (patch)
treefac209275fe38058b97f8b896581ab5b560a4f32 /lib/libalpm
parent60de8ec932984f1374501c3f11ad1bcfba5c7d5c (diff)
downloadpacman-68dcabdfbeadc43c74eccf395a9f04565c5d682e.tar.gz
pacman-68dcabdfbeadc43c74eccf395a9f04565c5d682e.tar.xz
Remove DBEXT usage
With commit 5dffef78, the repo database always has a symlink of the form reponame.db. Use that filename and let libarchive determine the compression type. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/be_files.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libalpm/be_files.c b/lib/libalpm/be_files.c
index 666bb7e8..e2bbe287 100644
--- a/lib/libalpm/be_files.c
+++ b/lib/libalpm/be_files.c
@@ -231,9 +231,9 @@ int SYMEXPORT alpm_db_update(int force, pmdb_t *db)
RET_ERR(PM_ERR_DB_NOT_FOUND, -1);
}
- len = strlen(db->treename) + strlen(DBEXT) + 1;
+ len = strlen(db->treename) + 4;
MALLOC(dbfile, len, RET_ERR(PM_ERR_MEMORY, -1));
- sprintf(dbfile, "%s" DBEXT, db->treename);
+ sprintf(dbfile, "%s.db", db->treename);
dbpath = alpm_option_get_dbpath();
@@ -253,9 +253,9 @@ int SYMEXPORT alpm_db_update(int force, pmdb_t *db)
syncdbpath = _alpm_db_path(db);
/* form the path to the db location */
- len = strlen(dbpath) + strlen(db->treename) + strlen(DBEXT) + 1;
+ len = strlen(dbpath) + strlen(db->treename) + 4;
MALLOC(dbfilepath, len, RET_ERR(PM_ERR_MEMORY, -1));
- sprintf(dbfilepath, "%s%s" DBEXT, dbpath, db->treename);
+ sprintf(dbfilepath, "%s%s.db", dbpath, db->treename);
if(force) {
/* if forcing update, remove the old dir and extract the db */