From e93959021933a8d8cca8c9968b8ccf8f018d36cd Mon Sep 17 00:00:00 2001 From: Aaron Merey Date: Thu, 27 Feb 2020 18:10:01 -0500 Subject: debuginfod-client: default to XDG cache. PR25502: debuginfod client should default to XDG cache Location of client cache now defaults to $XDG_CACHE_HOME/debuginfod_client. If XDG_CACHE_HOME is not set then fallback to $HOME/.cache/debuginfod_client. Also maintain backwards compatibility with the previous default path- if $HOME/.debuginfod_client_cache exists, use that instead of the new defaults. Signed-off-by: Aaron Merey --- doc/debuginfod.8 | 10 +++++++--- doc/debuginfod_find_debuginfo.3 | 8 ++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/debuginfod.8 b/doc/debuginfod.8 index 32fca6c4..39d1904e 100644 --- a/doc/debuginfod.8 +++ b/doc/debuginfod.8 @@ -410,8 +410,10 @@ or negative means "no timeout".) .B DEBUGINFOD_CACHE_PATH This environment variable governs the location of the cache where downloaded files are kept. It is cleaned periodically as this -program is reexecuted. The default is \%$HOME/.debuginfod_client_cache. -.\" XXX describe cache eviction policy +program is reexecuted. If XDG_CACHE_HOME is set then +$XDG_CACHE_HOME/debuginfod_client is the default location, otherwise +$HOME/.cache/debuginfod_client is used. For more information regarding +the client cache see \fIdebuginfod_find_debuginfo(3)\fP. .SH FILES .LP @@ -422,8 +424,10 @@ Default database file. .PD .TP 20 -.B $HOME/.debuginfod_client_cache +.B $XDG_CACHE_HOME/debuginfod_client Default cache directory for content from upstream debuginfods. +If XDG_CACHE_HOME is not set then \fB$HOME/.cache/debuginfod_client\fP +is used. .PD diff --git a/doc/debuginfod_find_debuginfo.3 b/doc/debuginfod_find_debuginfo.3 index c232ac71..f9e770b0 100644 --- a/doc/debuginfod_find_debuginfo.3 +++ b/doc/debuginfod_find_debuginfo.3 @@ -180,7 +180,10 @@ function output. .B DEBUGINFOD_CACHE_PATH This environment variable governs the location of the cache where downloaded files are kept. It is cleaned periodically as this -program is reexecuted. The default is $HOME/.debuginfod_client_cache. +program is reexecuted. If XDG_CACHE_HOME is set then +$XDG_CACHE_HOME/debuginfod_client is the default location, otherwise +$HOME/.cache/debuginfod_client is used. + .SH "ERRORS" The following list is not comprehensive. Error codes may also @@ -244,7 +247,8 @@ the timeout duration. See debuginfod(8) for more information. .PD .1v .TP 20 .B $HOME/.debuginfod_client_cache -Default cache directory. +Default cache directory. If XDG_CACHE_HOME is not set then +\fB$HOME/.cache/debuginfod_client\fP is used. .PD .SH "SEE ALSO" -- cgit v1.2.1