juju/juju — pull request #1126 by axw (2014-11-13 07:20:21+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.

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