bubblewrap icon indicating copy to clipboard operation
bubblewrap copied to clipboard

Adhere to XDG directory specifications

Open joshas opened this issue 5 years ago • 3 comments
trafficstars

Describe the bug bubblewrap-cli creates config directory in home directory on Linux: ~/.bubblewrap/ .

To Reproduce Steps to reproduce the behavior:

  1. Run bubblewrap-cli init

Expected behavior Configuration files should be kept in ~/.config/ directory, in this case ~/.config/bubblewrap . That makes it easier to backup config files and keeps home directory clean.

Desktop (please complete the following information):

  • OS: Linux - Fedora 32

joshas avatar Oct 11 '20 11:10 joshas

Link to specification: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

It seems the XDG spec would require using $XDG_CONFIG_HOME/.bubblewrap, where $XDG_CONFIG_HOME usually defaults to ˜/.config/.

It also seems that $XDG_DATA_HOME/.bubblewrap (defaults to ˜/.local/share) would be where the spec specifies saving user data. Not sure this is the right place to place the JDK and Android SDK installed automatically by Bubblewrap though.

@chenlevy24, who recently implemented a change to the config location, for thoughts.

andreban avatar Oct 11 '20 15:10 andreban

An example fix using cache-directory https://github.com/strugee/pacote/commit/891b7980d965dde6028adefa5b366a44d3f4a20d

toastal avatar Mar 14 '21 07:03 toastal

Here's another project xdg-app-paths

toastal avatar Mar 14 '21 08:03 toastal