From 970c9993f124789cb181f399d4981cdcf5d3fc26 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 7 Nov 2018 15:51:38 +0100 Subject: linux-initrd: Make sure 'build-initrd' can delete files. Fixes . Reported by Mark H Weaver . 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(-) (limited to 'gnu/build') 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 +;;; Copyright © 2013, 2014, 2015, 2018 Ludovic Courtès ;;; ;;; 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 -- cgit 1.4.1