diff mbox series

[bug#48205] gnu: emacs-org: Make build reproducible

Message ID BYAPR05MB40239B904A0A20F4BFB8B2A6C55B9@BYAPR05MB4023.namprd05.prod.outlook.com
State New
Headers show
Series [bug#48205] gnu: emacs-org: Make build reproducible | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Morgan Smith May 3, 2021, 8:54 p.m. UTC
From: Morgan Smith <Morgan.J.Smith@outlook.com>

* gnu/packages/emacs-xyz.scm (emacs-org)[phases]: Remove loaddefs and use
autoloads instead
---
 gnu/packages/emacs-xyz.scm | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Ludovic Courtès May 11, 2021, 10:28 a.m. UTC | #1
Hi,

Morgan.J.Smith@outlook.com skribis:

> From: Morgan Smith <Morgan.J.Smith@outlook.com>
>
> * gnu/packages/emacs-xyz.scm (emacs-org)[phases]: Remove loaddefs and use
> autoloads instead

[...]

> +         (add-after 'fix-org-version 'use-autoloads
> +           (lambda _
> +             (delete-file "org-loaddefs.el")
> +             (substitute* (find-files "." ".*.el")
> +                 (("org-loaddefs.el") "org-autoloads.el"))
> +             #t))

You can drop the trailing #t.

Could you explain in a comment in the phase what it does?  It’s not
clear to me how this relates to making the build bit-reproducible.

Remember that ‘find-files’ takes a regexp as its second argument; thus,
to match .el files, you need to write "\\.el$".

Could you send an updated patch?

Thanks,
Ludo’.
diff mbox series

Patch

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index c950f116f9..a73b7959ef 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -11243,6 +11243,12 @@  (define-public emacs-org
                (("org-release \"\"")
                 (string-append "org-release \"" ,version "\"")))
              #t))
+         (add-after 'fix-org-version 'use-autoloads
+           (lambda _
+             (delete-file "org-loaddefs.el")
+             (substitute* (find-files "." ".*.el")
+                 (("org-loaddefs.el") "org-autoloads.el"))
+             #t))
          (add-after 'install 'install-documentation
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((share (string-append (assoc-ref outputs "out") "/share"))