GNU bug report logs - #78603
[PATCH] services: readymedia: Respect SUDO_HOME if configuring for home.

Previous Next

Package: guix-patches;

Reported by: Sughosha <sughosha <at> disroot.org>

Date: Tue, 27 May 2025 09:28:01 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: Sughosha <sughosha <at> disroot.org>
To: 78603 <at> debbugs.gnu.org
Subject: [bug#78603] [PATCH v2] services: readymedia: Use relative paths to cache and log directories for home.
Date: Tue, 27 May 2025 19:22:09 +0530
[Message part 1 (text/plain, inline)]
On Tuesday, May 27, 2025 6:58:15 PM GMT+5:30 Sughosha wrote:
> This fixes readymedia configured by a different user.
> 
> * gnu/services/upnp.scm (readymedia-configuration)[cache-directory]: Update
> path.
> [log-directory]: Ditto.
> 
> Change-Id: I629c937973ca46bcd6e60382aa7576b9859515be
> ---
>  gnu/services/upnp.scm | 15 ++++-----------
>  1 file changed, 4 insertions(+), 11 deletions(-)
> 
> diff --git a/gnu/services/upnp.scm b/gnu/services/upnp.scm
> index 8267b1e53af..a5954c83f40 100644
> --- a/gnu/services/upnp.scm
> +++ b/gnu/services/upnp.scm
> @@ -74,19 +74,12 @@ (define-record-type* <readymedia-configuration>
>          (default #f))
>    (cache-directory readymedia-configuration-cache-directory
>                     (default (if for-home?
> -                                (string-append (or (getenv
> "XDG_CACHE_HOME") -                                                  
> (string-append -                                                    (getenv
> "HOME") "/.cache")) -                                              
> "/readymedia")
> -                              %readymedia-default-cache-directory)))
> +                                ".cache/readymedia"
> +                                %readymedia-default-cache-directory)))
>    (log-directory readymedia-configuration-log-directory
>                   (default (if for-home?
> -                              (string-append (or (getenv "XDG_STATE_HOME")
> -                                                 (string-append
> -                                                  (getenv "HOME")
> -                                                  "/.local/state"))
> -                                             "/readymedia")
> -                            %readymedia-default-log-directory)))
> +                              ".local/state/readymedia"
> +                              %readymedia-default-log-directory)))
>    (friendly-name readymedia-configuration-friendly-name
>                   (default #f))
>    (media-directories readymedia-configuration-media-directories)
> 
> base-commit: c15f786f8936502249b639220997094fdbf7f1e8
Sorry, when I checked the log this is giving the following error:

--8<---------------cut here---------------start------------->8---
2025-05-27 19:04:38 gnu/build/linux-container.scm:476:16: In procedure statfs: 
.cache/readymedia: No such file or directory
2025-05-27 19:04:38 Backtrace:
2025-05-27 19:04:38            3 (primitive-load "/gnu/store/
0b4l0f7yypzqww1h3hchqkqvam9…")
2025-05-27 19:04:38 In ice-9/eval.scm:
2025-05-27 19:04:38    191:35  2 (_ #f)
2025-05-27 19:04:38 In gnu/build/linux-container.scm:
2025-05-27 19:04:38     368:8  1 (call-with-temporary-directory #<procedure 
7f07dc3c82a0…>)
2025-05-27 19:04:38    476:16  0 (_ "/tmp/guix-directory.puYgco")
--8<---------------cut here---------------end--------------->8---

-- 
Sughosha
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 35 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.