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

Re: Bug#13287: less uses /usr/bin/editor without it necessarily being there.



On 2 Oct 1997, Darren/Torin/Who Ever... wrote:

> -----BEGIN PGP DECRYPTED MESSAGE-----
> Christian Schwarz, in an immanent manifestation of deity, wrote:
> >This discussion is getting too complicated for me :-) I don't know if
> >things are clear now, or not. So let me try to summarize.
> 
> Sounds good.
> 
> >1. The policy manual 2.3.0.0 contains a section `4.3 Editors and pagers'
> >which should explain everything.
> 
> Well, yes, but I've run into a snag in the very clear instructions.  If
> someone installs less and they don't have envar EDITOR set, they will be
> told '/usr/bin/editor: command not found' or something similar.  This is
> not clean behaviour.  Users will look for an "editor" package,
> especially since none of the editors provide /usr/bin/editor yet.  There
> is nothing in the dependencies of less that prevents this from
> happening, hence this bug.

But this is no bug in less but in all the editor packages that install an
editor but do not provide /usr/bin/editor. At least the editors in the
base system (I think ae and tiny-vi) should provide /usr/bin/editor.
Please reassign this bug to the appropriate base package.

> >   Since the check for the env vars EDITOR/PAGER can be hard to implement
> >in some upstream sources, the /usr/bin/sensible-{editor,pager} scripts
> >have been created. They check for the env vars themselves and fall back to
> >/usr/bin/{editor,pager}. Thus, you can specify
> >/usr/bin/sensible-{editor,pager} as editor/pager in your program and the
> >user always gets a good editor/pager.
> 
> But this isn't what the policy says.  It says:
> >4.3, 3rd P
> >Thus, every program that launches an editor or pager has to use the
> >EDITOR or PAGER environment variables to determine the editor/pager the
> >user wants to get started. If these variables are not set, the programs
> >`/usr/bin/editor' and `/usr/bin/pager' have to be used, respectively.
> 
> >3. Each application launching an editor or pager has to be fixed to check
> >the env vars and fall back to /usr/bin/{editor,pager} _or_ use
> >/usr/bin/sensible-*.
> 
> That's not what I read the policy manual to say.  If there was a
> sentence added to the paragraph above that said:
> "/usr/bin/sensible-{editor,pager} may be used as well if the developer
>  (packager?) wishes."
> 
> Since it's not hard at all for less to use envar EDITOR (it comes that
> way), I can't use /usr/bin/sensible-editor.  Maybe I'm being too
> nitpicky.
> 
> /usr/bin/sensible-editor works better since if envar EDITOR isn't set
> and /usr/bin/editor hasn't been set with update-alternatives,
> sensible-editor then tries ae(1) and vi(1).  If neither of -those- work,
> it then says "Couldn't find an editor!\n"  "Set the $EDITOR environment
> variable to your desired editor."
> 
> This is an acceptable error message.

Sorry, but I still don't understand your point. I totally agree with you
that the current situation is not nice, but this is neither a bug in the
policy nor in less. The bug is that the "editor" and "pager" packages have
not been updated to latest policy (or the maintainers simply forgot about
this change). 

As soon as at least the base system provides /usr/bin/editor and
/usr/bin/pager, there wouldn't be a difference if someone would check the
env vars and fall back to /usr/bin/{editor,pager} _or_ would use
/usr/bin/sensible-* in the first place.


Thanks,

Chris

--                  Christian Schwarz
                     schwarz@monet.m.isar.de, schwarz@schwarz-online.com,
Debian is looking     schwarz@debian.org, schwarz@mathematik.tu-muenchen.de
for a logo! Have a
look at our drafts     PGP-fp: 8F 61 EB 6D CF 23 CA D7  34 05 14 5C C8 DC 22 BA
at    http://fatman.mathematik.tu-muenchen.de/~schwarz/debian-logo/


Reply to: