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".
This commit is contained in:
parent
8957241dd4
commit
b500e7182d
|
@ -44,12 +44,16 @@ directory."
|
||||||
(define* (unpack #:key source #:allow-other-keys)
|
(define* (unpack #:key source #:allow-other-keys)
|
||||||
"Unpack the gem SOURCE and enter the resulting directory."
|
"Unpack the gem SOURCE and enter the resulting directory."
|
||||||
(and (zero? (system* "gem" "unpack" source))
|
(and (zero? (system* "gem" "unpack" source))
|
||||||
(begin
|
;; The unpacked gem directory is named the same as the archive, sans
|
||||||
;; 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
|
||||||
;; the ".gem" extension.
|
;; keep file names shorter to avoid UNIX-domain socket file names and
|
||||||
(chdir (match:substring (string-match "^(.*)\\.gem$"
|
;; shebangs that exceed the system's fixed maximum length when running
|
||||||
(basename source))
|
;; test suites.
|
||||||
1))
|
(let ((dir (match:substring (string-match "^(.*)\\.gem$"
|
||||||
|
(basename source))
|
||||||
|
1)))
|
||||||
|
(rename-file dir "gem")
|
||||||
|
(chdir "gem")
|
||||||
#t)))
|
#t)))
|
||||||
|
|
||||||
(define* (build #:key source #:allow-other-keys)
|
(define* (build #:key source #:allow-other-keys)
|
||||||
|
|
Loading…
Reference in New Issue