Historical bug tracker for the Pacman package manager.
The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues
This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues
This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
FS#9096 - CacheDir regression from 3.0
Attached to Project:
Pacman
Opened by Jens Adam (byte) - Friday, 04 January 2008, 22:16 GMT
Last edited by Xavier (shining) - Sunday, 06 January 2008, 11:10 GMT
Opened by Jens Adam (byte) - Friday, 04 January 2008, 22:16 GMT
Last edited by Xavier (shining) - Sunday, 06 January 2008, 11:10 GMT
|
DetailsI recently discovered the joy of setting CacheDir to my external hdd mountpoint. That's eliminating quite a lot of duplicate downloads I had been doing before.
With 3.0 it would simply create its own CacheDir when it doesn't exist (hd not mounted), which was okay for me. With the current -git, it would exit. Maybe it's okay, though I prefer the old behaviour. But the real reason to whip up this bug, is that it even fails because of the non-existing cachedir, when I want to install a local package with -U. Is there some logic to this which I'm missing? |
This task depends upon
Closed by Xavier (shining)
Sunday, 06 January 2008, 11:10 GMT
Reason for closing: Fixed
Additional comments about closing: fixed in git.
Sunday, 06 January 2008, 11:10 GMT
Reason for closing: Fixed
Additional comments about closing: fixed in git.
But I agree the current behavior is a bit strange:
if a specified cachedir doesn't exist, pacman just fail
if no cachedir are specified, pacman will try to add the default one, /var/cache/pacman/pkg . But if this directory doesn't exist, the alpm_option_add_cachedir won't add it, and pacman will go on anyway, with an empty cachedir list (however, when the cachedir is actually needed, libalpm can fallback on /tmp)
And when the cachedir is actually needed (_alpm_filecache_setup function), it'll attempt to create the cachedir directories it they don't exist.
But this code is not reachable, since only existing directories can be added to the cachedir list using the alpm_option_add_cachedir function.
So either the directory creation in _alpm_filecache_setup could be removed, because it isn't used. Or the directory check in alpm_option_add_cachedir could be removed, because the directory can be created later by _alpm_filecache_setup.