GNU bug report logs - #52808
Guix home should not assume that all targets are dot files

Previous Next

Package: guix;

Reported by: "Nick Zalutskiy" <nick <at> const.fun>

Date: Sun, 26 Dec 2021 17:37:02 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #63 received at 52808 <at> debbugs.gnu.org (full text, mbox):

From: Andrew Tropin <andrew <at> trop.in>
To: Ludovic Courtès <ludo <at> gnu.org>, Nick Zalutskiy
 <nick <at> const.fun>, 52808 <at> debbugs.gnu.org
Subject: Re: bug#52808: Guix home should not assume that all targets are dot
 files
Date: Tue, 29 Mar 2022 12:51:59 +0300
[Message part 1 (text/plain, inline)]
On 2022-03-20 22:00, Ludovic Courtès wrote:

> I wrote:
>
>> I finally got around to committing it as
>> 6da2a5a5655668f42ec5b26f875ddbc498e132b6.  Thank you!
>
> I hit “close” too quickly: we still need the patch that changes
> ‘home-files-service-type’ and/or symlink-manager.scm to not prepend a
> dot, so reopening!  :-)
>
> Ludo’.

A few more minor fixes:

[0001-home-shells-Rename-zsh-related-functions.patch (text/x-patch, inline)]
From 629466d23308e135c4a46951e5ea568677c5ec00 Mon Sep 17 00:00:00 2001
From: Andrew Tropin <andrew <at> trop.in>
Date: Tue, 29 Mar 2022 11:15:56 +0300
Subject: [PATCH 1/2] home: shells: Rename zsh related functions.

* gnu/home/services/shells.scm (home-zsh-service-type): Make zsh related
private functions more consistently named.
---
 gnu/home/services/shells.scm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gnu/home/services/shells.scm b/gnu/home/services/shells.scm
index fb728893e3..086fe7d8c4 100644
--- a/gnu/home/services/shells.scm
+++ b/gnu/home/services/shells.scm
@@ -222,7 +222,7 @@ (define (zsh-get-configuration-files config)
     ,@(if (zsh-field-not-empty? config 'zlogout)
           `(("zlogout" ,(zsh-file-by-field config 'zlogout))) '())))
 
-(define (zsh-home-files config)
+(define (add-zsh-dot-configuration config)
   (define zshenv-auxiliary-file
     (mixed-text-file
      "zshenv-auxiliary"
@@ -233,7 +233,7 @@ (define zshenv-auxiliary-file
       `(("zshenv" ,zshenv-auxiliary-file))
       (zsh-get-configuration-files config)))
 
-(define (zsh-xdg-configuration-files config)
+(define (add-zsh-xdg-configuration config)
   (if (home-zsh-configuration-xdg-flavor? config)
       (map
        (lambda (lst)
@@ -298,10 +298,10 @@ (define home-zsh-service-type
                 (extensions
                  (list (service-extension
                         home-files-service-type
-                        zsh-home-files)
+                        add-zsh-dot-configuration)
                        (service-extension
                         home-xdg-configuration-files-service-type
-                        zsh-xdg-configuration-files)
+                        add-zsh-xdg-configuration)
                        (service-extension
                         home-profile-service-type
                         add-zsh-packages)))
-- 
2.34.0

[0002-home-symlink-manager-Handle-non-existing-directory-d.patch (text/x-patch, inline)]
From a71346b059691a982a7dc0c7f4fd708b49566500 Mon Sep 17 00:00:00 2001
From: Andrew Tropin <andrew <at> trop.in>
Date: Tue, 29 Mar 2022 11:56:48 +0300
Subject: [PATCH 2/2] home: symlink-manager: Handle non-existing directory
 during cleanup.

* gnu/home/services/symlink-manager.scm (update-symlinks-script): Handle
non-existing directory during cleanup.
---
 gnu/home/services/symlink-manager.scm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gnu/home/services/symlink-manager.scm b/gnu/home/services/symlink-manager.scm
index 3b851229f3..80ca73fed8 100644
--- a/gnu/home/services/symlink-manager.scm
+++ b/gnu/home/services/symlink-manager.scm
@@ -142,6 +142,7 @@ (define (strip file)
                            #t
                            (G_ "Skipping ~a (not an empty directory)... done\n")
                            directory))
+                         ((= ENOENT errno) #t)
                          ((= ENOTDIR errno) #t)
                          (else
                           (apply throw args)))))))))
-- 
2.34.0

[Message part 4 (text/plain, inline)]

-- 
Best regards,
Andrew Tropin
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 3 years and 40 days ago.

Previous Next


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