mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-10 11:35:00 -05:00
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>
This commit is contained in:
parent
60de8ec932
commit
68dcabdfbe
@ -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:
|
||||
|
@ -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 */
|
||||
|
@ -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' \
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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:
|
||||
|
@ -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))
|
||||
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user