guix-commits
[Top][All Lists]
Advanced

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

01/03: linux-initrd: Make sure 'build-initrd' can delete files.


From: Ludovic Courtès
Subject: 01/03: linux-initrd: Make sure 'build-initrd' can delete files.
Date: Wed, 7 Nov 2018 10:07:25 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 970c9993f124789cb181f399d4981cdcf5d3fc26
Author: Ludovic Courtès <address@hidden>
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 <address@hidden>.
    
    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 <address@hidden>
+;;; Copyright © 2013, 2014, 2015, 2018 Ludovic Courtès <address@hidden>
 ;;;
 ;;; 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

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