From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: Timestamps in ...-autoloads.el files Date: Sat, 21 May 2016 13:31:39 +0300 Message-ID: <8737pbaeic.fsf@gmail.com> References: <87zize1mmq.fsf@gnu.org> <87si55h205.fsf@gmail.com> <87mvvde3h0.fsf@gnu.org> <87vba0mkwy.fsf@gmail.com> <87y4ew88km.fsf@gnu.org> <8737pomysb.fsf@gmail.com> <8737piyxvv.fsf@gnu.org> <87h9du1n6a.fsf@gmail.com> <87h9duury7.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34305) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b44C8-00018N-Mq for guix-devel@gnu.org; Sat, 21 May 2016 06:31:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b44C4-0007Qh-Fz for guix-devel@gnu.org; Sat, 21 May 2016 06:31:43 -0400 List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s (2016-05-19 15:56 +0300) wrote: >> From ca571f7631bf77ddc8ad6257fe165b4ff0ef5e6b Mon Sep 17 00:00:00 2001 >> From: Alex Kost >> Date: Thu, 19 May 2016 11:01:40 +0300 >> Subject: [PATCH] gnu: emacs: Remove *.elc from the release tarball. >> >> * gnu/packages/emacs.scm (emacs)[arguments]: Add 'remove-compiled-elisp' >> phase. >> --- >> gnu/packages/emacs.scm | 9 +++++++++ >> 1 file changed, 9 insertions(+) >> >> diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm >> index 32ed722..0c15f63 100644 >> --- a/gnu/packages/emacs.scm >> +++ b/gnu/packages/emacs.scm >> @@ -91,6 +91,15 @@ >> (substitute* (find-files "." "^Makefile\\.in$") >> (("/bin/pwd") >> "pwd")))) >> + (add-after 'configure 'remove-compiled-elisp >> + (lambda _ >> + ;; Emacs comes with compiled elisp (*.elc) and generated >> + ;; autoloads (*loaddefs.el) files. This does not allow us= to use >> + ;; "emacs-source-date-epoch.patch" effectively, so remove = these >> + ;; files (using 'make bootstrap-clean'), as 'make' will re= create >> + ;; them. >> + (with-directory-excursion "lisp" >> + (zero? (system* "make" "bootstrap-clean"))))) > > I would rather do it in a =E2=80=98snippet=E2=80=99 so that =E2=80=98guix= build -S emacs=E2=80=99 > returns the cleaned-up source. Hm, I didn't think about it; yeah, I agree it would be better, thanks! > However, the snippet would have to duplicate the logic of this makefile > rule, which might not be desirable (depends on how complex this rule > is). If you think it=E2=80=99s best to keep this way, please push! The rule is rather simple, it just removes all compiled and generated files, so attached is the version with snippet. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gnu-emacs-Remove-.elc-and-autoloads-from-the-tarball.patch >From 13c2e7123d3b8f7dda5814c2ac00acfe806cec3b Mon Sep 17 00:00:00 2001 From: Alex Kost Date: Thu, 19 May 2016 11:01:40 +0300 Subject: [PATCH] gnu: emacs: Remove *.elc and autoloads from the tarball. * gnu/packages/emacs.scm (emacs)[source]: Add 'snippet' to remove compiled and generated elisp files. --- gnu/packages/emacs.scm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 18898e9..ae02a07 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -80,7 +80,18 @@ (base32 "0kn3rzm91qiswi0cql89kbv6mqn27rwsyjfb8xmwy9m5s8fxfiyx")) (patches (search-patches "emacs-exec-path.patch" - "emacs-source-date-epoch.patch")))) + "emacs-source-date-epoch.patch")) + (modules '((guix build utils))) + (snippet + ;; Delete the bundled byte-compiled elisp files and + ;; generated autoloads. + '(with-directory-excursion "lisp" + (for-each delete-file + (append (find-files "." "\\.elc$") + (find-files "." "loaddefs\\.el$") + ;; This is the only "autoloads" file that + ;; does not have "*loaddefs.el" name. + '("eshell/esh-groups.el"))))))) (build-system glib-or-gtk-build-system) (arguments `(#:phases -- 2.8.2 --=-=-=--