aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-11-07 15:51:38 +0100
committerLudovic Courtès <ludo@gnu.org>2018-11-07 16:06:42 +0100
commit970c9993f124789cb181f399d4981cdcf5d3fc26 (patch)
treef9872dcae71bf6925f73ac4726fba66d0ab0ab4c
parent9255198423294d16a6dfc2d1c71ce834d5496436 (diff)
downloadguix-970c9993f124789cb181f399d4981cdcf5d3fc26.tar
guix-970c9993f124789cb181f399d4981cdcf5d3fc26.tar.gz
linux-initrd: Make sure 'build-initrd' can delete files.
Fixes <https://bugs.gnu.org/33297>. Reported by Mark H Weaver <mhw@netris.org>. 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/.
-rw-r--r--gnu/build/linux-initrd.scm8
1 files changed, 7 insertions, 1 deletions
diff --git a/gnu/build/linux-initrd.scm b/gnu/build/linux-initrd.scm
index c65b5aacfa..fb8a1f5b2b 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 <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2018 Ludovic Courtès <ludo@gnu.org>
;;;
;;; 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