GNU bug report logs - #58813
can't substitute etc/teams.scm command as doc suggests

Previous Next

Package: guix;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Thu, 27 Oct 2022 03:51:01 UTC

Severity: normal

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: bug-guix <bug-guix <at> gnu.org>
Subject: can't substitute etc/teams.scm command as doc suggests
Date: Wed, 26 Oct 2022 23:50:14 -0400
Hi,

Today, I tried;

--8<---------------cut here---------------start------------->8---
$ git send-email --to=guix-patches <at> gnu.org \
  $(./etc/teams.scm cc-members origin/master HEAD) 0000-cover-letter.patch
fatal: ambiguous argument 'some.email <at> redacted.com"': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
format-patch -o /tmp/pFSRbRNNoU --add-header="X-Debbugs-Cc: redacted <at> gmail.com" --add-header="X-Debbugs-Cc: redacted <at> email" [...]: command returned error: 128

$ ./etc/teams.scm cc-members origin/master HEAD
--add-header="X-Debbugs-Cc: redacted <at> email" --add-header="X-Debbugs-Cc: redacted <at> email" ...
--8<---------------cut here---------------end--------------->8---

You can see the command fails; this is because when using Bash command
substitution $(), the quotes in the result are not interpreted and are
thus part of the value (literals), which then gets split on white space.

As a quick hacky fix,  I tried removing the space and double quotes
like:

modified   etc/teams.scm.in
@@ -514,7 +514,7 @@ (define (cc . teams)
   "Return arguments for `git send-email' to notify the members of the given
 TEAMS when a patch is received by Debbugs."
   (format #true
-          "~{--add-header=\"X-Debbugs-Cc: ~a\"~^ ~}"
+          "~{--add-header=X-Debbugs-Cc:~a~^ ~}"
           (map person-email
                (delete-duplicates (append-map team-members teams) equal?))))

and sent a patch with that command:

git send-email --to=guix-patches <at> gnu.org \
  $(./etc/teams.scm cc-members origin/master HEAD 0000-cover-letter.patch

It created https://issues.guix.gnu.org/58812 with it, but I don't see
any of the X-Debbugs-Cc headers.  Mmmh.

-- 
Thanks,
Maxim




This bug report was last modified 2 years and 72 days ago.

Previous Next


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