summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2010-06-04 00:10:50 +1000
committerDan McGee <dan@archlinux.org>2010-07-07 07:25:55 -0500
commit68dcabdfbeadc43c74eccf395a9f04565c5d682e (patch)
treefac209275fe38058b97f8b896581ab5b560a4f32
parent60de8ec932984f1374501c3f11ad1bcfba5c7d5c (diff)
downloadpacman-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>
-rw-r--r--configure.ac9
-rw-r--r--lib/libalpm/be_files.c8
-rw-r--r--scripts/Makefile.am1
-rw-r--r--scripts/rankmirrors.sh.in2
-rwxr-xr-xtest/pacman/pmdb.py2
-rwxr-xr-xtest/pacman/pmtest.py2
-rwxr-xr-xtest/pacman/util.py1
7 files changed, 7 insertions, 18 deletions
diff --git a/configure.ac b/configure.ac
index 7d4e60f8..80dd7c2d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -83,11 +83,6 @@ AC_ARG_WITH(src-ext,
AS_HELP_STRING([--with-src-ext=ext], [set the file extension used by source packages]),
[SRCEXT=$withval], [SRCEXT=.src.tar.gz])
-# Help line for database extension
-AC_ARG_WITH(db-ext,
- AS_HELP_STRING([--with-db-ext=ext], [set the file extension used by the database]),
- [DBEXT=$withval], [DBEXT=.db.tar.gz])
-
# Help line for buildscript filename
AC_ARG_WITH(buildscript,
AS_HELP_STRING([--with-buildscript=name], [set the build script name used by makepkg]),
@@ -338,9 +333,6 @@ AC_DEFINE_UNQUOTED([PKGEXT], "$PKGEXT", [The file extension used by pacman packa
# Set source package file extension
AC_SUBST(SRCEXT)
AC_DEFINE_UNQUOTED([SRCEXT], "$SRCEXT", [The file extension used by pacman source packages])
-# Set database file extension
-AC_SUBST(DBEXT)
-AC_DEFINE_UNQUOTED([DBEXT], "$DBEXT", [The file extension used by pacman databases])
# Set makepkg build script name
AC_SUBST(BUILDSCRIPT)
AC_DEFINE_UNQUOTED([BUILDSCRIPT], "$BUILDSCRIPT", [The build script name used by makepkg])
@@ -393,7 +385,6 @@ ${PACKAGE_NAME}:
root working directory : ${ROOTDIR}
package extension : ${PKGEXT}
source pkg extension : ${SRCEXT}
- database extension : ${DBEXT}
build script name : ${BUILDSCRIPT}
Compilation options:
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 */
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 0fde3345..31e8fb5d 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -38,7 +38,6 @@ edit = sed \
-e 's|@PACKAGE_VERSION[@]|$(REAL_PACKAGE_VERSION)|g' \
-e 's|@PACKAGE_BUGREPORT[@]|$(PACKAGE_BUGREPORT)|g' \
-e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \
- -e 's|@DBEXT[@]|$(DBEXT)|g' \
-e 's|@BUILDSCRIPT[@]|$(BUILDSCRIPT)|g' \
-e 's|@SIZECMD[@]|$(SIZECMD)|g' \
-e 's|@SEDINPLACE[@]|$(SEDINPLACE)|g' \
diff --git a/scripts/rankmirrors.sh.in b/scripts/rankmirrors.sh.in
index b0dc1ab7..0cd4c083 100644
--- a/scripts/rankmirrors.sh.in
+++ b/scripts/rankmirrors.sh.in
@@ -85,7 +85,7 @@ getfetchurl() {
if [[ -z $reponame || $reponame = $replacedurl ]]; then
echo "fail"
else
- local fetchurl="${replacedurl}/$reponame@DBEXT@"
+ local fetchurl="${replacedurl}/$reponame.db"
echo "$fetchurl"
fi
}
diff --git a/test/pacman/pmdb.py b/test/pacman/pmdb.py
index 8cb1b832..41bd7384 100755
--- a/test/pacman/pmdb.py
+++ b/test/pacman/pmdb.py
@@ -344,7 +344,7 @@ class pmdb:
# Generate database archive
mkdir(path)
- archive = os.path.join(path, "%s%s" % (self.treename, PM_EXT_DB))
+ archive = os.path.join(path, "%s.db" % (self.treename))
tar = tarfile.open(archive, "w:gz")
for root, dirs, files in os.walk('.'):
for d in dirs:
diff --git a/test/pacman/pmtest.py b/test/pacman/pmtest.py
index f2b96760..b1d778e1 100755
--- a/test/pacman/pmtest.py
+++ b/test/pacman/pmtest.py
@@ -149,7 +149,7 @@ class pmtest:
vprint(" Creating sync database archives")
for key, value in self.db.iteritems():
if key == "local": continue
- archive = value.treename + PM_EXT_DB
+ archive = value.treename + ".db"
vprint("\t" + os.path.join(SYNCREPO, archive))
value.gensync(os.path.join(syncdir, value.treename))
diff --git a/test/pacman/util.py b/test/pacman/util.py
index e01a3b8f..657230ee 100755
--- a/test/pacman/util.py
+++ b/test/pacman/util.py
@@ -28,7 +28,6 @@ PM_DBPATH = "var/lib/pacman"
PM_LOCK = "var/lib/pacman/db.lck"
PM_CACHEDIR = "var/cache/pacman/pkg"
PM_EXT_PKG = ".pkg.tar.gz"
-PM_EXT_DB = ".db.tar.gz"
PM_PACNEW = ".pacnew"
PM_PACORIG = ".pacorig"
PM_PACSAVE = ".pacsave"