GNU bug report logs -
#44249
[PATCH] gnu: emacs: Make strip-double-wrap more robust
Previous Next
Reported by: Morgan.J.Smith <at> outlook.com
Date: Tue, 27 Oct 2020 02:18:01 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #42 received at 44249 <at> debbugs.gnu.org (full text, mbox):
Hi Morgan,
Morgan.J.Smith <at> outlook.com skribis:
> From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
>
> * gnu/packages/emacs.scm (emacs) [strip-double-wrap]: Use regex to find emacs
> executable. This works even when the version is changed by package
> transformations (e.g., version=git.master).
[...]
> (with-directory-excursion (assoc-ref outputs "out")
> - (copy-file (string-append
> - "bin/emacs-"
> - ,(let ((this-version (package-version this-package)))
> - (or (false-if-exception
> - (version-major+minor+point this-version))
> - (version-major+minor this-version))))
> - "bin/emacs")
> + (copy-file
> + (match (find-files "bin" "^emacs-")
> + ((executable . _) executable))
If we assume there should be just one “^emacs-” executable, you can
change the match clause to reflect it:
(match (find-files "bin" "^emacs-")
((executable) executable))
To be even more defensive, you could refine the regexp to
“^emacs-[0-9]”.
> + "bin/emacs")
[...]
> + ((#:modules modules)
> + `((guix build gnu-build-system)
> + (guix build utils)
> + (ice-9 match)))))
Unless I’m missing something, you don’t need to repeat #:modules in
every variant: the ‘arguments’ field is inherited by those variants, and
that includes #:modules.
You can check easily that re-adding #:modules has no effect by checking
the output of, say:
./pre-inst-env guix build emacs-xwidgets -d --no-grafts
before and after removing the ((#:modules modules) …) bit.
Could you send an updated patch?
This is the last missing bit before one can run things like:
guix install emacs-next --with-branch=emacs-next=master
:-)
Thanks,
Ludo’.
This bug report was last modified 4 years and 113 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.