From 7bd2ff685188d0d9b6ab6c6f43f6d28811936881 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 31 May 2007 02:51:28 -0400 Subject: Move DB and cache dirs away from there dependence on ROOTDIR This change allows us to use all autoconf specified paths, most notably $(localstatedir). It is quite a change and touches a lot of files, as all references to the DB and cache were done with the ROOTDIR as a prefix. * add --lock command-line option to pacman to specify the location of the lockfile (this can now be specified at configure time by setting the $localstatedir path). * Rip quite a few settings out of configure.ac as they are now picked by setting the paths during configure or make. * Fix bug with /tmp fallback for sync downloads not working correctly (related to root location, now the system tmp dir is used). * Simplified the parameters to some libalpm functions, and added get/set for the new lockfile option. * Renamed several of the DEFS to names without the PM_ prefix. Signed-off-by: Dan McGee --- lib/libalpm/package.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/libalpm/package.c') diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c index d3547dfb..99ce92b8 100644 --- a/lib/libalpm/package.c +++ b/lib/libalpm/package.c @@ -502,7 +502,7 @@ int _alpm_pkg_splitname(const char *target, char *name, char *version, int witha } strncpy(tmp, t, PKG_FULLNAME_LEN+7); /* trim file extension (if any) */ - if((p = strstr(tmp, PM_EXT_PKG))) { + if((p = strstr(tmp, PKGEXT))) { *p = '\0'; } @@ -589,10 +589,10 @@ const char SYMEXPORT *alpm_pkg_get_filename(pmpkg_t *pkg) _alpm_db_read(pkg->data, pkg, INFRQ_DESC); } if(pkg->arch && strlen(pkg->arch) > 0) { - snprintf(pkg->filename, PKG_FILENAME_LEN, "%s-%s-%s" PM_EXT_PKG, + snprintf(pkg->filename, PKG_FILENAME_LEN, "%s-%s-%s" PKGEXT, pkg->name, pkg->version, pkg->arch); } else { - snprintf(pkg->filename, PKG_FILENAME_LEN, "%s-%s" PM_EXT_PKG, + snprintf(pkg->filename, PKG_FILENAME_LEN, "%s-%s" PKGEXT, pkg->name, pkg->version); } } -- cgit v1.2.3-24-g4f1b