"Bastien Roucariès" <roucaries.bast...@gmail.com> writes:

> Dear Maintainer,

> For now $env -i sensible-utils, fail due to $HOME and $TERM not set.

> I am for now working around HOME not set in sensible-utils core, but
> posix [1] documentation does not document really the value that should
> be set for a correct behavior of program.

> Nevertheless:
> - we should expect that PATH is set to a sensible value (note that it depends
>   of the shell), but nevertheless not setting PATH is not really safe
> - HOME may not be set. If set the value may be incorrect (su -)
> - TERM may not be set. If set the value may not be correct
> - USER may not be set. If set the value may be incorrect (su -)

> So I will like to have a footnote saying that
> sensible-pager/sensible-editor etc, should test if they work under env
> -i, and if they do not work fallback to return 126 (according to shell
> documentation Command invoked cannot execute), thus allowing
> sensible-utils to fallback to vi that is safe and tested under env -i

I think it is a fine idea to attempt to support those situations in
sensible-editor and sensible-pager and document them there, but I'm not
sure what Policy change you're asking for here or why this would be a
matter for Policy.

Policy does not mandate any specific behavior for sensible-editor and
sensible-pager other than that they will implement the EDITOR and PAGER
environment variable checking for you.  I think that's best left to the
maintainer of those programs to decide.

We also don't expect that the editor or pager invoked following the rules
in Policy 11.4 (and, by extension, sensible-editor and sensible-pager
themselves) will work in unusual situations, such as ones without standard
environment variables set.  We can't: the user is free to set EDITOR and
PAGER to anything they chose, including programs not in Debian.  So you
can't really expect any particular behavior from whatever EDITOR or PAGER
is set to.  Maybe it will fail with a helpful error code, maybe it will
start and not work but not exit, maybe something else entirely will
happen.  This is really outside of our control.

-- 
Russ Allbery (r...@debian.org)              <https://www.eyrie.org/~eagle/>

Reply via email to