replaced hardcoded references to the cache by CACHEDIR
This commit is contained in:
parent
3b229d3a1a
commit
e010e1bba6
1 changed files with 5 additions and 2 deletions
|
@ -69,9 +69,12 @@ static int sync_cleancache(int level)
|
|||
list_t *cache = NULL;
|
||||
list_t *clean = NULL;
|
||||
list_t *i, *j;
|
||||
char dirpath[PATH_MAX];
|
||||
|
||||
snprintf(dirpath, PATH_MAX, "%s"CACHEDIR, root);
|
||||
|
||||
printf("removing old packages from cache... ");
|
||||
dir = opendir("/var/cache/pacman/pkg");
|
||||
dir = opendir(dirpath);
|
||||
if(dir == NULL) {
|
||||
fprintf(stderr, "error: could not access cache directory\n");
|
||||
return(1);
|
||||
|
@ -688,7 +691,7 @@ int pacman_sync(list_t *targets)
|
|||
group sync records by repository and download */
|
||||
|
||||
alpm_get_option(PM_OPT_ROOT, (long *)&root);
|
||||
snprintf(ldir, PATH_MAX, "%svar/cache/pacman/pkg", root);
|
||||
snprintf(ldir, PATH_MAX, "%s"CACHEDIR, root);
|
||||
|
||||
while(!done) {
|
||||
if(current) {
|
||||
|
|
Loading…
Add table
Reference in a new issue