[bug#36913] Make gzip timestamps writable for some packages.
diff mbox series

Message ID CAAc=MEzSfpFg+LXCOKM1o9godQGce5uZPzx3KST4bWuY91889g@mail.gmail.com
State New
Headers show
Series
  • [bug#36913] Make gzip timestamps writable for some packages.
Related show

Commit Message

Brian Leung Aug. 3, 2019, 8:40 p.m. UTC
See attached.

Comments

Efraim Flashner Aug. 5, 2019, 7:28 a.m. UTC | #1
Add a copyright line for you and patch pushed.

Patch
diff mbox series

From 5f4bf9c5aa67096b8b1211959db61d9ca87c3fac Mon Sep 17 00:00:00 2001
From: Brian Leung <bkleung89@gmail.com>
Date: Tue, 25 Jun 2019 20:50:54 +0200
Subject: [PATCH 2/2] gnu: python-scikit-learn: Make gzip timestamps writable.

* gnu/packages/machine-learning.scm (python-scikit-learn): Make gzip timestamps writable.
---
 gnu/packages/machine-learning.scm | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 2dc7dc81ef..dd5ee1e9ee 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -821,8 +821,14 @@  computing environments.")
              (setenv "HOME" "/tmp")
 
              (invoke "pytest" "sklearn" "-m" "not network")))
-         ;; FIXME: This fails with permission denied
-         (delete 'reset-gzip-timestamps))))
+         (add-before 'reset-gzip-timestamps 'make-files-writable
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; Make sure .gz files are writable so that the
+             ;; 'reset-gzip-timestamps' phase can do its work.
+             (let ((out (assoc-ref outputs "out")))
+               (for-each make-file-writable
+                         (find-files out "\\.gz$"))
+               #t))))))
     (inputs
      `(("openblas" ,openblas)))
     (native-inputs
-- 
2.22.0