GNU bug report logs - #71217
[PATCH] gnu: home: dotfiles: Files not excluded when they

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Nicolas Odermatt-Lemay <nodermattlemay@HIDDEN>; dated Mon, 27 May 2024 02:14:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.
bug reassigned from package 'guix' to 'guix-patches'. Request was from Ludovic Courtès <ludo@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Changed bug title to '[PATCH] gnu: home: dotfiles: Files not excluded when they' from 'gnu: home: dotfiles: Files not excluded when they should' Request was from Nicolas Odermatt-Lemay <nodermattlemay@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 27 May 2024 02:13:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 26 22:13:55 2024
Received: from localhost ([127.0.0.1]:42807 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sBPs2-0007vm-Km
	for submit <at> debbugs.gnu.org; Sun, 26 May 2024 22:13:54 -0400
Received: from lists.gnu.org ([209.51.188.17]:56316)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <nodermattlemay@HIDDEN>) id 1sBPs0-0007ve-Qd
 for submit <at> debbugs.gnu.org; Sun, 26 May 2024 22:13:53 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <nodermattlemay@HIDDEN>)
 id 1sBPrq-0005L6-Eu
 for bug-guix@HIDDEN; Sun, 26 May 2024 22:13:44 -0400
Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <nodermattlemay@HIDDEN>)
 id 1sBPrn-0001XC-BE
 for bug-guix@HIDDEN; Sun, 26 May 2024 22:13:41 -0400
Received: by mail-pj1-x1030.google.com with SMTP id
 98e67ed59e1d1-2bfc7471028so331047a91.1
 for <bug-guix@HIDDEN>; Sun, 26 May 2024 19:13:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1716776017; x=1717380817; darn=gnu.org;
 h=to:subject:message-id:date:from:mime-version:from:to:cc:subject
 :date:message-id:reply-to;
 bh=+hsyiKu0ufmqXrEyW9RrmoZUzzCTQSAWjC9ul35bfBo=;
 b=KJ7dxPQglNLBevl+5u6sxN/LPeHYthNJxwoKtnTsxtxb2OPFLls3P4ukEQqUQnc2/1
 TUVWSHhVNI2Bi6jeYCSdvaM3UzLRZBK/HTyr/AvuqCQErinC99puKLyWYqrqe04C4Hbh
 2CpJ/1CDhTyUzffJQo2sQxSmv3IrHTHWb/tlyO/Zsf6LHMAZb5m7yskNL8LLuORLt+Sr
 QYTCZiw8ASIXr/mDDIUXVOWAH0qcZh89zMiAg0hVi4L9gq1ADaKhA1+X4ulRtoSzasOF
 9blNZbLN+0AYYyV1mBnoGeq0/L++Y1pTcs4yCHyYtNtM2ThkFu3zG0tbb/4CVzMLZrXK
 F2vw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1716776017; x=1717380817;
 h=to:subject:message-id:date:from:mime-version:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=+hsyiKu0ufmqXrEyW9RrmoZUzzCTQSAWjC9ul35bfBo=;
 b=oPFMjBQSv8wlOwTNfEk+aZU03RT4tfvWV53axMkLcVvknY5T54aNRHDFsC/Ga51lSU
 bKPu/NyanaAhjoTyRsgWoUFbQd9j9BzMNWE8GfAyGhmRrAOeBrFVrxvmd22yBMQmM245
 yyIM83ErJLPDlGHrFHZplM5wAuihFdrTJC405kKZDAJs+7EBT5i6WsREsdr0oJCV9PvN
 4UPuFdu8UHxmwEEP6cv2pUiz+gB+55C/wg9NaDf1eu9CHwL6Y+bqTOof75Il4YscDSpI
 L6Lhbl3GuxZgqtoMDsIhjHu231VFQlTfPP8RLl0XJDpofA4EWk0cJ1LpJhzmqP2naqQB
 yG7w==
X-Gm-Message-State: AOJu0YxQyRWhKC94KCpMGQXnUvo9GtRdwRDl42U8fUIn/WQCkfQC2fkj
 gjz7FMBCToAu4hD1CbZbsKanTynDY/d/tw5xDjmIw1HXMIIjtcsr1O/+2eXJaAifiN1Lvjam6Mf
 jNU5Yvqd2lZF2IiYKoSAs0/KLHfwigPrx
X-Google-Smtp-Source: AGHT+IHk7NKLE2Q8rpSTmkJ8aJnwONr3PpP3kcDhSuZqDakYGCMzSVSkEo9qZCDsiJjnkJ3M73L4x8jkBiVpCUsKRdU=
X-Received: by 2002:a17:90b:30c1:b0:2b1:b1a1:1310 with SMTP id
 98e67ed59e1d1-2bf5f20265cmr7131603a91.29.1716776017046; Sun, 26 May 2024
 19:13:37 -0700 (PDT)
MIME-Version: 1.0
From: Nicolas Odermatt-Lemay <nodermattlemay@HIDDEN>
Date: Sun, 26 May 2024 22:13:26 -0400
Message-ID: <CAC-BrWpcu=+Lb_=0VUSWP4w92ohTH30zY1YA6K=-GiegfpVB7A@HIDDEN>
Subject: gnu: home: dotfiles: Files not excluded when they should
To: bug-guix@HIDDEN
Content-Type: multipart/alternative; boundary="000000000000a7baee0619661084"
Received-SPF: pass client-ip=2607:f8b0:4864:20::1030;
 envelope-from=nodermattlemay@HIDDEN; helo=mail-pj1-x1030.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

--000000000000a7baee0619661084
Content-Type: text/plain; charset="UTF-8"

Hello,

While attempting to setup home-dotfiles-service, I noticed that some files
were being symlinked even though they were in the variable
`%home-dotfiles-excluded', such as all the files of the .git directory.

This patch seems to fix the problem :

diff --git a/gnu/home/services/dotfiles.scm b/gnu/home/services/dotfiles.scm
index 823bdb03fb..38f7ff83d0 100644
--- a/gnu/home/services/dotfiles.scm
+++ b/gnu/home/services/dotfiles.scm
@@ -45,7 +45,7 @@ (define-module (gnu home services dotfiles)
 (define %home-dotfiles-excluded
   '(".*~"
     ".*\\.swp"
-    "\\.git"
+    "\\.git/.*"
     "\\.gitignore"))

 (define %home-dotfiles-layouts
@@ -138,8 +138,7 @@ (define* (directory-contents directory #:key (packages
#f))
     (define (filter-files directory)
       (find-files directory
                   (lambda (file stat)
-                    (not (regexp-exec exclusion-rx
-                                      (basename file))))))
+                    (not (regexp-exec exclusion-rx file)))))
     (if (and stow? packages (maybe-value-set? packages))
         (append-map filter-files
                     (map (lambda (pkg)

--000000000000a7baee0619661084
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hello, <br></div><div><br></div><div>While attempting=
 to setup home-dotfiles-service, I noticed that some files were being symli=
nked even though they were in the variable `%home-dotfiles-excluded&#39;, s=
uch as all the files of the .git directory. <br></div><div><br></div><div>T=
his patch seems to fix the problem :</div><div><br></div><div>diff --git a/=
gnu/home/services/dotfiles.scm b/gnu/home/services/dotfiles.scm<br>index 82=
3bdb03fb..38f7ff83d0 100644<br>--- a/gnu/home/services/dotfiles.scm<br>+++ =
b/gnu/home/services/dotfiles.scm<br>@@ -45,7 +45,7 @@ (define-module (gnu h=
ome services dotfiles)<br>=C2=A0(define %home-dotfiles-excluded<br>=C2=A0 =
=C2=A0&#39;(&quot;.*~&quot;<br>=C2=A0 =C2=A0 =C2=A0&quot;.*\\.swp&quot;<br>=
- =C2=A0 =C2=A0&quot;\\.git&quot;<br>+ =C2=A0 =C2=A0&quot;\\.git/.*&quot;<b=
r>=C2=A0 =C2=A0 =C2=A0&quot;\\.gitignore&quot;))<br>=C2=A0<br>=C2=A0(define=
 %home-dotfiles-layouts<br>@@ -138,8 +138,7 @@ (define* (directory-contents=
 directory #:key (packages #f))<br>=C2=A0 =C2=A0 =C2=A0(define (filter-file=
s directory)<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0(find-files directory<br>=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(lambda (file=
 stat)<br>- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0(not (regexp-exec exclusion-rx<br>- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0(basename file))))))<br>+ =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(not (regexp-exec exclusion=
-rx file)))))<br>=C2=A0 =C2=A0 =C2=A0(if (and stow? packages (maybe-value-s=
et? packages))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(append-map filter-file=
s<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0(map (lambda (pkg)<br></div></div>

--000000000000a7baee0619661084--




Acknowledgement sent to Nicolas Odermatt-Lemay <nodermattlemay@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#71217; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 30 Jun 2024 16:15:02 UTC

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