severity 718411 important tags 718411 + patch quit Steve Cotton wrote:
> While upgrading git, the preinst script has created this odd symlink: > > lrwxrwxrwx 1 root root 17 Jul 31 11:23 /var/lib/git/* -> ../../cache/git/* Thanks for noticing, and sorry I didn't catch this before the upload. Here's a quick fix (untested). diff --git i/debian/changelog w/debian/changelog index 0341d43..7aef95d 100644 --- i/debian/changelog +++ w/debian/changelog @@ -1,3 +1,13 @@ +git (1:1.8.4~rc0-1.1) unstable; urgency=low + + * debian/git.preinst: + * check that the symlink target in /var/cache/git/* exists + before creating a symlink from /var/lib/git/ (closes: #718411). + * remove spurious '/var/lib/git/*' symlink from the upgrade + to 1:1.8.4~rc0-1. + + -- Jonathan Nieder <jrnie...@gmail.com> Wed, 31 Jul 2013 11:57:34 -0700 + git (1:1.8.4~rc0-1) unstable; urgency=low * new upstream release candidate. diff --git i/debian/git.preinst w/debian/git.preinst index 0477607..469c614 100644 --- i/debian/git.preinst +++ w/debian/git.preinst @@ -8,6 +8,10 @@ if test "$1" = upgrade && ( cd /var/lib/git for target in ../../cache/git/*; do + if ! test -L "$target" && ! test -e "$target"; then + continue + fi + link=${target#../../cache/git/} if ! test -L "$link" && ! test -e "$link"; then ln -s "$target" "$link" @@ -16,6 +20,18 @@ if test "$1" = upgrade && ) fi +# A previous version of the /var/lib/git/ transition code +# would sometimes leave behind a symlink +# '/var/lib/git/*' -> '../../cache/git/*' (oops). Clean up. +if test "$1" = upgrade && + dpkg --compare-versions "$2" lt-nl '1:1.8.4~rc0-2' && + test -L '/var/lib/git/*'; then + target=$(readlink '/var/lib/git/*') + if test "$target" = '../../cache/git/*'; then + rm -f '/var/lib/git/*' + fi +fi + # Snippet based on dpkg-maintscript-helper from dpkg 1.15.8. # Postinst explains why. rm_conffile () { -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org