Gentoo Archives: gentoo-user

From: Joshua Murphy <poisonbl@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Am I wrong?..
Date: Fri, 02 Oct 2009 06:58:38
Message-Id: c30988c30910012358n68a5ceb8h40fab8515785c361@mail.gmail.com
In Reply to: Re: [gentoo-user] Am I wrong?.. by "Arthur D."
1 2009/10/2 Arthur D. <spinal.by@××××.ru>:
2 >> Go to LFS, build it all, build emacs, set EDITOR to emacs, and run
3 >> sudo visudo. Please. I have a rather good guess that you'll be,
4 >> amazingly, using the default that was set at build time for the sane
5 >> default editor, in LFS's case vim (whether called by that or the vi
6 >> symlink to it), that the distro creators chose.
7 >
8 > That's right. But there are some reasons why visudo called so (do you see
9 > that short VI?), so the user should expect it to run using vim if it's
10 > present on system and the sudo is configured by default. That was put-up
11 > by sudo creator in vanilla package, though it's configured in compile time.
12 >
13 > OK. That default behaviour was changed.
14 > Without any notification, except bash comment, in sudo ebuild.
15 > Do you consider that to be right?
16 >
17 > --
18 > Best regards, Spinal
19
20 Since the upstream default and the, clearly stated multiple places
21 (and equally clearly stated chances of it changing in the near
22 future), distro default differ, yes. It shouldn't be strange that a
23 package, when it's out of options (and given the stripping of
24 environment done by sudo itself, it very much is in the given
25 circumstances), uses the distro-defined defaults. I repeat myself from
26 before... every Gentoo system has vi, there just isn't a direct
27 symlink with that name to busybox. And.. it's called so because it
28 uses a visual editor, which is all "vi" in vi/vim means and I'd
29 presume is all it really means in visudo's name. That the package
30 upstream uses vi by default goes back to the days when the two base
31 options were vi and emacs... and let's face it, visudo is far easier
32 to type than emacssudo. Nano is a visual editor, emacs, joe, pico..
33 all of those are too. Interestingly, it *could* use a line, rather
34 than visual, editor, if that were set as the default... but I get the
35 feeling nearly everyone here would be wholly lost using ed (a
36 perfectly valid and capable editor, incidentally). As a counter
37 argument to it defaulting to using vi if vi/vim is installed ... if I
38 run a server with 50 users, 48 of which use emacs, one of which uses
39 vim, and I choose to use pico, why should I be forced to use vi for it
40 by default just because I have vim to satisfy someone else's desires?
41
42 --
43 Poison [BLX]
44 Joshua M. Murphy

Replies

Subject Author
Re: [gentoo-user] Am I wrong?.. UPDATE "Arthur D." <spinal.by@××××.ru>
Re: [gentoo-user] Am I wrong?.. "Arthur D." <spinal.by@××××.ru>