* [bug#71217] gnu: home: dotfiles: Files not excluded when they should
[not found] <CAC-BrWpcu=+Lb_=0VUSWP4w92ohTH30zY1YA6K=-GiegfpVB7A@mail.gmail.com>
@ 2024-11-20 22:33 ` Ludovic Courtès
2024-11-30 22:09 ` paul via Guix-patches via
0 siblings, 1 reply; 2+ messages in thread
From: Ludovic Courtès @ 2024-11-20 22:33 UTC (permalink / raw)
To: Nicolas Odermatt-Lemay; +Cc: 71217, Giacomo Leidi
Hi,
(Cc: Giacomo, who authored this service.)
Nicolas Odermatt-Lemay <nodermattlemay@gmail.com> skribis:
> 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.
Oh.
> 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)))))
That would change the semantics of ‘exclusion-rx’ though.
Maybe instead we should change from ‘file-files’ to ‘file-system-fold’
and not enter directories that match one of the exclusion patterns?
Ludo’.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [bug#71217] gnu: home: dotfiles: Files not excluded when they should
2024-11-20 22:33 ` [bug#71217] gnu: home: dotfiles: Files not excluded when they should Ludovic Courtès
@ 2024-11-30 22:09 ` paul via Guix-patches via
0 siblings, 0 replies; 2+ messages in thread
From: paul via Guix-patches via @ 2024-11-30 22:09 UTC (permalink / raw)
To: Ludovic Courtès, Nicolas Odermatt-Lemay; +Cc: 71217
Hi Ludo’ and Nicolas,
I think this service has some rough edges besides this bug, I made a
proposal to smooth them out with a new configuration record which
deprecates home-dotfiles-configuration, better separates the state
needed only for stow layouts and fixes this bug at [0].
Please let me know your thoughts about it, thank you!
cheers
giacomo
[0]: https://issues.guix.gnu.org/74629
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-11-30 22:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CAC-BrWpcu=+Lb_=0VUSWP4w92ohTH30zY1YA6K=-GiegfpVB7A@mail.gmail.com>
2024-11-20 22:33 ` [bug#71217] gnu: home: dotfiles: Files not excluded when they should Ludovic Courtès
2024-11-30 22:09 ` paul via Guix-patches via
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).