[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch core-updates updated: build/gnu: Only make source checkout files
From: |
guix-commits |
Subject: |
branch core-updates updated: build/gnu: Only make source checkout files writable. |
Date: |
Thu, 04 Feb 2021 20:24:09 -0500 |
This is an automated email from the git hooks/post-receive script.
apteryx pushed a commit to branch core-updates
in repository guix.
The following commit(s) were added to refs/heads/core-updates by this push:
new 39e67ed build/gnu: Only make source checkout files writable.
39e67ed is described below
commit 39e67ed697951db0c75b0ba76269ca54108d9506
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Thu Feb 4 16:15:21 2021 -0500
build/gnu: Only make source checkout files writable.
This is a followup commit to 6129ebddbd.
It was suggested by Ludovic in #guix that it's probably safer to leave files
extracted from a tarball alone. While at it, guard against possible
exceptions that can happen in the presence of dangling symbolic links, for
example.
* guix/build/gnu-build-system.scm (unpack): Wrap the make-file-writable call
in a false-if-exception handler. Move the for-each loop under the
file-is-directory? cond branch.
---
guix/build/gnu-build-system.scm | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm
index fca77f4..af64b3b 100644
--- a/guix/build/gnu-build-system.scm
+++ b/guix/build/gnu-build-system.scm
@@ -156,7 +156,11 @@ working directory."
;; Preserve timestamps (set to the Epoch) on the copied tree so that
;; things work deterministically.
(copy-recursively source "."
- #:keep-mtime? #t))
+ #:keep-mtime? #t)
+ ;; Make the source checkout files writable, for convenience.
+ (for-each (lambda (f)
+ (false-if-exception (make-file-writable f)))
+ (find-files ".")))
(begin
(cond
((string-suffix? ".zip" source)
@@ -170,8 +174,7 @@ working directory."
(when command
(invoke command "--decompress" name)))))
;; Attempt to change into child directory.
- (and=> (first-subdirectory ".") chdir)))
- (for-each make-file-writable (find-files ".")))
+ (and=> (first-subdirectory ".") chdir))))
(define* (bootstrap #:key bootstrap-scripts
#:allow-other-keys)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch core-updates updated: build/gnu: Only make source checkout files writable.,
guix-commits <=