[aur-general] Fixing a package with broken config symlinks

Florian Bruhin me at the-compiler.org
Wed Jun 3 07:28:44 UTC 2015


I inherited a package (agendav) for a webapplication which had the
config symlinking backwards. This means:

- The real config files were installed into /usr/share/webapps/foo
- /etc/webapps/foo is a symlink to /usr/share/webapps/foo
- backup=() in the PKGBUILD only lists etc/webapps/foo

I'd like to correct this situation in an update, but that update will
of course overwrite /usr/share/webapps/foo with the new version (i.e.
the new symlink) and nuke the user's current config.

I tried adding both the etc/ and the old usr/share path to backup=()
in the hope that pacman would create a .pacsav on update, but that
didn't help:


diff to the broken version:

Currently when I update, this happens:

- /etc/webapps/foo is a broken symlink because it links to
  /usr/share/webapps/foo (which now links to /etc/webapps/foo).
- The template config from the package is installed to
- /usr/share/webapps/foo is now the (correct) symlink to
- The user config in /usr/share/webapps/foo got overwritten by that
  symlink without a .pacnew or .pacsav (why? Is there something I did

Is there any way I could fix this mess without deleting the user's

If you want to experiment, you can get the current broken version (-2)
from the AUR, and the "fixed" one (-3) from the git repo above.



http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP)
   GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc
         I love long mails! | http://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.archlinux.org/pipermail/aur-general/attachments/20150603/52d98a15/attachment.asc>

More information about the aur-general mailing list