FS#7329 - Root directory no longer prefixed to db/cache paths
Attached to Project:
Pacman
Opened by Andrew Fyfe (space-m0nkey) - Friday, 01 June 2007, 04:38 GMT
Last edited by Roman Kyrylych (Romashka) - Thursday, 28 June 2007, 09:27 GMT
Opened by Andrew Fyfe (space-m0nkey) - Friday, 01 June 2007, 04:38 GMT
Last edited by Roman Kyrylych (Romashka) - Thursday, 28 June 2007, 09:27 GMT
|
Details
When using `pacman -r <dir> ...` the root directory is
no longer prefixed to the database/cache directories. e.g.
(/tmp/foo is an empty folder)
$ sudo src/pacman/pacman.static -v -r /tmp/foo -A filesystem-0.8-8.pkg.tar.gz Root : /tmp/foo/ Conf File : /etc/pacman.conf Lock File : /var/run/pacman.lck Root : /tmp/foo/ DBPath : /var/lib/pacman/ CacheDir : /var/cache/pacman/pkg/ Targets : filesystem-0.8-8.pkg.tar.gz error: failed to add target 'filesystem-0.8-8.pkg.tar.gz' (package already installed) Reported Version: git |
This task depends upon
pacman -r /foo
Root = /foo
DB = /foo/var/lib/pacman
Cache = /foo/var/cache/pacman
Lock File = /foo/var/run/pacman.lck
Config = /foo/etc/pacman.conf
pacman -r /foo --cachedir /var/cache/pacman --config /etc/pacman.conf
Root = /foo
DB = /foo/var/lib/pacman
Cache = /var/cache/pacman
Lock File = /foo/var/run/pacman.lck
Config = /etc/pacman.conf
My reasoning was this- why should we make the decision where the cache, lockfile, and db lie when that is up to the user? The old way did not permit these three things to lie outside the root directory, the new way does (and still permits the old behavior). Having different behavior between the defaults (with a root prefix) and command line (w/o a root prefix) would be confusing and not KISS.
In short- the old way made assumptions that I thought were unfounded, so I removed them and now let the user choose everything.