please remove nano and grub from system dependencies. I understand the vi vs. nano issue has been solved by including both on the livecd, but neither is a system dependency. right when you get to emerge your logger, should change to emerge your logger, editor and bootmanager. Those of us who chose other editors and boot-managers are still being pounded with nano/grub on emerge -u system.
technically you could create your own system profile if you really have issues with the default
I cant really think of a polite way to phase this, but I'll try. Quite a few people managed to get vi on the install through whatever means they did, and Im being told to change my system profile? If this really is the solution, so be it. It must be me, but it reeks of catering and not choice. This is an observation, not a flame, and if anyone is offended, I apologize in advance.
you're absolutely correct, cbrewer, and in fact I have already raised this issue with the other developers.
implemented both. just remerge lilo, if you're using it, and unmerge grub. same for your favourite editor, then unmerge nano. do NOT forget to rsync first, though.
But emerging another editor and unmerging nano doesn't change the EDITOR variable in /etc/env.d/00basic. I have to do this manually. And it will get lost with the next update of "baselayout". Furthermore,in contrast to nano, which is installed in /bin, vim, for example, is installed in /usr/bin. This may be dangerous during a system recovery, when /usr/bin might be unavailable. I think both issues should be fixed somehow.
the EDITOR=nano is not an issue, if you want something other than the defaults, set them up in /etc/profile or whatever your shell uses the vim in /bin/ should be filed as a new bug
yeah, it's something cbrewer and I have been discussing on IRC. Not sure what the best approach is just yet, but I'm open to ideas.
Azarah, is EDITOR currently just defined in /etc/rc.conf, or are there other env.d files which contain it?
Err, its in /etc/env.d/00basic, not /etc/rc.conf. This should change ?
Az: might be better to have it in rc.conf? that way you just adjust once, and then have a global setting...
Ok, will need to sorda hack it out then. I guess /etc/profile will be a good place to set this then (after getting it from /etc/rc.conf).
Here is a patch to /etc/profile that should set EDITOR correctly according to /etc/rc.conf (please test etc): --------------------------------------------------------------------------- Index: profile =================================================================== RCS file: /home/cvsroot/gentoo-src/rc-scripts/etc/profile,v retrieving revision 1.15 diff -u -b -B -r1.15 profile --- profile 18 Nov 2002 19:39:22 -0000 1.15 +++ profile 16 Feb 2003 23:22:48 -0000 @@ -3,13 +3,13 @@ if [ -e "/etc/profile.env" ] then - source /etc/profile.env + . /etc/profile.env fi -#077 would be more secure, but 022 is generally quite realistic +# 077 would be more secure, but 022 is generally quite realistic umask 022 -if [ `/usr/bin/whoami` = 'root' ] +if [ "`/usr/bin/whoami`" = 'root' ] then if [ "$SHELL" = '/bin/bash' ] || [ "$SHELL" = '/bin/sh' ] then @@ -25,6 +25,37 @@ fi unset ROOTPATH -if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then +if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ] +then export INPUTRC="/etc/inputrc" fi + +# Extract the value of EDITOR +get_editor() { + [ ! -f "$1" ] && return + + local editor="`gawk ' + /^[[:space:]]*EDITOR[[:space:]]*=/ { + + sub(/^[[:space:]]*EDITOR[[:space:]]*=/, "") + EDITOR = $0 + } + + END { print EDITOR } + ' $1`" + + bash -c "eval echo $editor" +} + +if [ -f /etc/rc.conf -a -n "`get_editor /etc/rc.conf`" ] +then + export EDITOR="`get_editor /etc/rc.conf`" + +elif [ -f /etc/conf.d/basic -a -n "`get_editor /etc/conf.d/basic`" ] +then + export EDITOR="`get_editor /etc/conf.d/basic`" + +else + export EDITOR="/bin/nano" +fi +
nebuchadnezzar etc # source /etc/profile gawk: cmd. line:7: /etc/rc.conf gawk: cmd. line:7: ^ parse error
Seemant, grab it from gentoo-src, and try again?
Jared, thoughts on /bin/vim (for example) ? the vim binary is about 2M here (!!)
Az, tested the profile out of cvs and it works really well :)
My take is that if you need vi/vim, we should just make sure that vi is installed to /bin, as that is small. Vim on the other hand is not really a minimalistic editor ..... BTW, vim and vi share /usr/bin/{ex,view} ...
thanks Az -- the new baselayout looks great :)