guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#32287] [PATCH] Reproducible svn checkouts


From: Ludovic Courtès
Subject: [bug#32287] [PATCH] Reproducible svn checkouts
Date: Sun, 29 Jul 2018 15:59:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hi Julien,

Julien Lepiller <address@hidden> skribis:

> Some svn checkouts have sub-repositories that have their own .svn
> folder. These folders contain timestamps, so this patch removes
> every .svn folder in the result of the checkout, instead of only the
> top-level one.

Ouch, good catch.

Did you find packages that would trigger this issue?  We should somehow
check all the packages that use ‘svn-fetch’ when we merge this patch,
and update hashes as needed.

> From 93aa06821d62ba902d6b3fbf5ece0cbb9d9ec797 Mon Sep 17 00:00:00 2001
> From: Julien Lepiller <address@hidden>
> Date: Fri, 6 Jul 2018 18:32:50 +0200
> Subject: [PATCH] guix: svn: Remove all .svn folders.
>
> * guix/build/svn.scm (svn-fetch): Remove all .svn folders as they contain
> timestamps.
> ---
>  guix/build/svn.scm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/guix/build/svn.scm b/guix/build/svn.scm
> index 252d1d4ee..41bbfdc87 100644
> --- a/guix/build/svn.scm
> +++ b/guix/build/svn.scm
> @@ -51,7 +51,7 @@ valid Subversion revision.  Return #t on success, #f 
> otherwise."
>    ;; of the repo.  Since we want a fixed output, this directory needs
>    ;; to be taken out.
>    (with-directory-excursion directory
> -    (delete-file-recursively ".svn"))
> +    (for-each delete-file-recursively (find-files "." "\\.svn")))

‘find-files’ doesn’t include directories by default; we also need a
stricter regexp, leading to:

  (for-each delete-file-recursively
            (find-files "." "^\\.svn$" #:directories? #t))

WDYT?

(I’ll be AFK so feel free to apply if it looks good to you.)

Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]