[pacman-dev] File/Path locations

Andrew Fyfe andrew at neptune-one.net
Mon Jun 4 19:26:58 EDT 2007


At the moment the file/path locations and where/how they are set is a 
bit of a mess, here's the idea I propose...

Default locations set by configure:
	Root Dir  : /
	DB Path   : $localstatedir/lib/pacman
	Cache Dir : $localstatedir/cache/pacman/pkg

	Lock File : $localstatedir/run/pacman.lck
	Cfg File  : $sysconfigdir/pacman.conf

	Pkg Ext   : .pkg.tar.gz
	DB Ext    : .db.tar.gz
	Source Ext: .src.tar.gz

Where locations are set/overridden:
	Hard Code into pacman/scripts:
		- Cfg File
	Set in pacman.conf:
		- DB Path
		- Cache Dir
		- Lock File
		- {Pkg,DB,Source} Ext
	Override on cmd line:
		- Root Dir
		- DB Path
		- Cache Dir
		- Cfg File

Default behaviour for 'pacman --root'
pacman --root /foobar
	Root Dir  : /foobar
	DB Path   : /foobar/$localstatedir/lib/pacman
	Cache Dir : /foobar/$localstatedir/cache/pacman/pkg

	Lock File : /foobar/$localstatedir/run/pacman.lck
	Cfg File  : /foobar/$sysconfigdir/pacman.conf



Also to make the paths/locations available to scripts we could use 
iniread[1] written by James Rayner eg

--- pacman.conf
	[options]
	dbpath = /var/lib/pacman

--- makepkg.conf
	DBPATH=$(iniread /etc/pacman.conf options:dbpath)



Thoughts, comments and ideas welcome.

Andrew

[1]http://tinyurl.com/2ex7du




More information about the pacman-dev mailing list