GNU bug report logs - #26559
[PATCH] build: emacs: Install only a subset of files.

Previous Next

Package: guix-patches;

Reported by: Arun Isaac <arunisaac <at> systemreboot.net>

Date: Wed, 19 Apr 2017 07:37:01 UTC

Severity: normal

Tags: patch

Done: Arun Isaac <arunisaac <at> systemreboot.net>

Bug is archived. No further changes may be made.

Full log


Message #41 received at 26559 <at> debbugs.gnu.org (full text, mbox):

From: Alex Kost <alezost <at> gmail.com>
To: Arun Isaac <arunisaac <at> systemreboot.net>
Cc: 26559 <at> debbugs.gnu.org
Subject: Re: bug#26559: [PATCH] build: emacs: Install only a subset of files.
Date: Sat, 22 Apr 2017 22:57:05 +0300
Arun Isaac (2017-04-19 13:05 +0530) wrote:

> * guix/build/emacs-build-system.scm (install): Install files matching
>   #:include while excluding files matching #:exclude.
> * guix/build-system/emacs.scm (emacs-build): Add keyword arguments #:include
>   and #:exclude.
> ---
>  guix/build-system/emacs.scm       |  6 ++++++
>  guix/build/emacs-build-system.scm | 24 +++++++++++++++++++++---
>  2 files changed, 27 insertions(+), 3 deletions(-)
>
> diff --git a/guix/build-system/emacs.scm b/guix/build-system/emacs.scm
> index a7982002b..e6c021c7e 100644
> --- a/guix/build-system/emacs.scm
> +++ b/guix/build-system/emacs.scm
> @@ -83,6 +83,10 @@
>                        (phases '(@ (guix build emacs-build-system)
>                                    %standard-phases))
>                        (outputs '("out"))
> +                      (include ''(".*.el$" ".*.el.in$" "^dir$"
> +                                 ".*.info$" ".*.texi$" ".*.texinfo$"
> +                                 "doc/dir" "doc/*.info$" "doc/*.texi$" "doc/*.texinfo$"))

I think only ".*.el$", ".*.info$", and probably "doc/*.info$" are needed
here.  The rest regexps look useless to me.

Note, however, that 'move-doc' procedure should be adjusted to find info
in "doc" subdir (for "doc/*.info$" regex).

> +                      (exclude ''("^.dir-locals.el$" "^test.el$" "^tests.el$" ".*-test.el$" ".*-tests.el$"))
Don't forget to add ".*-pkg.el" here.

[...]
> -(define* (install #:key outputs #:allow-other-keys)
> +(define* (install #:key outputs
> +                  (include '(".*.el$" ".*.el.in$" "^dir$"
> +                             ".*.info$" ".*.texi$" ".*.texinfo$"
> +                             "^doc/dir" "^doc/*.info$" "^doc/*.texi$" "^doc/*.texinfo$"))
> +                  (exclude '("^.dir-locals.el$" "^test.el$" "^tests.el$" ".*-test.el$" ".*-tests.el$"))

It doesn't look right that these regexps are duplicated in 2 places.
I'm not very familiar with build systems, but what if the
'include'/'exclude' arguments of 'install' procedure would simply be
empty lists?  I think it wouldn't do harm if you leave these regexps
only in 'emacs-build' procedure or would it?

-- 
Alex




This bug report was last modified 8 years and 3 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.