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

Bug#682347: mark 'editor' virtual package name as obsolete



Jonathan Nieder <jrnieder@gmail.com> writes:
> Russ Allbery wrote:

>> +++ b/policy/ch-customized-programs.rst
>> @@ -93,19 +93,21 @@ page.
> [...]
>> -It is not required for a package to depend on ``editor`` and ``pager``,
>> -nor is it required for a package to provide such virtual
>> -packages. [#]_
>> +Packages may assume that ``/usr/bin/editor`` and ``/usr/bin/pager`` are
>> +available as fallbacks without adding an explicit package dependency, and
>> +may fail if they are not present.  There are no ``editor`` or ``pager``
>> +virtual packages.

> One change this patch makes is to talk about /usr/bin/editor and
> /usr/bin/pager files instead of editor and pager files.  Is that
> intentional?

> E.g. git uses "editor" as its default editor, not /usr/bin/editor.

This isn't a change -- that was already the language from the paragraph
above:

    Thus, every program that launches an editor or pager must use the
    EDITOR or PAGER environment variable to determine the editor or pager
    the user wishes to use. If these variables are not set, the programs
    ``/usr/bin/editor`` and ``/usr/bin/pager`` should be used,
    respectively.

So in theory git has a (non-RC) bug for using editor and not
/usr/bin/editor.  (If you think that's wrong, that's probably a separate
bug; I can see it both ways, depending on how much you want to trust the
PATH.)

> What should packages do if an editor is configured and the "editor"
> command is not available?

I tried to address that by saying that the program can just fail.  In
other words, do whatever you would do when the system() or execv() call
fails for some other reason.

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


Reply to: