[pacman-dev] difficult symlink "puzzle"

Andrew Fyfe andrew at neptune-one.net
Sun Jul 8 15:52:48 EDT 2007


Andrew Fyfe wrote:
> Xavier wrote:
>> I'm just realizing there are many odd cases I didn't consider, eg
>> extracting a directory when a file already exists on the filesystem.
>> Using only NO_OVERWRITE, the directory will never be extracted,
>> while with the behavior above, it would be extracted.
> I forgot about this as well, I need to go do a little more testing :)
> 

Without NO_OVERWRITE it always overwrites (DUH :P),

pkg = file/dir in package
fs = file/dir on filesystem

if isfile(pkg) && isdir(fs) then skip
if isdir(pkg) && isfile(fs) then extract

Does that look ok or should we skip on both cases?

Andrew




More information about the pacman-dev mailing list