From 68dcabdfbeadc43c74eccf395a9f04565c5d682e Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Fri, 4 Jun 2010 00:10:50 +1000 Subject: 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 Signed-off-by: Dan McGee --- lib/libalpm/be_files.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib') 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 */ -- cgit v1.2.3-24-g4f1b