Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use $XDG_CACHE_HOME, keep cache files in $HOME/.cache/distrobox by default #1082

Merged
merged 2 commits into from Feb 1, 2024

Conversation

bjornfor
Copy link
Contributor

Two commits:

  • Read $XDG_CACHE_HOME, fall back to $HOME/.cache
  • Change default cache dir from ~/.cache to ~/.cache/distrobox

This allows configuring where the cache dir is located, according to
XDG Base Directory Specification
(https://specifications.freedesktop.org/basedir-spec/latest/ar01s03.html).
I think it's a good idea to keep the cache files grouped under a
directory, indicating ownership, and this is the most common thing to do
in GNU/Linux distros.
@bjornfor bjornfor marked this pull request as ready for review November 27, 2023 16:44
@bjornfor
Copy link
Contributor Author

Should I add XDG_CACHE_HOME to the Optional env variables: comment?

@bjornfor
Copy link
Contributor Author

Should I add XDG_CACHE_HOME to the Optional env variables: comment?

It seems to only list DBX_* env vars. E.g. SUDO_USER and DOAS_USER aren't listed.

@89luca89
Copy link
Owner

89luca89 commented Feb 1, 2024

Thanks a lot @bjornfor that's very useful thanks!

@89luca89 89luca89 merged commit be3249d into 89luca89:main Feb 1, 2024
mrnerdhair pushed a commit to mrnerdhair/distrobox that referenced this pull request Feb 2, 2024
…ox by default (89luca89#1082)

* Read $XDG_CACHE_HOME, fall back to $HOME/.cache

This allows configuring where the cache dir is located, according to
XDG Base Directory Specification
(https://specifications.freedesktop.org/basedir-spec/latest/ar01s03.html).

* Change default cache dir from ~/.cache to ~/.cache/distrobox

I think it's a good idea to keep the cache files grouped under a
directory, indicating ownership, and this is the most common thing to do
in GNU/Linux distros.
@bjornfor bjornfor deleted the xdg-cache-home branch February 2, 2024 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants