Can virtual/editor-0 be set to rely on vim? [Solved]

Discussions Regarding Software

Moderator: Moderators

Can virtual/editor-0 be set to rely on vim? [Solved]

Postby Matte88 » Fri Mar 01, 2013 23:57

Trying to remove nano 'cause I'm using vim.
Entropy tells me that can't be removed 'cause it's a vital package for the system. I won't use --force-system option if nano is a system package (even if I know it won't be a bad thing after all), but I'd like to know why nano is a system package.
Never saw a distro - until now - where nano can't be removed peacefully :shock:
I'm obliged to keep both editors?
Last edited by Matte88 on Sat Mar 02, 2013 1:25, edited 1 time in total.
Image
When I became the sun,
I shone life into the man's hearts.
Matte88
Technological Hen
 
Posts: 399
Joined: Wed Dec 29, 2010 14:37
Location: @/etc/entropy/repositories.conf.d/entropy_sabayon-limbo

Re: Can virtual/editor-0 be set to rely on vim?

Postby colock » Sat Mar 02, 2013 0:14

Code: Select all
equery d nano


Output:
* These packages depend on nano:
virtual/editor-0 (app-editors/nano)


checking /usr/portage/virtual/editor/editor-0.ebuild shows that this virtual package can be satisfied by pretty much any editor. I think that the virtual dependency is captured when the editor-0 package is built on sabayon servers. This is why removing it would remove virtual/editor which is the vital package here. Well even after having installed vim and by using emerge, it still complain that nano is a vital package. But we are confident enough that vim can satisfy virtual/editor's requirements, aren't we?

So, IF you have your portage already up and running, you could "fix" this this way:

Code: Select all
equo install vim
emerge --depclean --verbose --ask nano
emerge -avt virtual/editor
equo rescue spmsync
equo mask virtual/editor


now let's take a look at vim's revdeps (you need gentoolkit installed):
Code: Select all
equery d vim | grep editor


Output:
virtual/editor-0


As you can see, virtual/editor now depends on vim.
colock
Simple Hen
 
Posts: 56
Joined: Mon Feb 25, 2013 12:01

Re: Can virtual/editor-0 be set to rely on vim?

Postby sabayonino » Sat Mar 02, 2013 0:18

Ciao matteo :mrgreen:

list available your editor profile(s) (..and change editor variable) :
Code: Select all
# eselect editor list


Code: Select all
...
eselect editor list
Available targets for the EDITOR variable:
  [1]   /bin/nano
  [2]   /bin/ed
  [3]   /usr/bin/ex
  [4]   /usr/bin/vi
  [ ]   (free form)


Set your favourite editor
Code: Select all
# eselect editor set 4
Setting EDITOR to /usr/bin/vi ...
Run ". /etc/profile" to update the variable in your shell



Code: Select all
# . /etc/profile


you can read More explanations: why nano is Gentoo's “default editor”

:mrgreen: Ciaooo

[edit] more "eselect modules" available :
Code: Select all
# eselect
Usage: eselect <global options> <module name> <module options>

Global options:
  --brief                   Make output shorter
  --colour=<yes|no|auto>    Enable or disable colour output (default 'auto')

Built-in modules:
  help                      Display a help message
  usage                     Display a usage message
  version                   Display version information

Extra modules:
  bashcomp                  Manage contributed bash-completion scripts
  binutils                  Manage installed versions of sys-devel/binutils
  bzimage                   Switch bzImage default kernel by updating /boot/bzImage symlink
  ctags                     Manage /usr/bin/ctags implementations
  editor                    Manage the EDITOR environment variable
  env                       Manage environment variables set in /etc/env.d/
  fontconfig                Manage fontconfig /etc/fonts/conf.d/ symlinks
  infinality                Manage the /etc/fonts/infinality/conf.d symlink
  kernel                    Manage the /usr/src/linux symlink
  lcdfilter                 Manage the /etc/env.d/99lcdfilter symlink
  locale                    Manage the LANG environment variable
  mesa                      Manage the OpenGL driver architecture used by media-libs/mesa
  modules                   Query eselect modules
  news                      Read Gentoo ("GLEP 42") news items
  opencl                    Manage the OpenCL implementation used by your system
  opengl                    Manage the OpenGL implementation used by your system
  pager                     Manage the PAGER environment variable
  pinentry                  Manage /usr/bin/pinentry implementation
  profile                   Manage the make.profile symlink
  python                    Manage Python symlinks
  rc                        Manage /etc/init.d scripts in runlevels
  vi                        Manage /usr/bin/vi implementations
  visual                    Manage the VISUAL environment variable
  xvmc                      Manage the XvMC implementation used by your system
:roll:
User avatar
sabayonino
Sagely Hen
 
Posts: 2680
Joined: Sun Sep 21, 2008 1:12
Location: Italy

Re: Can virtual/editor-0 be set to rely on vim?

Postby Matte88 » Sat Mar 02, 2013 0:35

Both are great solutions... Ah... Linux... 8) So free to do things!
@colock
Thanks for your suggestions, but I'll follow the easy way out (sabayonino's advice), because I'm very lazy! :eye: Btw I'll keep your procedure "Ad Futura Rei Memoriam".

@sabayonino
Guardalo!!! :wink: :alien:

[EDIT]
D'oh! :eye:
Equo's still telling me thar nano is vital! I'll rely on Portage, using you method, colock! :mrgreen:
[/EDIT]
Image
When I became the sun,
I shone life into the man's hearts.
Matte88
Technological Hen
 
Posts: 399
Joined: Wed Dec 29, 2010 14:37
Location: @/etc/entropy/repositories.conf.d/entropy_sabayon-limbo



Return to Software in General

Who is online

Users browsing this forum: No registered users and 1 guest