juju/juju — pull request #1136 by axw (2014-11-14 03:42:08+00:00)
Title: worker/uniter/context/jujuc: symlink tools to correct destination

Hook tools were being symlinked to the unit-specific tools symlink
when the first unit was deployed. This causes problems when that
unit is destroyed, and another unit of the same service remains;
the symlinks remain broken.

We change EnsureSymlinks to dereference the target destination if
it is a symlink.

(backport to 1.21)

Fixes https://bugs.launchpad.net/juju-core/+bug/1391645