[bug#76690,4/4] Use #:lisp-directory instead of a custom phase

Message ID CH3PR84MB34242A89E8D26C86E87E212AC5CE2@CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM
State New
Headers
Series None |

Commit Message

Morgan Smith March 2, 2025, 10:20 p.m. UTC
  Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

> Am Sonntag, dem 02.03.2025 um 16:04 -0500 schrieb Morgan Smith:
>> Using a custom phase might not order the 'chdir' at the correct time
>> and might
>> cause problems with some of the early phases in the 'emacs-build-
>> system' (like
>> 'ensure-package-description', 'expand-load-path', etc...)
>> 
>> * gnu/packages/agda.scm (emacs-agda2-mode):
>> * gnu/packages/cmake.scm (emacs-cmake-mode):
>> * gnu/packages/emacs-xyz.scm (emacs-casual-avy, emacs-casual-calc,
>> emacs-casual-dired, emacs-casual-info, emacs-chronometrist, emacs-
>> edit-server,
>> emacs-epkg, emacs-exwm-firefox, emacs-flymake-collection, emacs-
>> forge,
>> emacs-ghub, emacs-know-your-http-well, emacs-org-contrib, emacs-php-
>> mode,
>> emacs-stumpwm-mode, emacs-telega-contrib, emacs-transient, emacs-
>> treemacs,
>> emacs-treemacs-extra, emacs-with-editor, emacs-xenops):
>> * gnu/packages/engineering.scm (emacs-scad-mode):
>> * gnu/packages/erlang.scm (emacs-erlang):
>> * gnu/packages/mail.scm (emacs-notmuch):
>> * gnu/packages/music.scm (emacs-lilypond-mode):
>> * gnu/packages/protobuf.scm (emacs-protobuf-mode):
>> * gnu/packages/scheme.scm (emacs-gerbil-mode):
>> * gnu/packages/version-control.scm (emacs-stgit): Use '#:lisp-
>> directory'
>> instead of a custom phase.
>> ---
> Note: ChangeLog continuation lines should end with a closing
> parenthesis.
> Each file should have a message, even if that is "Likewise."
>
> Not sure if one patch is the right approach here.  I think one patch
> per package might be a better idea.

I've attached the relevant patches to this email.  Let me know if you'd
rather I use 'git send-email' (and how I should do that without filling
up everyone's inbox).

>
> I would use (and=> lisp-directory chdir) and allow chdir to be #f.
>

Done!  See attached

> Cheers
  

Comments

Maxim Cournoyer March 4, 2025, 12:31 a.m. UTC | #1
Hello,

Morgan Smith <morgan.j.smith@outlook.com> writes:

[...]

> I've attached the relevant patches to this email.  Let me know if you'd
> rather I use 'git send-email' (and how I should do that without filling
> up everyone's inbox).

We accept both, but for various reasons (email notification to teams,
ease of applying, and extra commit metadata as enforced by our git
config template), using 'git send-email' is preferable.

See info '(guix) Sending a Patch Series' for more details; since here we
already have an issue created it's down to something like:

--8<---------------cut here---------------start------------->8---
git send-email --to=76690@debbugs.gnu.org origin/master
--8<---------------cut here---------------end--------------->8---

Assuming your feature branch is tracking the remote master branch.

Another option is to use mumi; you currently must manually format
patches first to send them though:

--8<---------------cut here---------------start------------->8---
git format-patch origin/master -o your-branch-patches
mumi current 76690
mumi send-email your-branch-patches/*.patch
--8<---------------cut here---------------end--------------->8---

I hope that helps.
  
Liliana Marie Prikler March 9, 2025, 8:02 p.m. UTC | #2
Am Sonntag, dem 02.03.2025 um 17:20 -0500 schrieb Morgan Smith:
> Done!  See attached
Aaaaaaaaaaaand it's pushed.

Cheers
  

Patch

From afe7b9102706ae94041658ff01ec125ddb9a920a Mon Sep 17 00:00:00 2001
Message-ID: <afe7b9102706ae94041658ff01ec125ddb9a920a.1740953815.git.Morgan.J.Smith@outlook.com>
In-Reply-To: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
References: <d83841617a4b4583cbd3439e662bed75577593b0.1740953814.git.Morgan.J.Smith@outlook.com>
From: Morgan Smith <Morgan.J.Smith@outlook.com>
Date: Sun, 2 Mar 2025 17:15:17 -0500
Subject: [PATCH v2 31/31] gnu: emacs-stgit: Use '#:lisp-directory'.

* gnu/packages/version-control.scm (emacs-stgit): Use
'#:lisp-directory'.

Change-Id: Ib8367e7822a4a17190552164cb7fa2ffcfd918bf
---
 gnu/packages/version-control.scm | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 9ecb5cf98a..068b7f41d5 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -2170,11 +2170,9 @@  (define-public emacs-stgit
     (build-system emacs-build-system)
     (arguments
      (list
+      #:lisp-directory "contrib"
       #:phases
       #~(modify-phases %standard-phases
-          (add-before 'install 'enter-lisp-directory
-            (lambda _
-              (chdir "contrib")))
           (add-before 'install-license-files 'leave-lisp-directory
             (lambda _
               (chdir ".."))))))
-- 
2.48.1