2009/10/1 Arthur D. <spinal...@mail.ru> > James Ausmus, I solved this proble long ago. I just curios, > why it's not solved by portage? So the users should spend their > time diggin in manuals to find why is sudo not working in Gentoo > like it does in LFS or any other distro?.. Is this the Gentoo way > or something? >
The Gentoo Way of doing things is to stick as close to "vanilla" upstream as possible, and to enable you to have complete control over your box, including configurations. In other words, if you want something configured differently than vanilla, you have to do the work. This being said, yes, the ebuild configures sudo to use /bin/nano as a fallback, if no other editors are specified to visudo (either via env vars or via the sudoers config file). This is a very sane thing to do by default, as nano is part of the default stage3 install, has no easy-to-screw-up dependencies, is very small, and, unless the user really knows what they are doing, is pretty much always guaranteed to be on a Gentoo system and usable - the key point being that the user really knows what they are doing, enough to specifically unmerge nano after emerging a different editor that satisfies the RDEPEND dependencies of virtual/editor (which, if you don't have any satisfactory editor installed, will pull in nano - it's small, it always works). There have been several times in the past where I have screwed up my system to the point that vi/vim will not run, and having nano around as an editor has saved me from having to reboot into a livecd. All this all this said, if you want to modify the sudo ebuild to either be smarter about specifying the fallback editor by looking at the available editors on the system, or have USE-based editor flags (probably not a good idea, as there are a lot of different console editors that will satisfy the virtual/editor RDEPEND, and switching preferred editors is so trivial that I don't think the Gentoo devs would be willing to justify another USE-expanded flag in make.conf), then the maintainer for the sudo package might consider. But, then again, since nano pretty much always works, it's trivial to change your configs to never use nano, and nano is pretty much always guaranteed to be there (unless, again, you really know what you're doing, in which case you should know how to modify your configs to disregard nano), they most likely wouldn't accept the change. But if you are passionate enough about not having to trivially modify your configs, then you can create an overlay with your modified ebuild, and be your own sudo ebuild maintainer. See all the flexibility Gentoo gives you? A trivial amount of config modification is an extremely small price to pay for all the power and flexibility (not to mention the extremely helpful devs and community, when you're willing to discuss and listen instead of just attack and provoke). -James > > -- > Best regards, Spinal > >