Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bugzilla DB migration completed. Please report issues to Infra team via email via infra@gentoo.org or IRC
Bug 370295 - emerge --depclean removes system packages like sys-apps/less
Summary: emerge --depclean removes system packages like sys-apps/less
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Dependencies (show other bugs)
Hardware: AMD64 Linux
: Normal normal with 1 vote (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
: 370329 370437 371621 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-06-06 14:54 UTC by Antonis Konstantinos Tzorvas
Modified: 2019-04-26 02:37 UTC (History)
14 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antonis Konstantinos Tzorvas 2011-06-06 14:54:43 UTC
I have just updated to latest portage-2.2 
Installed versions:  2.2.0_alpha38(05:21:13 PM 06/06/2011)(ipc -build -doc -epydoc -linguas_pl -python2 -python3 -selinux)
from previous alpha version

running `emerge --depclean` after updating @world, it tries to remove basic system packages

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! 'app-editors/nano' is part of your system profile.                                                                                                                              
!!! Unmerging it may be damaging to your system.                                                                                                                                                        
 app-editors/nano
    selected: 2.3.1 
   protected: none 
     omitted: none 
            
!!! 'sys-apps/less' is part of your system profile.                                                         
!!! Unmerging it may be damaging to your system.                                                                                                                                    
                
 sys-apps/less
    selected: 443 
   protected: none 
     omitted: none 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

why is that?



emerge --info
Portage 2.2.0_alpha38 (default/linux/amd64/10.0/desktop/kde, gcc-4.5.2, glibc-2.13-r2, 2.6.39-pf2 x86_64)
=================================================================
System uname: Linux-2.6.39-pf2-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T9400_@_2.53GHz-with-gentoo-2.0.2
Timestamp of tree: Mon, 06 Jun 2011 13:45:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [enabled]
ccache version 3.1.5 [enabled]
app-shells/bash:          4.2_p10
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.1-r1, 3.1.3-r1, 3.2
dev-util/ccache:          3.1.5
dev-util/cmake:           2.8.4-r1
sys-apps/baselayout:      2.0.2
sys-apps/openrc:          0.8.2-r1
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1-r1
sys-devel/binutils:       2.21
sys-devel/gcc:            4.5.2
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82
sys-kernel/linux-headers: 2.6.38 (virtual/os-headers)
sys-libs/glibc:           2.13-r2
Repositories:

gentoo
    location: /usr/portage
    sync: rsync://rsync.europe.gentoo.org/gentoo-portage
    priority: -1000

mozilla
    location: /var/lib/layman/mozilla
    masters: gentoo
    priority: 0

vmware
    location: /var/lib/layman/vmware
    masters: gentoo
    priority: 1

local_repo
    location: /usr/local/overlay
    masters: gentoo
    priority: 2

Installed sets: 
ABI="amd64"
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1 PUEL"
ACCEPT_PROPERTIES="*"
ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci"
ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol"
APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias"
ARCH="amd64"
ASFLAGS_x86="--32"
AUTOCLEAN="yes"
CALLIGRA_FEATURES="braindump flow karbon kexi kpresenter krita tables words"
CAMERAS="ptp2"
CBUILD="x86_64-pc-linux-gnu"
CCACHE_SIZE="2G"
CFLAGS="-march=core2 -mtune=core2 -mcx16 -msahf --param l1-cache-size=32 --param l1-cache-line-size=64 -O2 -pipe"
CFLAGS_x86="-m32"
CHOST="x86_64-pc-linux-gnu"
CHOST_amd64="x86_64-pc-linux-gnu"
CHOST_x86="i686-pc-linux-gnu"
CLEAN_DELAY="5"
COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog"
COLLISION_IGNORE="/lib/modules"
COLORFGBG="15;0"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa /usr/share/themes/oxygen-gtk/gtk-2.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CVS_RSH="ssh"
CXXFLAGS="-march=core2 -mtune=core2 -mcx16 -msahf --param l1-cache-size=32 --param l1-cache-line-size=64 -O2 -pipe"
DBUS_SESSION_BUS_ADDRESS="unix:abstract=/tmp/dbus-hsS6WEW1kk,guid=567bb0d4cebf95b14dad694400000062"
DCCC_PATH="/usr/lib64/distcc/bin"
DEFAULT_ABI="amd64"
DESKTOP_SESSION="default"
DISPLAY=":0"
DISTCC_LOG=""
DISTCC_VERBOSE=""
DISTDIR="/usr/portage/distfiles"
DM_CONTROL="/var/run/xdmctl"
EDITOR="/bin/nano"
ELIBC="glibc"
EMERGE_DEFAULT_OPTS="--jobs=2 --load-average=2 -v -a --quiet-build"
EMERGE_WARNING_DELAY="10"
EPREFIX=""
EROOT="/"
FCFLAGS=""
FEATURES="assume-digests binpkg-logs ccache collision-protect distcc distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FETCHCOMMAND="/usr/bin/wget -t 3 -T 60 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}""
FETCHCOMMAND_RSYNC="rsync -avP "${URI}" "${DISTDIR}/${FILE}""
FETCHCOMMAND_SFTP="bash -c "x=\${2#sftp://} ; host=\${x%%/*} ; port=\${host##*:} ; host=\${host%:*} ; [[ \${host} = \${port} ]] && port=22 ; exec sftp -P \${port} \"\${host}:/\${x#*/}\" \"\$1\"" sftp "${DISTDIR}/${FILE}" "${URI}""
FETCHCOMMAND_SSH="bash -c "x=\${2#ssh://} ; host=\${x%%/*} ; port=\${host##*:} ; host=\${host%:*} ; [[ \${host} = \${port} ]] && port=22 ; exec rsync --rsh=\"ssh -p\${port}\" -avP \"\${host}:/\${x#*/}\" \"\$1\"" rsync "${DISTDIR}/${FILE}" "${URI}""
FFLAGS=""
GCC_SPECS=""
GDK_USE_XFT="1"
GENTOO_MIRRORS="http://files.gentoo.gr http://ftp.ntua.gr/pub/linux/gentoo/ http://ftp.cc.uoc.gr/mirrors/linux/gentoo/ "
GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx"
GSETTINGS_BACKEND="gconf"
GS_LIB="/home/tzorvas/.fonts"
GTK2_RC_FILES="/etc/gtk-2.0/gtkrc:/home/tzorvas/.gtkrc-2.0::/home/tzorvas/.kde4/share/config/gtkrc-2.0"
GTK_RC_FILES="/etc/gtk/gtkrc:/home/tzorvas/.gtkrc::/home/tzorvas/.kde4/share/config/gtkrc"
HG="/usr/bin/hg"
HOME="/root"
INFOPATH="/usr/share/info:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.21/info:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.2/info"
INPUT_DEVICES="evdev synaptics"
JAVAC="/etc/java-config-2/current-system-vm/bin/javac"
JAVA_HOME="/etc/java-config-2/current-system-vm"
JDK_HOME="/etc/java-config-2/current-system-vm"
KDE_FULL_SESSION="true"
KDE_MULTIHEAD="false"
KDE_SESSION_UID="1000"
KDE_SESSION_VERSION="4"
KERNEL="linux"
KONSOLE_DBUS_SERVICE=":1.64"
KONSOLE_DBUS_SESSION="/Sessions/1"
LANG="en_US.UTF8"
LANGUAGE=""
LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text"
LC_ALL="en_US.UTF-8"
LC_COLLATE="C"
LC_CTYPE="el_GR.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LDFLAGS_x86="-m elf_i386"
LESS="-R -M --shift 5"
LESSOPEN="|lesspipe.sh %s"
LIBDIR_amd64="lib64"
LIBDIR_amd64_fbsd="lib64"
LIBDIR_ppc="lib32"
LIBDIR_ppc64="lib64"
LIBDIR_s390="lib32"
LIBDIR_s390x="lib64"
LIBDIR_sparc32="lib32"
LIBDIR_sparc64="lib64"
LIBDIR_x86="lib32"
LIBDIR_x86_fbsd="lib32"
LINGUAS="el en"
LOGNAME="root"
LS_COLORS="rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.pdf=00;32:*.ps=00;32:*.txt=00;32:*.patch=00;32:*.diff=00;32:*.log=00;32:*.tex=00;32:*.doc=00;32:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:"
MAKEOPTS="-j3 -l3.0"
MANPATH="/etc/java-config-2/current-system-vm/man:/usr/local/share/man:/usr/share/man:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.21/man:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.2/man:/etc/java-config/system-vm/man/"
MULTILIB_ABIS="amd64 x86"
MULTILIB_STRICT_DENY="64-bit.*shared object"
MULTILIB_STRICT_DIRS="/lib32 /lib /usr/lib32 /usr/lib /usr/kde/*/lib32 /usr/kde/*/lib /usr/qt/*/lib32 /usr/qt/*/lib /usr/X11R6/lib32 /usr/X11R6/lib"
MULTILIB_STRICT_EXEMPT="(perl5|gcc|gcc-lib|binutils|eclipse-3|debug|portage|udev)"
NETBEANS="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml"
OLDPWD="/var/tmp/portage/ram"
OPENGL_PROFILE="nvidia"
PAGER="/usr/bin/less"
PATH="/sbin:/bin:/usr/sbin:/usr/bin"
PHP_TARGETS="php5-3"
PKGDIR="/usr/portage/packages"
PORTAGE_ARCHLIST="ppc sparc64-freebsd ppc-openbsd x86-openbsd ppc64 x86-winnt x86-fbsd ppc-aix alpha arm x86-freebsd s390 amd64 arm-linux x86-macos x64-openbsd ia64-hpux hppa x86-netbsd x86-cygwin amd64-linux ia64-linux x86 sparc-solaris x64-freebsd sparc64-solaris x86-linux x64-macos sparc m68k-mint ia64 mips ppc-macos x86-interix hppa-hpux amd64-fbsd x64-solaris mips-irix m68k sh x86-solaris sparc-fbsd"
PORTAGE_BINHOST_CHUNKSIZE="3000"
PORTAGE_BIN_PATH="/usr/lib64/portage/bin"
PORTAGE_COMPRESS_EXCLUDE_SUFFIXES="css gif htm[l]? jp[e]?g js pdf png"
PORTAGE_CONFIGROOT="/"
PORTAGE_DEBUG="0"
PORTAGE_DEPCACHEDIR="/var/cache/edb/dep"
PORTAGE_ELOG_CLASSES="log warn error"
PORTAGE_ELOG_MAILFROM="portage@localhost"
PORTAGE_ELOG_MAILSUBJECT="[portage] ebuild log for ${PACKAGE} on ${HOST}"
PORTAGE_ELOG_MAILURI="root"
PORTAGE_ELOG_SYSTEM="save_summary echo"
PORTAGE_FETCH_CHECKSUM_TRY_MIRRORS="5"
PORTAGE_FETCH_RESUME_MIN_SIZE="350K"
PORTAGE_GID="250"
PORTAGE_GPG_SIGNING_COMMAND="gpg --sign --clearsign --yes --default-key "${PORTAGE_GPG_KEY}" --homedir "${PORTAGE_GPG_DIR}" "${FILE}""
PORTAGE_INST_GID="0"
PORTAGE_INST_UID="0"
PORTAGE_IONICE_COMMAND="ionice -c 3 -p ${PID}"
PORTAGE_NICENESS="19"
PORTAGE_PYM_PATH="/usr/lib64/portage/pym"
PORTAGE_QUIET="1"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_RSYNC_RETRIES="-1"
PORTAGE_SANDBOX_COMPAT_LEVEL="22"
PORTAGE_SYNC_STALE="30"
PORTAGE_TMPDIR="/home/tzorvas/var"
PORTAGE_VERBOSE="1"
PORTAGE_WORKDIR_MODE="0700"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/mozilla /var/lib/layman/vmware /usr/local/overlay"
PRELINK_PATH_MASK="/usr/lib64/libfreebl3.so:/usr/lib64/libnssdbm3.so:/usr/lib64/libsoftokn3.so"
PROFILEHOME=""
PROFILE_ONLY_VARIABLES="ARCH ELIBC KERNEL USERLAND"
PWD="/root"
PYTHONDONTWRITEBYTECODE="1"
QT_PLUGIN_PATH="/usr/lib64/kde4/plugins:/home/tzorvas/.kde4/lib64/kde4/plugins/:/usr/lib64/kde4/plugins/"
RESUMECOMMAND="/usr/bin/wget -c -t 3 -T 60 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}""
RESUMECOMMAND_RSYNC="rsync -avP "${URI}" "${DISTDIR}/${FILE}""
RESUMECOMMAND_SSH="bash -c "x=\${2#ssh://} ; host=\${x%%/*} ; port=\${host##*:} ; host=\${host%:*} ; [[ \${host} = \${port} ]] && port=22 ; exec rsync --rsh=\"ssh -p\${port}\" -avP \"\${host}:/\${x#*/}\" \"\$1\"" rsync "${DISTDIR}/${FILE}" "${URI}""
ROOT="/"
ROOTPATH="/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.5.2:/opt/vmware/bin"
RPMDIR="/usr/portage/rpm"
RUBY_TARGETS="ruby18"
SESSION_MANAGER="local/tzorvabox:@/tmp/.ICE-unix/4242,unix/tzorvabox:/tmp/.ICE-unix/4242"
SHELL="/bin/bash"
SHELL_SESSION_ID="e304c7757a9f4000bfc144e30e20c3ad"
SHLVL="3"
STAGE1_USE="multilib nptl nptlonly unicode"
STRIGI_PLUGIN_PATH="/usr/lib64/strigi:"
SYMLINK_LIB="yes"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
TERM="xterm"
USE="X a52 aac acl acpi alsa amd64 bash-completion berkdb bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif ffmpeg firefox firefox3 flac ftp gdbm gdu gif git gpm gstreamer iconv jpeg kde laptop lcms ldap libnotify lm_sensors mad mikmod mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl nptlonly nsplugin nvidia ogg opengl openmp pam pango pcre pdf perl png policykit ppds python qt3support qt4 quicktime readline reflection samba sdl session spell spl sse sse2 ssl ssse3 startup-notification svg sysfs tcpd threads tiff truetype udev unicode usb vdpau vim-pager vim-syntax vim-with-x vorbis wma x264 xcb xinerama xml xorg xulrunner xv xvid zeroconf zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="braindump flow karbon kexi kpresenter krita tables words" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="el en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
USER="root"
USERLAND="GNU"
USE_EXPAND="ALSA_CARDS ALSA_PCM_PLUGINS APACHE2_MODULES APACHE2_MPMS CALLIGRA_FEATURES CAMERAS COLLECTD_PLUGINS CROSSCOMPILE_OPTS DRACUT_MODULES DVB_CARDS ELIBC FCDSL_CARDS FOO2ZJS_DEVICES FRITZCAPI_CARDS GPSD_PROTOCOLS INPUT_DEVICES KERNEL LCD_DEVICES LINGUAS LIRC_DEVICES MISDN_CARDS NETBEANS_MODULES NGINX_MODULES_HTTP NGINX_MODULES_MAIL PHP_TARGETS QEMU_SOFTMMU_TARGETS QEMU_USER_TARGETS RUBY_TARGETS SANE_BACKENDS USERLAND VIDEO_CARDS XFCE_PLUGINS XTABLES_ADDONS"
USE_EXPAND_HIDDEN="CROSSCOMPILE_OPTS ELIBC KERNEL USERLAND"
USE_ORDER="env:pkg:conf:defaults:pkginternal:env.d"
VBOX_APP_HOME="/usr/lib64/virtualbox"
VIDEO_CARDS="nvidia"
WANT_MP="true"
WINDOWID="69206053"
WINDOWPATH="7"
XAUTHORITY="/root/.xauthKT4yhJ"
XCURSOR_THEME="Oxygen_Black"
XDG_CONFIG_DIRS="/etc/xdg"
XDG_DATA_DIRS="/usr/local/share:/usr/share"
XDG_SESSION_COOKIE="9d9bbff88430e3d074bf0c2e000059fb-1307368667.133000-1721563442"
XDM_MANAGED="method=classic"
XSESSION="KDE-4"
XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
_="/usr/bin/emerge"
Comment 1 Zac Medico gentoo-dev 2011-06-06 15:09:28 UTC
(In reply to comment #0)
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> !!! 'app-editors/nano' is part of your system profile.                          
> !!! Unmerging it may be damaging to your system.                                
>  app-editors/nano
>     selected: 2.3.1 
>    protected: none 
>      omitted: none 
> 
> !!! 'sys-apps/less' is part of your system profile.                             
> !!! Unmerging it may be damaging to your system.                                
> 
>  sys-apps/less
>     selected: 443 
>    protected: none 
>      omitted: none 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> why is that?

You probably have other providers installed. You can check for possible providers with these commands:

  portageq metadata / installed virtual/pager-0 RDEPEND
  portageq metadata / installed virtual/editor-0 RDEPEND

Also, there's a new portageq command that resolves the atoms for the preferred installed providers:

  portageq expand_virtual / virtual/pager
  portageq expand_virtual / virtual/editor
Comment 2 Antonis Konstantinos Tzorvas 2011-06-06 15:46:55 UTC
trying what you told me to do:
~ $ portageq expand_virtual / virtual/pager
sys-apps/util-linux
~ $ portageq expand_virtual / virtual/editor
app-editors/vim


after that, i did

emerge -1 less nano

after that:
 ~ # portageq expand_virtual / virtual/editor
app-editors/nano
 ~ # portageq expand_virtual / virtual/pager
sys-apps/less

emerge --depclean has the same behaviour, it wants to remove nano & less again.

so nothing new 'till now!
Comment 3 Zac Medico gentoo-dev 2011-06-06 15:54:28 UTC
This is the intended behavior of --depclean. It's supposed to remove any redundant packages. If you want to keep less and nano, you can add them to your world file like this:

  emerge --noreplace less nano
Comment 4 Jeremy Olexa (darkside) (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2011-06-06 20:21:46 UTC
*** Bug 370329 has been marked as a duplicate of this bug. ***
Comment 5 Antonis Konstantinos Tzorvas 2011-06-06 20:46:11 UTC
but since it's part of @system isn't weird that it want to remove it?

~ # emerge -epv @system | grep nano
[ebuild   R    ] app-editors/nano-2.3.1  USE="ncurses nls spell unicode -debug -justify -minimal -slang" 0 kB
Comment 6 Erik Zeek 2011-06-06 21:15:21 UTC
*** Bug 370329 has been marked as a duplicate of this bug. ***
Comment 7 Zac Medico gentoo-dev 2011-06-06 22:23:31 UTC
(In reply to comment #5)
> but since it's part of @system isn't weird that it want to remove it?
> 
> ~ # emerge -epv @system | grep nano
> [ebuild   R    ] app-editors/nano-2.3.1  USE="ncurses nls spell unicode -debug
> -justify -minimal -slang" 0 kB

I'll admit that it is a somewhat surprising quirk. However, I think you'll find that if you allow emerge --depclean to remove nano, then emerge -e @system will pull in app-editors/vim instead, since portageq expand_virtual showed that as the fallback provider in comment #2.
Comment 8 Antonis Konstantinos Tzorvas 2011-06-06 22:37:01 UTC
i allready have vim in my world set!

since now it was ok, but with the latest upgrade of portage, i have this problem..
Comment 9 Zac Medico gentoo-dev 2011-06-06 22:42:47 UTC
Nonetheless, --depclean is still behaving as designed. The behavior is not due to portage, but due to the addition of the new-style GLEP 37 virtual approximately 4 weeks ago:

  http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/virtual/editor/
Comment 10 Albert W. Hopkins 2011-06-07 00:38:22 UTC
--depclean wants to remove my pager (suddenly).  I presume because util-linux satisfies virtual/pager.  Yet my install of util-linux doesnt' seem to have a pager installed.  Perhaps it installs one via some combination of use flags. So either this is a problem with portage or a problem with virtual/pager, but I didn't have this problem before the portage update.
Comment 11 Albert W. Hopkins 2011-06-07 00:44:48 UTC
(In reply to comment #10)
> --depclean wants to remove my pager (suddenly).  I presume because util-linux
> satisfies virtual/pager.  Yet my install of util-linux doesnt' seem to have a
> pager installed.  Perhaps it installs one via some combination of use flags. So
> either this is a problem with portage or a problem with virtual/pager, but I
> didn't have this problem before the portage update.

util-linux needs ncurses to install /bin/more.  Will file a seperate bug.
Comment 12 Zac Medico gentoo-dev 2011-06-07 01:13:42 UTC
(In reply to comment #11)
> util-linux needs ncurses to install /bin/more.  Will file a seperate bug.

Yeah, then the virtual should be updated to pull in sys-apps/util-linux[ncurses].

I've updated the sys-apps/portage ebuilds to pull in sys-apps/less by default, since that's the default pager used by etc-update and dispatch-conf. If you don't want less, you can set USE="-less" so that it won't be pulled in.
Comment 13 Zac Medico gentoo-dev 2011-06-07 02:38:27 UTC
(In reply to comment #9)
> Nonetheless, --depclean is still behaving as designed. The behavior is not due
> to portage, but due to the addition of the new-style GLEP 37 virtual
> approximately 4 weeks ago:
> 
>   http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/virtual/editor/

The behavior change is also partially due to this commit:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=4f66159887fc4e3ec8bd87ae0f08ba249f98631b

Still, the behavior is intended.

It think that we can close this bug now, since I've added the less? ( sys-apps/less ) dependency to sys-apps/portage. However, I'll leave this bug open for a couple of days, since people who have already updated to portage-2.1.10 or portage-2.2.0_alpha38 are likely to be confused when they see --depclean remove sys-apps/less.
Comment 14 Albert W. Hopkins 2011-06-07 02:50:00 UTC
FWIW, my pager was sys-apps/most, and --depclean tried to unmerge sys-apps/most.
Comment 15 Zac Medico gentoo-dev 2011-06-07 03:04:14 UTC
(In reply to comment #14)
> FWIW, my pager was sys-apps/most, and --depclean tried to unmerge
> sys-apps/most.

That's going to happen with any pager, as long as util-linux satisfies virtual/pager. So, if you want anything other than sys-apps/util-linux (pulled in by virtual/pager) or sys-apps/less (pulled in by sys-apps/portage now), then you'll have to add it to your world set:

  emerge --noreplace sys-apps/most
Comment 16 Antonis Konstantinos Tzorvas 2011-06-07 08:23:12 UTC
so about `less` it's ok since its been pulled from portage

and about `nano` if someone needs it, you will have to do 
`emerge --noreplace app-editors/nano`

that's because, virtual/pager puts packages inside an "OR statement"

so i have installed in my system vim & nano, but nano is not a dependency in any other package.

Instead, vim is being used from 

"
app-vim/gentoo-syntax-20101212 (/usr/share/vim)
app-vim/gtk-syntax-20110214-r1 (/usr/share/vim)
app-vim/pam-syntax-20060424 (/usr/share/vim)
dev-libs/protobuf-2.4.1 (/usr/share/vim)
dev-util/cmake-2.8.4-r1 (/usr/share/vim)
dev-vcs/git-1.7.5.3 (/usr/share/git/contrib/vim)
dev-vcs/mercurial-1.8.3 (/usr/share/doc/mercurial-1.8.3/contrib/vim)
dev-vcs/subversion-1.6.16 (/usr/share/vim)
"

so if someone needs nano, he will have to do `emerge --noreplace app-editors/nano`

this is the "steps" for any other package like `nano` etc

have fun :)

Status updated as "RESOLVED" "FIXED"
Comment 17 Eray Aslan gentoo-dev 2011-06-07 10:41:40 UTC
*** Bug 370437 has been marked as a duplicate of this bug. ***
Comment 18 Erik Zeek 2011-06-07 11:17:21 UTC
Does this change warrant a news item?  Many people (including myself) might be surprised by the change.
Comment 19 Alan McKinnon 2011-06-07 11:35:12 UTC
The explanations offered are not satisfactory and contradict long-standing portage behavior:

system is a subset of world, so anything in system is automatically considered to be in world. I want nano AND vim. My profile defines nano to be in system, so I added vim to world to get what I want.

system is supposed to be invariant and not subject to logical OR conditions based on virtuals. "Just put it in world" is not a satisfactory answer as I'm trying to lessen the clutter in there already not increase it.

I really don't see the point of this change; from where I sit it really looks like software trying to be too smart for it's own good. I also don't agree with the new less flag in USE, it has all the hallmarks of a workaround and will no doubt lead to more such workarounds to confuse users.
Comment 20 Antonis Konstantinos Tzorvas 2011-06-07 11:58:25 UTC
according to http://www.gentoo.org/proj/en/glep/glep-0037.html 

"Dropping of support of current style virtuals is planned for the following major version of portage (2.2.0). When the time comes to release it, scripts will be written to create packages from the existing virtuals system as well as to create appropriate package.prefer overrides within the profiles."

maybe we will have to wait a little for a more suitable behavior of portage-2.2 according support for virtuals.
it's still masked.

also, maybe STATUS should change to "Confirmed" again, until portage-2.2 will don't do the same with any other packages that are in @system.

also, maybe title would have to be more specific to the real problem, because it's a problem between virtuals' `OR` condition inside RDEPENDS & @system packages that should have exactly the same behavior by portage's `emerge --depclean`

Sorry for the fast switch to RESOLVED -> FIXED and for incomplete explanation, i tried to understand & solve the problem from my side :)
Comment 21 Zac Medico gentoo-dev 2011-06-07 12:19:26 UTC
(In reply to comment #18)
> Does this change warrant a news item?  Many people (including myself) might be
> surprised by the change.

I think people can cope with this without any need for a news item. We've always had to be careful with --depclean anyway, and the way to keep stuff via --noreplace has always been the same.

If we get lots of questions about this, we can add a "Why does emerge --depclean remove system packages?" section to this FAQ:

  http://www.gentoo.org/proj/en/portage/doc/faq.xml

(In reply to comment #19)
> system is a subset of world, so anything in system is automatically considered
> to be in world.

This remains true. However it's worth noting that the @selected set was added in portage-2.1.9 in order to represent the packages that the user has added to @world by explicitly installing them.

> I want nano AND vim. My profile defines nano to be in system,
> so I added vim to world to get what I want.

The profile pulls virtual/editor into system, not nano. So, you may need to add nano to world to get what you want.

> system is supposed to be invariant and not subject to logical OR conditions
> based on virtuals.

I don't know where you got this idea. You can see here that the base profile contained virtuals in the system set from the very beginning:

  http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/profiles/base/packages?view=log

> "Just put it in world" is not a satisfactory answer as I'm
> trying to lessen the clutter in there already not increase it.

The world file (aka @selected set) was established for this purpose. There is currently no other way to create preferences for OR deps. In GLEP 37 there's mention of a package.prefer file, but it was never implemented:

  http://www.gentoo.org/proj/en/glep/glep-0037.html

> I really don't see the point of this change; from where I sit it really looks
> like software trying to be too smart for it's own good.

For info about the recent migration away from old-style PROVIDE virtuals, see the "Death to old-style virtuals!" thread here:

  http://archives.gentoo.org/gentoo-dev/msg_33f2f25666f6d546a3763497955503b1.xml

The general consensus was to migrate entirely to GLEP 37 virtuals, so that's what we've done.

> I also don't agree with
> the new less flag in USE, it has all the hallmarks of a workaround and will no
> doubt lead to more such workarounds to confuse users.

I suppose it could be represented as a "suggested dependency", but that's not implemented yet (see bug 327701).

(In reply to comment #20)
> maybe we will have to wait a little for a more suitable behavior of portage-2.2
> according support for virtuals.
> it's still masked.

All versions of portage behave more or less identically with these virtuals. However, since portage-2.1.10, the following commit makes --depclean eliminate redundant packages more effectively:

  http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=4f66159887fc4e3ec8bd87ae0f08ba249f98631b
Comment 22 Antonis Konstantinos Tzorvas 2011-06-07 12:27:38 UTC
(In reply to comment #21)
> If we get lots of questions about this, we can add a "Why does emerge
> --depclean remove system packages?" section to this FAQ:
> 
>   http://www.gentoo.org/proj/en/portage/doc/faq.xml

It would be great!

also thanks a lot for your useful links!
Comment 23 Juergen Rose 2011-06-07 14:54:18 UTC
Here, 'emerge --depclean' wants to remove nano and vim:

root@lynx:/root(7)# emerge -p --depclean
...

!!! 'app-editors/nano' is part of your system profile.
!!! Unmerging it may be damaging to your system.


 app-editors/nano
    selected: 2.3.1 
   protected: none 
     omitted: none 
...
 app-editors/vim
    selected: 7.3.189 
   protected: none 
     omitted: none 

I thought that at least one should remain as virtual/editor.
Comment 24 Zac Medico gentoo-dev 2011-06-07 15:09:55 UTC
(In reply to comment #23)
> I thought that at least one should remain as virtual/editor.

You'll have to add them to world, like this:

   emerge --noreplace nano vim

Note that the list of possible editors is quite long. For a complete list, see the RDEPEND variable of virtual/editor-0.ebuild:

http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/virtual/editor/editor-0.ebuild?view=markup

If any one of those is installed, then it will satisfy virtual/editor, and you'll have to add your preferred choice to world in order to ensure that it's never removed by --depclean.
Comment 25 Alan McKinnon 2011-06-07 20:08:18 UTC
(In reply to comment #21)
> (In reply to comment #18)
> > Does this change warrant a news item?  Many people (including myself) might be
> > surprised by the change.

[snip detailed rationale of the reasoning behind the behaviour]

That all sounds very reasonable, thanks. Looks like lose a little bit today to gain a lot in the future, I can live with that :-)

My questions are answered so I guess I'm outta here now.
Comment 26 Daniel Robbins 2011-06-08 19:40:03 UTC
I agree with those that think that "nano" should not be unmerged. I also think adding the ebuilds to the world set is a work-around and not a correct fix.

This isn't a Portage bug, it's a profile bug. The solution is for Gentoo to specifically add "nano" and other things to the system profile, rather than use virtuals in the system profile, so that users can always be assured that "nano" and "less" are installed on their systems. (The concept of a "system profile" is that is lists the specific packages that people expect to *always* be installed. Using virtuals here isn't appropriate.)

Recommendation: re-open and re-classify as a profile bug.
Comment 27 Zac Medico gentoo-dev 2011-06-08 20:32:35 UTC
I've updated the unmerge warning message to show the virtual so that it's obvious when a package is a member of the system set due to it being a virtual provider:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=ac01d2898ece4589cdaa971382cc1dc17261ed58

For example, unmerge of nano will show virtual/editor like this:

	!!! 'app-editors/nano' (virtual/editor) is part of your system profile.
	!!! Unmerging it may be damaging to your system.


	app-editors/nano
		selected: 2.3.1
	protected: none
		omitted: none

	All selected packages: app-editors/nano-2.3.1

(In reply to comment #26)
> Recommendation: re-open and re-classify as a profile bug.

Let's file a new bug for that.
Comment 28 Zac Medico gentoo-dev 2011-06-10 10:24:20 UTC
(In reply to comment #22)
> (In reply to comment #21)
> > If we get lots of questions about this, we can add a "Why does emerge
> > --depclean remove system packages?" section to this FAQ:
> > 
> >   http://www.gentoo.org/proj/en/portage/doc/faq.xml
> 
> It would be great!

I've added this new section to the FAQ:

Why does emerge --depclean sometimes remove system packages?

For system dependencies that are specified as virtuals, such as virtual/editor, it's common to have multiple packages installed that are capable of satisfying the dependency. In this case, redundant packages may be removed by emerge --depclean unless they are explicitly added to the world set. You can use emerge --noreplace <atom> to have a package added to the world set, and this will guarantee that this package will not be removed by emerge --depclean.
Comment 29 Jeremy Olexa (darkside) (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2011-06-14 15:06:07 UTC
*** Bug 371621 has been marked as a duplicate of this bug. ***
Comment 30 Dirkjan Ochtman gentoo-dev 2011-07-04 09:21:56 UTC
Idle idea: it would be awesome if the setting of EDITOR and PAGER in /etc/profile worked in a way that Portage could take those into account.
Comment 31 Zac Medico gentoo-dev 2011-07-04 09:32:08 UTC
(In reply to comment #30)
> Idle idea: it would be awesome if the setting of EDITOR and PAGER in
> /etc/profile worked in a way that Portage could take those into account.

One possible way to do this would be to have eselect-editor and eselect-python modules with package manager integration. The same idea came up in bug 283587 for eselect-kernel.
Comment 32 Pacho Ramos gentoo-dev 2011-07-13 10:41:40 UTC
Wouldn't be better to make "emerge --depclean" not to try to remove packages listed as "system" packages?

I think there is no sense on allowing its removal is the "official suggestion in FAQ" is to prevent that removal adding them manually to world
Comment 33 Zac Medico gentoo-dev 2011-07-13 15:36:30 UTC
(In reply to comment #32)
> Wouldn't be better to make "emerge --depclean" not to try to remove packages
> listed as "system" packages?

No, because the whole point of --depclean is to remove redundant packages. If you have more than one package satisfying virtual/editor, then you have a redundancy, and --depclean would be failing to remove redundant packages if it didn't remove app-editors/nano in this case.

It's worth noting that if --depclean fails to identify redundant packages, then it will prevent automatic resolution of blockers from working in cases where two redundant packages block each other (see bug 264434).

> I think there is no sense on allowing its removal is the "official suggestion
> in FAQ" is to prevent that removal adding them manually to world

I think your complaint is really that the system set contains virtual/editor instead of app-editors/nano. Until somebody adds app-editors/nano to the system set, or implements the idea discussed in bug 283587, you're going to have to add your redundant editor to world if you want to keep along with the other editor(s) you have installed.
Comment 34 Pacho Ramos gentoo-dev 2011-07-13 15:51:38 UTC
(In reply to comment #33)
> (In reply to comment #32)
> > Wouldn't be better to make "emerge --depclean" not to try to remove packages
> > listed as "system" packages?
> 
> No, because the whole point of --depclean is to remove redundant packages. If
> you have more than one package satisfying virtual/editor, then you have a
> redundancy, and --depclean would be failing to remove redundant packages if it
> didn't remove app-editors/nano in this case.
> 

As there is a redundancy, portage shouldn't warn people about a system package going to be removed as other installed packages also provide virtual/editor, no? The warning should only be shown if last provider is going to be removed for some reason
Comment 35 Zac Medico gentoo-dev 2011-07-13 16:06:26 UTC
(In reply to comment #34)
> As there is a redundancy, portage shouldn't warn people about a system package
> going to be removed as other installed packages also provide virtual/editor,
> no?

The thing is, the package being removed technically is a member of the system set in an ambiguous sort of way. Therefore, it's arguable that it's desirable to err on the safe side and show the warning even though the package is redundant.

> The warning should only be shown if last provider is going to be removed
> for some reason

As said, it can be argued that the warning is justified due to the ambiguity. As shown in comment #27, the warning show virtual/editor in parenthesis in order to hint at the possible ambiguity.
Comment 36 Pacho Ramos gentoo-dev 2011-07-13 16:23:21 UTC
I still think that, since portage is (properly) thinking it can remove nano due other editor providers being present, it should be coherent and don't show the warning as other providers are there. 

But wanting to remove it due redundancy and, just later, suggesting the user to not remove it (in portage message and FAQ), looks really contradictory to me (and to other people that saw the message and asked me about how to proceed -> My first intention was to go ahead and remove it as I have always used other editors than nano but reading the warning message preventing me from doing so as I thought it was still required by anything in the system).
Comment 37 Zac Medico gentoo-dev 2011-07-13 16:40:59 UTC
(In reply to comment #36)
> I still think that, since portage is (properly) thinking it can remove nano due
> other editor providers being present, it should be coherent and don't show the
> warning as other providers are there. 

I think it might be more optimal clarify the warning with a list of alternative providers that are installed. Please file a new bug about changing the warning message.

> But wanting to remove it due redundancy and, just later, suggesting the user to
> not remove it (in portage message and FAQ), looks really contradictory to me
> (and to other people that saw the message and asked me about how to proceed ->

Maybe people just need some time to grow accustomed to this sort of behavior.

> My first intention was to go ahead and remove it as I have always used other
> editors than nano but reading the warning message preventing me from doing so
> as I thought it was still required by anything in the system).

If it was still required in a non-redundant sense, then --depclean would not suggest to remove it.
Comment 38 Pacho Ramos gentoo-dev 2011-07-13 16:59:22 UTC
Opened then :)
https://bugs.gentoo.org/show_bug.cgi?id=375115
Comment 39 Dirkjan Ochtman gentoo-dev 2011-07-14 07:03:37 UTC
Yeah, I think the real problem here is that the act of having another editor installed doesn't mean I don't use nano (I might be using it as the default EDITOR, even, and Portage wouldn't know). That makes it kind of icky that Portage just kind of randomly gives preference to one of the installed editors. Or is there a method to the way Portage selects which virtual/editor is most appropriate?
Comment 40 Zac Medico gentoo-dev 2011-07-14 07:44:38 UTC
(In reply to comment #39)
> Yeah, I think the real problem here is that the act of having another editor
> installed doesn't mean I don't use nano (I might be using it as the default
> EDITOR, even, and Portage wouldn't know). That makes it kind of icky that
> Portage just kind of randomly gives preference to one of the installed editors.

It's not random. The system and world sets are always pulled into the depgraph first. If world happens to contain an editor such as app-editors/vim, then that will satisfy virtual/editor, and any others that aren't in world will be removed by depclean.

If world doesn't contain an editor, then selection moves from left to right in the dependencies of virtual/editor. If none of those editors happen to be installed, then it simply picks app-editors/nano since that one is listed furthest to the left in the dependencies of virtual/editor.

> Or is there a method to the way Portage selects which virtual/editor is most
> appropriate?

It's just as I've described above. The world file is the best way to control depclean until the idea discussed in bug 283587 is implemented.
Comment 41 Nikolay Antonov 2011-09-19 17:36:53 UTC
While nano is default editor in gentoo handbook it is bad idea to remove it at depclean. New users can be confused when gentoo remove "default" text editor.

Also, it is good idea to have "default" text editor on all gentoo systems (like vi(m?) in RedHat), so Administrators can quickly solve problems on remote (foreign) systems without thinking about emacs hotkeys or how app-editors/ed works.
Comment 42 Zac Medico gentoo-dev 2011-09-19 17:40:27 UTC
(In reply to comment #41)
> While nano is default editor in gentoo handbook it is bad idea to remove it at
> depclean. New users can be confused when gentoo remove "default" text editor.
> 
> Also, it is good idea to have "default" text editor on all gentoo systems (like
> vi(m?) in RedHat), so Administrators can quickly solve problems on remote
> (foreign) systems without thinking about emacs hotkeys or how app-editors/ed
> works.

You can file a bug for base-system, to have app-editors/nano added to the system set. The content of the system set is not controlled by portage.
Comment 43 白川間瀬流 2011-10-26 06:06:07 UTC
When i understand this bug right

depclean only removes the applications if a other provider is there?

so for example if you remove less, the provider now is sys-apps/util-linux[ncurses]

I understand that. What i not understand is that a lot of my system (incl. the "man" command) doesnt work without less or at least more.

So if less gets removed the system damaged and you can not even read a man-page to fix it.

sys-apps/util-linux[ncurses] is no replace or provider for less.

So why does portage remove less and detects sys-apps/util-linux[ncurses] when it doesnt provide the functionality and so you end with a broken system.
Comment 44 Pacho Ramos gentoo-dev 2011-10-26 09:06:27 UTC
If sys-apps/man requires less, it should be added to its RDEPEND (you should open a different bug for that)
Comment 45 SpanKY gentoo-dev 2011-10-26 09:50:42 UTC
man does not need less.  it needs a pager.  any will do.
Comment 46 MCassaniti 2012-02-14 23:36:32 UTC
Can I suggest that the installation documentation be updated (specifically the Installing Necessary System Tools section) to reflect that a pager and editor need to be chosen. Something should be in there to state that an out of the box install comes with nano and less, but that if you choose to keep these packages and not choose an alternate now, the command 'emerge --noreplace nano less' should be run. Don't forget the eselect details for a different editor either

That should solve the issue of loosing the expected pager and editor if the new user is not aware these could be removed. It also means that the warning about __an__ editor or pager being removed from the system profile is not required, unless it is the last editor/pager installed.
Comment 47 Malte E. 2012-09-16 10:14:40 UTC
This is all about emerge --depclean removing nano, when there is a substitute. For me, there is no substitute and it still wants to remove it. That is not correct behaviour.

workoft-laptop ~ # portageq expand_virtual / virtual/editor
app-editors/nano

and emerge --depclean wants to remove it.
Comment 48 Zac Medico gentoo-dev 2012-09-16 16:54:20 UTC
(In reply to comment #47)
> This is all about emerge --depclean removing nano, when there is a
> substitute. For me, there is no substitute and it still wants to remove it.
> That is not correct behaviour.

You need to add it to your world file if you want to keep it, like this:

   emerge --norepace app-editors/nano

> workoft-laptop ~ # portageq expand_virtual / virtual/editor
> app-editors/nano

That expand_virtual query reports the preferred provider, but if it's not in your world file, then it's not protected from --depclean. The reason that app-editors/nano is preferred is because of the order of the atoms listed in the virtual/editor-0 ebuild:

$ portageq metadata / ebuild virtual/editor-0 RDEPEND
|| ( app-editors/nano app-editors/dav app-editors/e3 app-editors/ee app-editors/efte app-editors/elvis app-editors/emacs app-editors/emacs-vcs app-editors/emact app-editors/ersatz-emacs app-editors/fe app-editors/jasspa-microemacs app-editors/jed app-editors/joe app-editors/jove app-editors/le app-editors/levee app-editors/lpe app-editors/mg app-editors/ne app-editors/ng app-editors/nvi app-editors/qemacs app-editors/teco app-editors/uemacs-pk app-editors/vile app-editors/vim app-editors/gvim app-editors/xemacs app-editors/zile app-misc/mc[edit] dev-lisp/cmucl mail-client/pine sys-apps/ed )

If you have any of those other editors installed, then you need to add app-editors/nano to your world file, or else --depclean will remove it.
Comment 49 Marios Andreopoulos 2012-10-28 12:55:31 UTC
(In reply to comment #48)
> $ portageq metadata / ebuild virtual/editor-0 RDEPEND
> || ( app-editors/nano app-editors/dav app-editors/e3 app-editors/ee
> app-editors/efte app-editors/elvis app-editors/emacs app-editors/emacs-vcs
> app-editors/emact app-editors/ersatz-emacs app-editors/fe
> app-editors/jasspa-microemacs app-editors/jed app-editors/joe
> app-editors/jove app-editors/le app-editors/levee app-editors/lpe
> app-editors/mg app-editors/ne app-editors/ng app-editors/nvi
> app-editors/qemacs app-editors/teco app-editors/uemacs-pk app-editors/vile
> app-editors/vim app-editors/gvim app-editors/xemacs app-editors/zile
> app-misc/mc[edit] dev-lisp/cmucl mail-client/pine sys-apps/ed )
> 
> If you have any of those other editors installed, then you need to add
> app-editors/nano to your world file, or else --depclean will remove it.

Sorry for the late answer on a closed bug but I think the root of the problem was never mentioned in this thread and I came upon this small inconvenience on a fresh ~amd64 installation.

I believe the problem with the above list is that it contains ed.

ed is a dependency for curl, which is a dependency for cmake, which is a dependency for mysql and most Qt based software.

Also curl is a dependency for two other popular ebuilds: libreoffice and gnupg.

So it is difficult to find a system without ed and thus virtual/editor could only contain ed for 95% of users.
Comment 50 No Name 2013-04-18 21:43:48 UTC
I use gentoo 13 profile and today depclean wanted to remove nano also... I have added it world file and now I think it is ok. But like the comment before said clearly on my system is "ed" installed because other application need it. Therefore a proper fix is needed anymore I think...
Comment 51 Dave Kemper 2013-05-29 01:45:31 UTC
The proper fix is to clearly explain why the package is selected for removal, and how to remedy that if that's not desired.  I've proposed a warning message for --depclean's output (bug 375115 comment 4) that I believe does both of these things.
Comment 52 Steve L 2013-10-15 07:20:10 UTC
(In reply to Marios Andreopoulos from comment #49)
> I believe the problem with the above list is that it contains ed.

I totally agree; and I use ed quite a lot (for scripting.) In fact I've often complained that it's not installed by default, since it's required by POSIX. I definitely do not consider it suitable as an interactive editor however, even if I can use it (and have, during recovery.)

(In reply to Dave Kemper from comment #51)
> The proper fix is to clearly explain why the package is selected for
> removal, and how to remedy that if that's not desired.  I've proposed a
> warning message for --depclean's output (bug 375115 comment 4) that I
> believe does both of these things.

That's a fix for the message, and I agree your version is much better.

It doesn't change the fact that, unless you're Thompson or Kernighan, ed is a pita to use interactively, and should not be in the list for the virtual. It was originally designed for use on a teletype terminal, without a screen, and its only modern usage is in scripts, or very occasionally as a last resort for those who know how to work it (which is not many, ime: if you use it, or want to know more, please do /join #ed.)

As a core POSIX util, it should, however, be installed, and that virtual is the reason I was given for it not being installed by default (shortly after nano got cleaned a few years ago.) Remove it from the list, and we can fix both issues, so that there's less chance of this (interactive editor removal) happening to other people, and when it does they'll have a decent message.
Comment 53 Andrey Aleksandrovich 2016-10-30 11:33:40 UTC
(In reply to Zac Medico from comment #48)
> You need to add it to your world file if you want to keep it, like this:
> 
>    emerge --norepace app-editors/nano
**
--noreplace



Maybe we have to add USE flags to the virtual/editor ebuild?
The USE flags can be the same names as possible providers (i.e. nano dav e3 ee efte elvis emacs emacs-vcs emact ersatz-emacs fe jasspa-microemacs jed joe jove le levee lpe mg ne neovim ng nvi qemacs teco uemacs-pk vile vim gvim xemacs zile mc cmucl alpine ed).
Make the 'nano' flag turned on by default and app-editors/nano will not be removed by --depclean. Users who prefer another EDITOR will have to just set another USE flag.
Comment 54 David Zaslavsky 2016-12-18 03:31:44 UTC
(In reply to Andrey Aleksandrovich from comment #53)
> 
> Maybe we have to add USE flags to the virtual/editor ebuild?
> The USE flags can be the same names as possible providers (i.e. nano dav e3
> ee efte elvis emacs emacs-vcs emact ersatz-emacs fe jasspa-microemacs jed
> joe jove le levee lpe mg ne neovim ng nvi qemacs teco uemacs-pk vile vim
> gvim xemacs zile mc cmucl alpine ed).
> Make the 'nano' flag turned on by default and app-editors/nano will not be
> removed by --depclean. Users who prefer another EDITOR will have to just set
> another USE flag.

Does any other virtual/* ebuild work that way, though? It seems more like the kind of thing that would be handled by eselect. In fact, there is already an "editor" module in eselect which controls the EDITOR environment variable.

Granted, I don't think eselect can actually affect ebuild dependencies, but it is possible to create a Portage set that includes packages selected by eselect modules. Incorporating that set into the world set then ensures the user's editor of choice will not be removed. See this forum thread I started: https://forums.gentoo.org/viewtopic-p-8004556.html (which is about basically the same problem with GCC versions instead of editors).
Comment 55 Zac Medico gentoo-dev 2016-12-18 09:52:16 UTC
(In reply to David Zaslavsky from comment #54)
> Granted, I don't think eselect can actually affect ebuild dependencies, but
> it is possible to create a Portage set that includes packages selected by
> eselect modules. Incorporating that set into the world set then ensures the
> user's editor of choice will not be removed. See this forum thread I
> started: https://forums.gentoo.org/viewtopic-p-8004556.html (which is about
> basically the same problem with GCC versions instead of editors).

Yes, bug 283587 is about extending the package manager specification to support this kind of thing.