Symlinks in juju-core
John Arbash Meinel
john at arbash-meinel.com
Thu Feb 7 18:08:34 UTC 2013
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 2013-02-07 21:56, roger peppe wrote:
> ISTR adding the symlinks, and i'm pretty sure that was because some
> things use the default series when deploying testing charms.
>
> maybe it's no longer true. i'd be happy to avoid all use of
> symlinks in our code base.
>
> next up: appropriate use of path/filepath :-)
So I think we need to do a little bit of supporting symlinks, because
charms like to use them to create the same hook via a different name.
However, we can minimize it outside of that part.
In doing "grep -rnI 'Charms.[A-Z]'" I see exactly 1 place that doesn't
pass exactly "series" to a testing.Charms function, and that is:
environs/jujutest/livetests.go
Which passes mtools0.Series. Which at first glance could matter,
except all of those directories are symlinks anyway. And ClonedURL
already is copying into a target directory. So we could just encode
knowledge of that into Charms itself. So it copies to the temporary
directory adding the requested series name.
I'll put together a patch that just removes the outer symlinks and
then updates testing.Charms to remove the series parameter for
everything that we aren't actually making use of. (I'll leave the
copy-a-new-one functions taking a series parameter which is the target
series.)
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlET7aIACgkQJdeBCYSNAANvFwCgqGfKOAwq+GrnV82dWaCPZXHZ
OosAn2nGYkRjQIW+JfB3ok2Ozo2bnpYx
=1Kr7
-----END PGP SIGNATURE-----
More information about the Juju-dev
mailing list