Bundletester creates tmp charm dirs, which seem to be where stuff like proof, lint, and test are run. If charms include a namespace or series in their bundle definition, BT normalizes that name to chop off the cs:~foo/bar prefix. If charms do something like cs:bar, BT does not do that normalization:
When I check the bundletester temp dirs, here's what I see:
$ ls /tmp/tmp*
/tmp/tmpRvITS_:
zookeeper
/tmp/tmpz86CBO:
cs:ubuntu
That /tmp/tmpz86CBO/cs:ubuntu dir name is a problem for stuff like tox, which tries to fire up a venv:
ubuntu@e9b7c2b12a9a:/tmp/tmpz86CBO/cs:ubuntu$ virtualenv ohnoes
Running virtualenv with interpreter /usr/bin/python2
New python executable in /tmp/tmpz86CBO/cs:ubuntu/ohnoes/bin/python2
Also creating executable in /tmp/tmpz86CBO/cs:ubuntu/ohnoes/bin/python
ImportError: No module named site
ERROR: The executable /tmp/tmpz86CBO/cs:ubuntu/ohnoes/bin/python2 is not functioning
ERROR: It thinks sys.prefix is u'/tmp/tmpz86CBO/cs:ubuntu' (should be u'/tmp/tmpz86CBO/cs:ubuntu/ohnoes')
ERROR: virtualenv is not compatible with this system or executable
Maybe there's something in a python envar that could mitigate this, but I think it may be worthwhile to check the normalization code that BT uses to make sure charm: cs:bar comes out the other end into /tmp/tmpXyz/bar instead of /tmp/tmpXyz/cs:bar.
Bundletester creates tmp charm dirs, which seem to be where stuff like proof, lint, and test are run. If charms include a namespace or series in their bundle definition, BT normalizes that name to chop off the
cs:~foo/bar
prefix. If charms do something likecs:bar
, BT does not do that normalization:When I check the bundletester temp dirs, here's what I see:
That
/tmp/tmpz86CBO/cs:ubuntu
dir name is a problem for stuff like tox, which tries to fire up a venv:Maybe there's something in a python envar that could mitigate this, but I think it may be worthwhile to check the normalization code that BT uses to make sure
charm: cs:bar
comes out the other end into/tmp/tmpXyz/bar
instead of/tmp/tmpXyz/cs:bar
.