diff options
author | Judd Vinet <judd@archlinux.org> | 2005-10-20 20:44:14 +0000 |
---|---|---|
committer | Judd Vinet <judd@archlinux.org> | 2005-10-20 20:44:14 +0000 |
commit | feb152d78c60731df19eb0041e0d22494afe9e09 (patch) | |
tree | 54b941bb9b574afa338a34e48bf120cec46e3b54 /src/pacman/conf.c | |
parent | 86ec3a2ad78fd38bf057a34fc1115c3f426d2f53 (diff) |
added a default cachedir
Diffstat (limited to 'src/pacman/conf.c')
-rw-r--r-- | src/pacman/conf.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/pacman/conf.c b/src/pacman/conf.c index cf3ca9c6..a62ef609 100644 --- a/src/pacman/conf.c +++ b/src/pacman/conf.c @@ -35,6 +35,7 @@ #define min(X, Y) ((X) < (Y) ? (X) : (Y)) extern char *pmo_dbpath; +extern char *pmo_cachedir; extern list_t *pmo_holdpkg; extern char *pmo_proxyhost; extern unsigned short pmo_proxyport; @@ -214,6 +215,14 @@ int parseconfig(char *file) FREE(pmo_dbpath); pmo_dbpath = strdup(ptr); vprint("config: dbpath: %s\n", ptr); + } else if(!strcmp(key, "CACHEDIR")) { + /* shave off the leading slash, if there is one */ + if(*ptr == '/') { + ptr++; + } + FREE(pmo_cachedir); + pmo_cachedir = strdup(ptr); + vprint("config: cachedir: %s\n", ptr); } else if (!strcmp(key, "LOGFILE")) { if(alpm_set_option(PM_OPT_LOGFILE, (long)ptr) == -1) { ERR(NL, "failed to set option LOGFILE (%s)\n", alpm_strerror(pm_errno)); |