[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#26802: [PATCH 4/4] build: emacs: Fix `store-file->elisp-source-file'
From: |
Arun Isaac |
Subject: |
bug#26802: [PATCH 4/4] build: emacs: Fix `store-file->elisp-source-file'. |
Date: |
Wed, 17 May 2017 22:22:46 +0530 |
This prevents a ".el.el" extension for source files with no version number in
their file name.
* guix/build/emacs-build-system.scm (store-file->elisp-source-file): Remove
".el" extension from file name before splitting to name and version.
---
guix/build/emacs-build-system.scm | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/guix/build/emacs-build-system.scm
b/guix/build/emacs-build-system.scm
index 44e8b0d31..25a3beaa2 100644
--- a/guix/build/emacs-build-system.scm
+++ b/guix/build/emacs-build-system.scm
@@ -47,10 +47,13 @@
(define (store-file->elisp-source-file file)
"Convert FILE, a store file name for an Emacs Lisp source file, into a file
name that has been stripped of the hash and version number."
- (let-values (((name version)
- (package-name->name+version
- (strip-store-file-name file))))
- (string-append name ".el")))
+ (let ((extension ".el"))
+ (let-values (((name version)
+ (package-name->name+version
+ (strip-store-file-name
+ (string-drop-right
+ file (string-length extension))))))
+ (string-append name extension))))
(define* (unpack #:key source #:allow-other-keys)
"Unpack SOURCE into the build directory. SOURCE may be a compressed
--
2.12.2
- bug#26802: [PATCH 4/4] build: emacs: Fix `store-file->elisp-source-file'.,
Arun Isaac <=