[pacman-dev] difficult symlink "puzzle"

Nagy Gabor ngaba at petra.hos.u-szeged.hu
Fri Jun 29 05:33:09 EDT 2007


Hi!
I ran into a difficult problem:
What about symlink directories, if an other package wants to pull some
new files to them?
Let me explain with an example:
See packages git (it contains: /usr/lib/perl5/site_perl/5.8.8/Git.pm).
However, /usr/lib/perl5/site_perl/5.8.8/ is a symlink
to /usr/lib/perl5/site_perl/current/. What should the package manager
do here?
The current situation: git package simply
overwrites /usr/lib/perl5/site_perl/5.8.8/ symlink with a regular
directory, so the dir 5.8.8 contains only git.pm now :-(
If we install git first then perl's install script cannot do
anything useful with the existing 5.8.8 dir: result is the same :-(
The problem main problem, that currently I cannot solve this
problem: if pacman treated the 5.8.8 symlink as an existing dir (in the
first example), then Git.pm would be copied to current, which easily
can run out of pacman's control (if the 5.8.8 symlink will be deleted
later with a forced -Rd perl).
It's hard to find a good solution imho, pacman should follow dir
symlink during package install, and something should be recorded into db
(to FILES: 5.8.8/file->current/file), but the precise handling of this
would cause big overhead, and is not easy...
Bye, ngaba




More information about the pacman-dev mailing list