index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Aurelien Foret <aurelien@archlinux.org> | 2005-10-10 20:41:35 +0000 |
---|---|---|
committer | Aurelien Foret <aurelien@archlinux.org> | 2005-10-10 20:41:35 +0000 |
commit | 609466fdeb614c8a7a7bb6b5e9921d2fd2fde17f (patch) | |
tree | 95dca1525ffc5ab45ca877f6f6c78f51c9f31efd /lib/libalpm/handle.c | |
parent | b817883cddb8817f49e234d321af289c1e4f68b8 (diff) |
-rw-r--r-- | lib/libalpm/handle.c | 8 |
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c index 8567b87d..568f0d28 100644 --- a/lib/libalpm/handle.c +++ b/lib/libalpm/handle.c @@ -109,6 +109,13 @@ int handle_set_option(pmhandle_t *handle, unsigned char val, unsigned long data) handle->dbpath = strdup((data && strlen((char *)data) != 0) ? (char *)data : PM_DBPATH); _alpm_log(PM_LOG_FLOW2, "PM_OPT_DBPATH set to '%s'", handle->dbpath); break; + case PM_OPT_CACHEDIR: + if(handle->cachedir) { + FREE(handle->cachedir); + } + handle->cachedir = strdup((data && strlen((char *)data) != 0) ? (char *)data : PM_CACHEDIR); + _alpm_log(PM_LOG_FLOW2, "PM_OPT_CACHEDIR set to '%s'", handle->cachedir); + break; case PM_OPT_LOGFILE: if((char *)data == NULL || handle->uid != 0) { return(0); @@ -194,6 +201,7 @@ int handle_get_option(pmhandle_t *handle, unsigned char val, long *data) switch(val) { case PM_OPT_ROOT: *data = (long)handle->root; break; case PM_OPT_DBPATH: *data = (long)handle->dbpath; break; + case PM_OPT_CACHEDIR: *data = (long)handle->cachedir; break; case PM_OPT_LOCALDB: *data = (long)handle->db_local; break; case PM_OPT_SYNCDB: *data = (long)handle->dbs_sync; break; case PM_OPT_LOGFILE: *data = (long)handle->logfile; break; |