gnu: emacs: Handle pdump filenames that contain a fingerprint.
* gnu/packages/emacs.scm (emacs) [restore-emacs-pdmp]: Use lax regular expressions to match files by the “.pdmp” file ending only. Adjust comment accordingly. Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
This commit is contained in:
parent
9c3b2cf0b3
commit
49d19b35ce
@ -182,15 +182,13 @@
|
|||||||
(lambda* (#:key outputs target #:allow-other-keys)
|
(lambda* (#:key outputs target #:allow-other-keys)
|
||||||
(let* ((libexec (string-append (assoc-ref outputs "out")
|
(let* ((libexec (string-append (assoc-ref outputs "out")
|
||||||
"/libexec"))
|
"/libexec"))
|
||||||
;; each of these find-files should return one file
|
;; each of these ought to only match a single file,
|
||||||
(pdmp (find-files libexec "^emacs\\.pdmp$"))
|
;; but even if not (find-files) sorts by string<,
|
||||||
(pdmp-real (find-files libexec
|
;; so the Nth element in one maps to the Nth element of
|
||||||
"^\\.emacs\\.pdmp-real$")))
|
;; the other
|
||||||
(for-each (lambda (wrapper real)
|
(pdmp (find-files libexec "\\.pdmp$"))
|
||||||
(delete-file wrapper)
|
(pdmp-real (find-files libexec "\\.pdmp-real$")))
|
||||||
(rename-file real wrapper))
|
(for-each rename-file pdmp-real pdmp))))
|
||||||
pdmp pdmp-real))
|
|
||||||
#t))
|
|
||||||
(add-after 'glib-or-gtk-wrap 'strip-double-wrap
|
(add-after 'glib-or-gtk-wrap 'strip-double-wrap
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
;; Directly copy emacs-X.Y to emacs, so that it is not wrapped
|
;; Directly copy emacs-X.Y to emacs, so that it is not wrapped
|
||||||
|
Loading…
Reference in New Issue
Block a user