diff options
author | Dan McGee <dan@archlinux.org> | 2007-06-04 20:50:16 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-06-09 19:03:25 +0200 |
commit | 35a794c2ed4da7da44d3a04794fc90615e7c52e7 (patch) | |
tree | 75fd2667a69867795f6a32cc9bb1dc7d505e2004 /src/pacman/sync.c | |
parent | b6f3fe6957d0206485eac98fb2120578b75d0058 (diff) | |
download | pacman-35a794c2ed4da7da44d3a04794fc90615e7c52e7.tar.gz pacman-35a794c2ed4da7da44d3a04794fc90615e7c52e7.tar.xz |
Allow multiple CacheDirs to be specified
This should hopefully allow multiple cache dirs to be specified in
pacman.conf and/or on the command line, and allow pacman to test
each one for the package file. The first one found to be writeable is
used as the download cache.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/pacman/sync.c')
-rw-r--r-- | src/pacman/sync.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pacman/sync.c b/src/pacman/sync.c index fa99797c..8d810f83 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -89,7 +89,9 @@ static int split_pkgname(char *target, char *name, char *version) static int sync_cleancache(int level) { - const char *cachedir = alpm_option_get_cachedir(); + /* TODO for now, just mess with the first cache directory */ + alpm_list_t* cachedirs = alpm_option_get_cachedirs(); + const char *cachedir = alpm_list_getdata(cachedirs); if(level == 1) { /* incomplete cleanup: we keep latest packages and partial downloads */ |