[pacman-dev] difficult symlink "puzzle"

Andrew Fyfe andrew at neptune-one.net
Tue Jul 3 16:52:12 EDT 2007


Ok how about this (see the attached code snippet).

_alpm_add_commit() is a BIG function, the code attached only shows the 
for loop for extracting the files and I've cut out the code for checking 
backups().

I've used the behaviour for dpkg as a bases for what we should do...

     *                   Install non-dir   Install symlink   Install dir
     *  Exists not               X               X                X
     *  File/node/symlink       LXR             LXR              BXR
     *  Directory               BXR              -                -
     *
     *    X: extract file/node/link/directory
     *   LX: atomic overwrite leaving backup
     *    B: ordinary backup
     *    R: later remove from other packages' lists
     *    -: do nothing

Before I try splicing this into _alpm_add_commit() does this look right? 
Does it cover all the bases?

Andrew
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: _alpm_add_commit.c
URL: <http://archlinux.org/pipermail/pacman-dev/attachments/20070703/e9ac54be/attachment.diff>


More information about the pacman-dev mailing list