Subject: bug#58265: 29.0.50; [PATCH] $HOME adjustment for 'ert-remote-temporary-file-directory' is wrong

From: Michael Albinus <[email-masked]>
Date: Mon, 03 Oct 2022 13:53:12 +0200

Jim Porter <[email-masked]> writes:

Hi Jim,

> Looking at ert-x.el, I think this is because
> 'ert-remote-temporary-file-directory' does some fixup on $HOME, but it
> was too aggressive. See attached.
>
> diff --git a/lisp/emacs-lisp/ert-x.el b/lisp/emacs-lisp/ert-x.el
> index bfd796586d..a891f068a7 100644
> --- a/lisp/emacs-lisp/ert-x.el
> +++ b/lisp/emacs-lisp/ert-x.el
> @@ -568,7 +568,7 @@ ert-remote-temporary-file-directory
>           `("\\`mock\\'" nil ,(system-name)))
>          ;; Emacs's Makefile sets $HOME to a nonexistent value.  Needed
>          ;; in batch mode only, therefore.
> -        (unless (and (null noninteractive) (file-directory-p "~/"))
> +        (when (and noninteractive (not (file-directory-p "~/")))
>            (setenv "HOME" temporary-file-directory))
>          (format "/mock::%s" temporary-file-directory))))
>      "Temporary directory for remote file tests.")

IIRC, I've applied the original setting due to problems on hydra or emba
(don't remember exactly). Let's see how your patch works there.

Best regards, Michael.