[pacman-dev] File/Path locations

Kevin Piche kevin.piche at cgi.com
Mon Jul 16 14:28:13 EDT 2007


On Fri, 2007-07-13 at 14:19 -0400, Dan McGee wrote:
> On 7/13/07, Aaron Griffin <aaronmgriffin at gmail.com> wrote:
> > On 6/19/07, Andrew Fyfe <andrew at neptune-one.net> wrote:
> > > Dan McGee wrote:
> > > > On 6/4/07, Andrew Fyfe <andrew at neptune-one.net> wrote:
> > > >> 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
> > > >
> > > > This is a reply to the whole email, but I wanted to highlight stuff
> > > > from above. This is no longer the case- I just eliminated this
> > > > behavior. Every path is independent of the others. ROOTDIR is
> > > > *completely* seperate now.
> > >
> > > Sorry this is still bugging me, having to type 'pacman -r ... -b ... -c
> > > ...' is a pain in the ass. 99% of the time when I'm using 'pacman -r' I
> > > want the same fs layout with a different root dir prefix. Am I the only
> > > one that uses 'pacman -r' like this most of the time.
> >
> > I actually might agree with Andrew here.  Usually when I use -r, it's
> > like "hey lets install bash in my homedir" or "lets make a chroot dir
> > that I can use later".  I want to use everything else the parent
> > system has, as far as cache and configs go.
> >
> > I dunno, what are all the use cases for using -r?  Can someone list a
> > use case where specifying all dirs is common?
> 
> Well my original thought was flexibility. Before you couldn't do some
> things that you can do now. Examples:
> 1. I want to build a chroot without doing crazy rsync/hardlinking of
> the pacman cache directory.
> 2. I want to make a more secure chroot. I don't want the pacman DB,
> cached packages, or the logfile in the actual chroot.
> 
> And before I made all these changes, I found it odd that the logfile
> was always specified with an absolute path but nothing else was.
> 
> To be honest, I'm not sure of all the use cases of --root. If anyone
> wants to chime in on this it would be appreciated.
> 
> -Dan
> 
> _______________________________________________
> pacman-dev mailing list
> pacman-dev at archlinux.org
> http://archlinux.org/mailman/listinfo/pacman-dev

Dan,

Your item #1 can easily be accomplished using mount:  mount
--bind /var/cache/pacman/pkg chroot/var/cache/pacman/pkg

Don't forget to unmount before cleaning out your chroot environment!  :)

IMHO -r should change all paths for general usage and the flexibility of
Dan's approach would allow single paths to be overridden.

k




More information about the pacman-dev mailing list