unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Morgan.J.Smith@outlook.com
Cc: 44249@debbugs.gnu.org
Subject: [bug#44249] [PATCH] gnu: emacs: Make strip-double-wrap more robust
Date: Fri, 15 Jan 2021 14:28:26 +0100	[thread overview]
Message-ID: <874kjiz5vp.fsf_-_@gnu.org> (raw)
In-Reply-To: <DM5PR1001MB2105208A37F6D9141D01B0C8C5EF0@DM5PR1001MB2105.namprd10.prod.outlook.com> (Morgan J. Smith's message of "Wed, 4 Nov 2020 14:47:13 -0500")

Hi Morgan,

Morgan.J.Smith@outlook.com skribis:

> From: Morgan Smith <Morgan.J.Smith@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’.




  parent reply	other threads:[~2021-01-15 14:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-27  2:01 [bug#44249] [PATCH] gnu: emacs: Make strip-double-wrap more robust Morgan.J.Smith
2020-10-27 21:13 ` Nicolas Goaziou
2020-11-02  4:35   ` [bug#44249] [PATCH v2] " Morgan.J.Smith
2020-11-03  9:45     ` bug#44249: " Nicolas Goaziou
2020-11-03 12:48       ` [bug#44249] " Nicolas Goaziou
2020-11-03 14:49         ` Morgan Smith
2020-11-03 21:38           ` Nicolas Goaziou
2020-11-03 22:09             ` zimoun
2020-11-04 19:47 ` [bug#44249] [PATCH v3] " Morgan.J.Smith
2020-11-05 22:33   ` Nicolas Goaziou
2020-11-07 20:48     ` Marius Bakke
2021-01-15 13:28   ` Ludovic Courtès [this message]
2021-01-15 19:49     ` [bug#44249] [PATCH] " Morgan Smith
2021-01-16 21:54       ` Ludovic Courtès
2021-01-16 22:03         ` Morgan Smith
2021-01-31 20:30 ` bug#44249: " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874kjiz5vp.fsf_-_@gnu.org \
    --to=ludo@gnu.org \
    --cc=44249@debbugs.gnu.org \
    --cc=Morgan.J.Smith@outlook.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).