nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nmh 1.8RC2, xlbiff, and $HOME


From: Alexander Zangerl
Subject: Re: nmh 1.8RC2, xlbiff, and $HOME
Date: Tue, 31 Jan 2023 06:44:23 +1000

On Mon, 30 Jan 2023 10:47:05 -0800, Stephen Gildea writes:
>I have investigated the failure of the xlbiff tests with nmh 1.8RC2.
>(This is https://bugs.debian.org/1029752)

stephen, thanks for that.

>In one of the tests, xlbiff sets environment variable HOME to an empty
>string and MH to a file containing a custom profile with an absolute Path.
>With nmh 1.7.1, this environment works.
>
>With nmh 1.8RC2, this environment fails with the error message
>"environment variable HOME is empty".

*lightbulb*

that error message comes from set_mypath in sbr/path.c, and
the changelog tells me that

"Author: Ralph Corderoy <ralph@inputplus.co.uk>
Date:   Thu May 13 13:46:20 2021 +0100

sbr/path.c: add set_mypath() to factor out repeated code."

started to consolidate the various places that figure out a home for mh.

however, set_mypath spot doesn't bother with $MH.

a quick glance seems to indicate that only context_read in
sbr/context_read.c looks at $MH for finding a home, but
it does (well attempts) that just a few lines AFTER set_mypath has
bailed out on it...

i think we need to fix that sequence up a little :-)

[handling of relative paths in the profile]
>Whatever your decision, the choice should be documented.  If you decide
>to keep Path relative to HOME, then HOME should be required to be
>non-empty if (and only if!) Path is relative.  (nmh 1.7.1 used "/",
>which seems wrong.)

with my nitpicker's hat on: POSIX/SUS says HOME can be depended on.

"HOME The system shall initialize this variable at the time of login to
    be a pathname of the user's home directory. See <pwd.h>."

personally i'd say we should rely on posix and insist on not being
$HOMEless. for me that would imply relatives should be relative to that,
not the profile location.

regards
az


-- 
Alexander Zangerl + GPG Key 2FCCF66BB963BD5F + https://snafu.priv.at/
`bastard operators from hell' anagrams to `shatterproof armored balls'.
 -- Cliff Miller

Attachment: signature.asc
Description: Digital Signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]