Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src/pacman/pacman.c
diff options
context:
space:
mode:
authorJudd Vinet <judd@archlinux.org>2005-10-20 20:44:14 +0000
committerJudd Vinet <judd@archlinux.org>2005-10-20 20:44:14 +0000
commitfeb152d78c60731df19eb0041e0d22494afe9e09 (patch)
tree54b941bb9b574afa338a34e48bf120cec46e3b54 /src/pacman/pacman.c
parent86ec3a2ad78fd38bf057a34fc1115c3f426d2f53 (diff)
added a default cachedir
Diffstat (limited to 'src/pacman/pacman.c')
-rw-r--r--src/pacman/pacman.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 00be4b83..f5b0e152 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -51,6 +51,7 @@
/* command line options */
char *pmo_root = NULL;
char *pmo_dbpath = NULL;
+char *pmo_cachedir = NULL;
char *pmo_configfile = NULL;
unsigned short pmo_op = PM_OP_MAIN;
unsigned short pmo_verbose = 0;
@@ -174,6 +175,9 @@ int main(int argc, char *argv[])
if(pmo_dbpath == NULL) {
pmo_dbpath = strdup("var/lib/pacman");
}
+ if(pmo_cachedir == NULL) {
+ pmo_cachedir = strdup("var/cache/pacman");
+ }
/* set library parameters */
if(alpm_set_option(PM_OPT_LOGMASK, (long)pmo_debug) == -1) {
@@ -188,6 +192,10 @@ int main(int argc, char *argv[])
ERR(NL, "failed to set option DBPATH (%s)\n", alpm_strerror(pm_errno));
cleanup(1);
}
+ if(alpm_set_option(PM_OPT_CACHEDIR, (long)pmo_cachedir) == -1) {
+ ERR(NL, "failed to set option CACHEDIR (%s)\n", alpm_strerror(pm_errno));
+ cleanup(1);
+ }
if(pmo_verbose > 1) {
printf("Root : %s\n", pmo_root);