[pacman-dev] difficult symlink "puzzle"

Xavier shiningxc at gmail.com
Wed Jul 4 10:29:35 EDT 2007


2007/7/4, ngaba at petra.hos.u-szeged.hu <ngaba at petra.hos.u-szeged.hu>:
> OK, let me explain (again.-):
> We have a theoretical coolplayer package, which have the following
> naming scheme: /usr/lib/coolplayer/2.0/ ... and also have a
> /usr/lib/coolplayer/current symlink, which points to 2.0. Package
> coolplugin installs a file to /usr/lib/coolplayer/current (so to
> /usr/lib/coolplayer/2.0). pacman -S updates coolplayer 2.0 to 2.1,
> which is a remove then install process. So the symlink
> /usr/lib/coolplayer/current is deleted and then set to 2.1 dir. And now
> the content of coolplugin is in /usr/lib/coolplayer/2.0, the package is
> broken, some files are out of pacman's control!
> Bye, ngaba
>

Ok, I see what you mean now.
But having a package that does this is just silly. If a package
contains a symlink where other packages (like plugins) put files, then
that symlink shouldn't be changed, otherwise it'll indeed break
things.
I'm not sure there are situations where this is absolutely needed. But
if this happens, then it can be up to the package to fix it itself,
for example via the install scriptlet.
Similarly to when an user makes a symlink /opt/ -> /usr/local/ , and
later removes that symlink, he has to moves back all the files that
were installed in /usr/local/ to /opt/ again.

Now, maybe pacman should still handle that kind of situation, but I
think that problem is more unusual and less critical than the other
(overwriting symlinks).




More information about the pacman-dev mailing list