main: default to XDG cache directory for non-root users#511
main: default to XDG cache directory for non-root users#511guillermodotn wants to merge 2 commits into
Conversation
supakeen
left a comment
There was a problem hiding this comment.
Thank you; this is pretty much what I had in mind for this.
Note that we do ship a systemd tmpfiles dropin to clean up /var/cache/image-builder but we don't do this for the new locations. You don't need to address this but I did want to mention it in this PR.
In the future we should grow a image-builder cache ... subcommand to manage/prune the cache.
brlane-rht
left a comment
There was a problem hiding this comment.
I'd like to see tests that always run since right now they are going to miss coverage depending on how they are invoked. The simple solution is to pass in os.Getuid to DefaultCacheDir, but that's kinda ugly.
51efebf to
900b6f8
Compare
Changed the function to take uid as a parameter, so now tests always run. |
Summary
--cachepath to$XDG_CACHE_HOME/image-builder/store(or~/.cache/image-builder/store) when running as a non-root user, instead of the root-only/var/cache/image-builder/storeFixes #76