civodul pushed a commit to branch master
in repository guix.

commit 970c9993f124789cb181f399d4981cdcf5d3fc26
Author: Ludovic Courtès <[email protected]>
Date:   Wed Nov 7 15:51:38 2018 +0100

    linux-initrd: Make sure 'build-initrd' can delete files.
    
    Fixes <https://bugs.gnu.org/33297>.
    Reported by Mark H Weaver <[email protected]>.
    
    This fixes a regression introduced in
    72dc64f8f720268930eed448abfc15d2a0eca3cf, which made files read-only.
    
    * gnu/build/linux-initrd.scm (build-initrd): Call 'make-file-writable'
    on all the files under contents/.
---
 gnu/build/linux-initrd.scm | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/gnu/build/linux-initrd.scm b/gnu/build/linux-initrd.scm
index c65b5aa..fb8a1f5 100644
--- a/gnu/build/linux-initrd.scm
+++ b/gnu/build/linux-initrd.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <[email protected]>
+;;; Copyright © 2013, 2014, 2015, 2018 Ludovic Courtès <[email protected]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -139,6 +139,12 @@ REFERENCES-GRAPHS."
 
     (write-cpio-archive output "." #:gzip gzip))
 
+  ;; Make sure directories are writable so we can delete files.
+  (for-each make-file-writable
+            (find-files "contents"
+                        (lambda (file stat)
+                          (eq? 'directory (stat:type stat)))
+                        #:directories? #t))
   (delete-file-recursively "contents"))
 
 ;;; linux-initrd.scm ends here

Reply via email to