SUSE/machinery — pull request #268 by dmajda (2014-10-07 07:20:35+00:00)
Title: Store descriptions in ~/Machinery Descriptions, not ~/.machinery

We decided to treat system descriptions as data belonging to the user, not as private data owned by Machinery. This manifests in various ways:

* We [documented](https://github.com/SUSE/machinery/wiki/System-Description-Format) the format.
* We don't upgrade the description on read (preferring to throw an error if necessary) so that the description doesn't change when user doesn't expect it.
* etc.

However, this decision is not consistent with placing the descriptions in `~/.machinery`. If the data belongs to the user, it shouldn't go into a “dot” directory, but some publicly visible one. This pull request proposes to change the directory to `~/Machinery Descriptions`, which is a understandable, human-friendly name.

Note the implementation in the pull request is an incomplete one — various other places such as tests and messages need to be updated too. The main purpose is opening a discussion.

I drew inspiration from VirtualBox, which stores VM files in `~/VirtualBox VMs`. I think our situation is quite similar.

There are two open questions: Where should the log file and the config file go?

As for the config file location, I think the right place is `$XDG_CONFIG_DIR/machinery/machinery.conf` (usually expands to `~/.config/machinery/machinery.conf`). This location prevents cluttering the home directory with various “dot” files. See also [XDG Base Directory Specification](http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html).

As for the log file location, I'm not sure. The ideal location seems to be `/var/log`, but here we encounter permission problems. Something in `$XDG_CACHE_HOME` seems to be most suitable, but it's not a perfect match (log is not a cache).