From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34781) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dB2D8-0000X8-MI for guix-patches@gnu.org; Wed, 17 May 2017 12:54:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dB2D5-0007Ot-DV for guix-patches@gnu.org; Wed, 17 May 2017 12:54:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:48444) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dB2D5-0007Oo-Ac for guix-patches@gnu.org; Wed, 17 May 2017 12:54:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dB2D5-0001k4-4Z for guix-patches@gnu.org; Wed, 17 May 2017 12:54:03 -0400 Subject: bug#26802: [PATCH 4/4] build: emacs: Fix `store-file->elisp-source-file'. Resent-Message-ID: Message-Id: From: Arun Isaac Date: Wed, 17 May 2017 22:22:46 +0530 In-Reply-To: <20170517165246.14042-1-arunisaac@systemreboot.net> References: <20170517165246.14042-1-arunisaac@systemreboot.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 26802@debbugs.gnu.org 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-sys= tem.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 f= ile 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)))) =20 (define* (unpack #:key source #:allow-other-keys) "Unpack SOURCE into the build directory. SOURCE may be a compressed --=20 2.12.2 =