GNU bug report logs - #62274
[PATCH] home: 'home-environment-with-provenance' uses the HE location info.

Previous Next

Package: guix-patches;

Reported by: Sergey Trofimov <sarg <at> sarg.org.ru>

Date: Sun, 19 Mar 2023 15:46:01 UTC

Severity: normal

Tags: patch

Done: Andrew Tropin <andrew <at> trop.in>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Sergey Trofimov <sarg <at> sarg.org.ru>
Subject: bug#62274: closed (Re: [bug#62274] [PATCH] home: 'home-environment-with-provenance'
 uses the HE location info.)
Date: Mon, 20 Mar 2023 06:54:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#62274: [PATCH] home: 'home-environment-with-provenance' uses the HE location info.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 62274 <at> debbugs.gnu.org.

-- 
62274: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=62274
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Andrew Tropin <andrew <at> trop.in>
To: Sergey Trofimov <sarg <at> sarg.org.ru>, 62274-done <at> debbugs.gnu.org
Cc: paren <at> disroot.org, ludo <at> gnu.org, Sergey Trofimov <sarg <at> sarg.org.ru>
Subject: Re: [bug#62274] [PATCH] home: 'home-environment-with-provenance'
 uses the HE location info.
Date: Mon, 20 Mar 2023 10:52:55 +0400
[Message part 3 (text/plain, inline)]
On 2023-03-19 16:45, Sergey Trofimov wrote:

> * gnu/home.scm (home-environment-with-provenance): Make `config-file`
> optional, with the default taken from the HE location info.
> ---
>  gnu/home.scm | 16 +++++++++++++++-
>  1 file changed, 15 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/home.scm b/gnu/home.scm
> index 6d3f705758..2fefe7ba53 100644
> --- a/gnu/home.scm
> +++ b/gnu/home.scm
> @@ -103,7 +103,21 @@ (define* (home-environment-derivation he)
>                                #:target-type home-service-type)))
>      (service-value home)))
>  
> -(define* (home-environment-with-provenance he config-file)
> +
> +(define (home-environment-configuration-file he)
> +  "Return the configuration file of HE, based on its 'location' field, or #f
> +if it could not be determined."
> +  (let ((file (and=> (home-environment-location he)
> +                     location-file)))
> +    (and file
> +         (or (and (string-prefix? "/" file) file)
> +             (search-path %load-path file)))))
> +
> +(define* (home-environment-with-provenance he
> +                                           #:optional
> +                                           (config-file
> +                                            (home-environment-configuration-file
> +                                             he)))
>    "Return a variant of HE that stores its own provenance information,
>  including CONFIG-FILE, if available.  This is achieved by adding an instance
>  of HOME-PROVENANCE-SERVICE-TYPE to its services."

Thank you for the patch, applied and pushed as
1f36534c7e8f2325bff4df5d37ecc811dc63fc38.

-- 
Best regards,
Andrew Tropin
[signature.asc (application/pgp-signature, inline)]
[Message part 5 (message/rfc822, inline)]
From: Sergey Trofimov <sarg <at> sarg.org.ru>
To: guix-patches <at> gnu.org
Cc: Sergey Trofimov <sarg <at> sarg.org.ru>
Subject: [PATCH] home: 'home-environment-with-provenance' uses the HE location
 info.
Date: Sun, 19 Mar 2023 16:45:37 +0100
* gnu/home.scm (home-environment-with-provenance): Make `config-file`
optional, with the default taken from the HE location info.
---
 gnu/home.scm | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/gnu/home.scm b/gnu/home.scm
index 6d3f705758..2fefe7ba53 100644
--- a/gnu/home.scm
+++ b/gnu/home.scm
@@ -103,7 +103,21 @@ (define* (home-environment-derivation he)
                               #:target-type home-service-type)))
     (service-value home)))
 
-(define* (home-environment-with-provenance he config-file)
+
+(define (home-environment-configuration-file he)
+  "Return the configuration file of HE, based on its 'location' field, or #f
+if it could not be determined."
+  (let ((file (and=> (home-environment-location he)
+                     location-file)))
+    (and file
+         (or (and (string-prefix? "/" file) file)
+             (search-path %load-path file)))))
+
+(define* (home-environment-with-provenance he
+                                           #:optional
+                                           (config-file
+                                            (home-environment-configuration-file
+                                             he)))
   "Return a variant of HE that stores its own provenance information,
 including CONFIG-FILE, if available.  This is achieved by adding an instance
 of HOME-PROVENANCE-SERVICE-TYPE to its services."
-- 
2.39.2




This bug report was last modified 2 years and 144 days ago.

Previous Next


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