Hi,

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:

https://github.com/The-Compiler/pkgbuild/blob/master/agendav/PKGBUILD

diff to the broken version:
https://github.com/The-Compiler/pkgbuild/commit/f5af712f76a7ed5d0869130f1f7f9da69541462b

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
  /etc/webapps/foo.pacnew
- /usr/share/webapps/foo is now the (correct) symlink to
  /etc/webapps/foo
- The user config in /usr/share/webapps/foo got overwritten by that
  symlink without a .pacnew or .pacsav (why? Is there something I did
  wrong?).

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

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.

Thanks,

Florian

-- 
http://www.the-compiler.org | [email protected] (Mail/XMPP)
   GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc
         I love long mails! | http://email.is-not-s.ms/

Attachment: pgpXuSVuJ07p4.pgp
Description: PGP signature

Reply via email to