guix-commits
[Top][All Lists]
Advanced

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

03/03: guix: ruby-build-system: Fix removal of extension related files.


From: guix-commits
Subject: 03/03: guix: ruby-build-system: Fix removal of extension related files.
Date: Thu, 14 Feb 2019 14:30:27 -0500 (EST)

cbaines pushed a commit to branch staging
in repository guix.

commit 0168473c0a74ff1f3429e94fdb308cd20e3ea4e8
Author: Christopher Baines <address@hidden>
Date:   Fri Feb 8 19:50:29 2019 +0000

    guix: ruby-build-system: Fix removal of extension related files.
    
    This functionality was broken, possibly to do with the vendor related 
changes
    in the ruby build system. These changes restore the file removal 
functionality
    at the end of the install phase.
    
    * guix/build/ruby-build-system.scm (install): Fix removal of files related 
to
    native extensions.
---
 guix/build/ruby-build-system.scm | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/guix/build/ruby-build-system.scm b/guix/build/ruby-build-system.scm
index 64b4400..ba0de12 100644
--- a/guix/build/ruby-build-system.scm
+++ b/guix/build/ruby-build-system.scm
@@ -139,7 +139,8 @@ GEM-FLAGS are passed to the 'gem' invokation, if present."
          (gem-file-basename (basename gem-file))
          (gem-name (substring gem-file-basename
                               0
-                              (- (string-length gem-file-basename) 4))))
+                              (- (string-length gem-file-basename) 4)))
+         (gem-dir (string-append vendor-dir "/gems/" gem-name)))
     (setenv "GEM_VENDOR" vendor-dir)
 
     (or (zero?
@@ -165,7 +166,7 @@ GEM-FLAGS are passed to the 'gem' invokation, if present."
     ;; For gems with native extensions, several Makefile-related files
     ;; are created that contain timestamps or other elements making
     ;; them not reproducible.  They are unnecessary so we remove them.
-    (when (file-exists? (string-append vendor-dir "/ext"))
+    (when (file-exists? (string-append gem-dir "/ext"))
       (for-each (lambda (file)
                   (log-file-deletion file)
                   (delete-file file))
@@ -174,7 +175,7 @@ GEM-FLAGS are passed to the 'gem' invokation, if present."
                              "page-Makefile.ri")
                  (find-files (string-append vendor-dir "/extensions")
                              "gem_make.out")
-                 (find-files (string-append vendor-dir "/ext")
+                 (find-files (string-append gem-dir "/ext")
                              "Makefile"))))
 
     #t))



reply via email to

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