Comment 3 for bug 1191028

Revision history for this message
Stuart Bishop (stub) wrote :

This case is particularly interesting, and possibly only applies to Python. Files are being created in the hook directory without the dev being conscious of it. Devs cannot choose an alternative location (so even if an alternative location external to the charm directory was encouraged to store state, it wouldn't apply here).

If we prefer devs to handle this and resolve the conflicts, ensuring end users never see the problem, the Python specific fix is either:

- Invoke Python with the -B argument to stop it writing compiled byte code. 'charm proof' could warn about this.
- Have hooks run with the PYTHONDONTWRITEBYTECODE environment variable set so devs never need to worry.

If this is more than a Python specific problem, is there a way of the charm providing git metadata such as what files to ignore (git's equivalent of .bzrignore or similar)?