Skip to content
Snippets Groups Projects
Commit b500e718 authored by David Thompson's avatar David Thompson
Browse files

build: ruby: Avoid long build directory names.

Having the hash of the source gem in the source directory file name proved to
be problematic when running the test suite for the 'pg' gem that creates
UNIX-domain sockets in the source directory and exceeded the 108 character
limit on GNU/Linux systems.

* guix/build/ruby-build-system.scm (unpack): Rename unpacked gem directory to
  "gem".
parent 8957241d
No related branches found
No related tags found
No related merge requests found
......@@ -44,12 +44,16 @@ (define (first-matching-file pattern)
(define* (unpack #:key source #:allow-other-keys)
"Unpack the gem SOURCE and enter the resulting directory."
(and (zero? (system* "gem" "unpack" source))
(begin
;; The unpacked gem directory is named the same as the archive, sans
;; the ".gem" extension.
(chdir (match:substring (string-match "^(.*)\\.gem$"
(basename source))
1))
;; The unpacked gem directory is named the same as the archive, sans
;; the ".gem" extension. It is renamed to simply "gem" in an effort to
;; keep file names shorter to avoid UNIX-domain socket file names and
;; shebangs that exceed the system's fixed maximum length when running
;; test suites.
(let ((dir (match:substring (string-match "^(.*)\\.gem$"
(basename source))
1)))
(rename-file dir "gem")
(chdir "gem")
#t)))
(define* (build #:key source #:allow-other-keys)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment