On 23 Sep 1997, Darren/Torin/Who Ever... wrote: > -----BEGIN PGP DECRYPTED MESSAGE----- > Christian Schwarz, in an immanent manifestation of deity, wrote: > >> If the envar EDITOR isn't set, less uses /usr/bin/editor. This is > >> problematic since there are no editor packages yet that register that as > >> an alternative. So, possibly it should depend on > >> /usr/bin/sensible-editor since that's actually in a package and mentions > >> that you should set $EDITOR. But the way it is now, actually complies > >> with the 2.3.0.0 packaging standards. So, it might be a bug against > >> debian-policy but not until it's been discussed. Therefore, I'm cc'ing > >> this to debian-policy (this could be considered a bug of this message.) > > > >I think this is actually a bug of less or debian-policy, it a bug of your > >preferred editor not providing /usr/bin/editor. Please assign this bug to > >the editor package. > > I realized that I wasn't clear aft I sent that off. The problem with > less is that it doesn't have any dependencies so that something it > depends on is there. I'd be rather confused if I came from another unix > OS where 'v' in less brings up vi and I get '/usr/bin/editor: not > found'. I might realize that I need to set $EDITOR but then I might not. > On the other hand, if less invoked sensible-editor instead of editor, I > would be told: > echo -e "Couldn't find an editor!" 2>&1 > echo -e "Set the \$EDITOR environment variable to your desired editor." 2>&1 > > Using sensible-editor would also give a concrete dependency to less > (debianutils (>= 1.6)) rather than a nebulous "your editor should > provide this." I can't tell dpkg this...
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. Feel free to add something or to start a discussion if you disagree. 1. The policy manual 2.3.0.0 contains a section `4.3 Editors and pagers' which should explain everything. 2. Programs that launch an editor or pager should check for the environment variables EDITOR/PAGER first. If these variables are not set, they should fall back to /usr/bin/editor or /usr/bin/pager. 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. 3. Packages providing an editor or pager should use "update-alternatives" to "register" the programs. (The local sysadmin can adapt the links /usr/bin/editor and pager if he/she prefers a different program.) 4. The base system includes an editor (ae) and a pager (I think less) and installs the /usr/bin/sensible-{editor,pager} scripts. Thus, we don't need any virtual packages or dependencies. Now to the implementation: 1. The base system has to provide initial settings for /usr/bin/{pager,editor}. 2. Each editor/pager package has to provide the "alternatives." 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-*. AFAIK, all three steps have not been implemented yet. I think we should file bug reports against these packages. (Unfortunately, I don't have time for this now. So if someone wants to do this... But please drop a note to debian-policy so that noone else is doing the same and we end up with several reports :-) Thanks, Chris -- Christian Schwarz Do you know [EMAIL PROTECTED], [EMAIL PROTECTED], Debian GNU/Linux? [EMAIL PROTECTED], [EMAIL PROTECTED] Visit PGP-fp: 8F 61 EB 6D CF 23 CA D7 34 05 14 5C C8 DC 22 BA http://www.debian.org http://fatman.mathematik.tu-muenchen.de/~schwarz/