Re: [PATCH] debuginfod-client: default to XDG cache.

2020-02-28 Thread Mark Wielaard
Hi Aaron,

On Thu, 2020-02-27 at 19:00 -0500, Aaron Merey wrote:
> On Fri, Feb 21, 2020 at 3:09 PM Mark Wielaard  wrote:
> > But I think that means we should only create the cachedir (either
> > $XDG_CACHE_HOME or $HOME/.cache). Which is what we are doing here. But
> > I don't think we are expected to create all parents. I think it is
> > reasonable to assume they already exist (it would almost always be
> > $HOME anyway).
> > 
> > Later in the code we create target_cache_path (the debuginfod_client
> > subdir), again just as one directory (we made sure its parent exists).
> 
> Makes sense, I stuck with this approach in the revised patch I've attached.

And it gets rid of the system call. Nice.

> Also I ended up not attempting to rename a cache at the old default location.
> IMO it brings negligible benefits while adding extra complexity plus the risk
> of confusing users is greater than if we just leave the old cache where it is.

Yes, make sense.

Looks really good. Pushed to master.

Thanks,

Mark


[Bug debuginfod/25502] debuginfod client should default to XDG cache

2020-02-28 Thread amerey at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=25502

Aaron Merey  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from Aaron Merey  ---
commit e93959021933a8d8cca8c9968b8ccf8f018d36cd
Author: Aaron Merey 
Date:   Thu Feb 27 18:10:01 2020 -0500

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 

-- 
You are receiving this mail because:
You are on the CC list for the bug.