Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 377045 - Depclean wants to unmerge app-editors/nano even though it is the only attribute of virtual/editor
Summary: Depclean wants to unmerge app-editors/nano even though it is the only attribu...
Status: RESOLVED DUPLICATE of bug 375115
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Dependencies (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
: 519968 655878 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-07-30 12:25 UTC by barrie backhurst
Modified: 2018-05-16 17:25 UTC (History)
2 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 barrie backhurst 2011-07-30 12:25:25 UTC
I have read through bug 370295 and understand that editors in @world are prioritised. However when examining virtual/editor as suggested in that bug

$ portageq expand_virtual / virtual/editor
app-editors/nano

nano is the only one returned, whilst emerge --depclean -p returns the following

>>> These are the packages that would be unmerged:                                                                                                                                                                   
                                                                                                                                                                                                                     
                                                                                                                                                                                                                     
!!! '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

If I understand correctly, this would leave me without an editor and is not the expected result?

Reproducible: Didn't try




$ emerge --info
Portage 2.1.10.9 (default/linux/amd64/10.0/desktop/kde, gcc-4.5.2, glibc-2.13-r4, 2.6.37-gentoo x86_64)
=================================================================
System uname: Linux-2.6.37-gentoo-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4200+-with-gentoo-2.0.3
Timestamp of tree: Sat, 30 Jul 2011 08:45:01 +0000
ccache version 3.1.5 [disabled]
app-shells/bash:          4.2_p10
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r2, 3.2-r2
dev-util/ccache:          3.1.5
dev-util/cmake:           2.8.5-r2
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.8.3-r1
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.10.3, 1.11.1-r1
sys-devel/binutils:       2.21.1
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-r1
sys-kernel/linux-headers: 2.6.38 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo yarik-overlay x-portage
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA ETQW RTCW-ETEULA dlj-1.1 PREY skype-eula AdobeFlash-10.1"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
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"
CXXFLAGS="-march=athlon64 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://mirror.bytemark.co.uk/gentoo/ ftp://mirror.bytemark.co.uk/gentoo/ http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/ ftp://ftp.mirrorservice.org/sites/www.ibiblio.org/gentoo/ http://mirror.qubenet.net/mirror/gentoo/ ftp://mirror.qubenet.net/mirror/gentoo/ http://gentoo.virginmedia.com/ ftp://gentoo.virginmedia.com/sites/gentoo "
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_GB en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/yarik-overlay /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdinstall cli consolekit cracklib crypt cups cxx dbus declarative divx djvu dri dts dvd dvdr emboss encode exif fam firefox flac fontconfig fortran fts3 gdbm gdu gif git gpm htmlhandbook iconv icu ipv6 jadetex java jpeg kde kipi lcms ldap libnotify live lm_sensors mad messenger mmx mmxext mng modules mp3 mp4 mpeg msn mudflap multilib musicbrainz ncurses nls nptl nptlonly nsplugin ogg openal opengl openmp pam pango pcre pdf perl phonon plasma png policykit ppds pppd private-headers python qt3support qt4 readline rtc samba sdl semantic-desktop session spell sql sqlite sse sse2 ssl startup-notification svg sysfs tcpd thumbnail tiff tk truetype udev unicode usb vdpau vnc vorbis wmp x264 xcb xcomposite 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB 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" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Zac Medico gentoo-dev 2011-07-30 21:01:56 UTC
You must have another editor installed, or else --depclean would not remove app-editors/nano.

The portageq expand_virtual function is only supposed to return the provider that is preferred according to the dependencies of virtual/editor. Since app-editors/nano is leftmost in the dependencies of virtual/editor, that is the one that is returned. If you uninstalled app-editors/nano, then the portageq expand_virtual would return the other editor that you have installed.

The bottom line is, if you use app-editors/nano then you should add it to your world file, like this:

   emerge --noreplace app-editors/nano

If you don't use app-editors/nano, then you can safely remove it. Just make sure that you have some other console mode editor installed, such as app-editors/vim or app-editors/emacs.
Comment 2 barrie backhurst 2011-07-30 22:22:00 UTC
Sorry I was confused by Comment 2 on Bug 370295 with regards to the function of

portageq expand_virtual / virtual/editor

However, I do not seem to have another editor installed as eix only returns one result

$ eix -I -C "app-editors"
[I] app-editors/nano
     Available versions:  1.3.12-r1 2.0.9 2.1.10 2.2.5 (~)2.3.1 {debug justify minimal ncurses nls slang spell unicode}
     Installed versions:  2.3.1(10:01:35 12/05/11)(ncurses nls spell unicode -debug -justify -minimal -slang)
     Homepage:            http://www.nano-editor.org/
     Description:         GNU GPL'd Pico clone with more functionality

I have no problem with running

emerge --noreplace app-editors/nano

I felt it was a bug within emerge --depclean that it would leave me without a editor installed?
Comment 3 Zac Medico gentoo-dev 2011-07-30 22:32:57 UTC
(In reply to comment #2)
> However, I do not seem to have another editor installed as eix only returns one
> result
> 
> $ eix -I -C "app-editors"

Your query is incomplete, since some editors exist in other categories. For a complete list, run 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/gvim 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/xemacs app-editors/zile app-misc/mc[edit] dev-lisp/cmucl mail-client/pine sys-apps/ed )

Maybe you have sys-apps/ed installed. There reason that emerge still warns is that you may not even be aware which other editor you have installed, or you may prefer app-editors/nano over the other editor that happens to be installed.

> I have no problem with running
> 
> emerge --noreplace app-editors/nano
> 
> I felt it was a bug within emerge --depclean that it would leave me without a
> editor installed?

It's a property of the system set and virtual/editor, rather than emerge --depclean. It's important for emerge --depclean to eliminate redundant package whenever possible, since this allows automatic resolution of blockers in cases where two redundant packages block each other (see bug 264434).
Comment 4 Zac Medico gentoo-dev 2011-07-30 22:36:52 UTC

*** This bug has been marked as a duplicate of bug 375115 ***
Comment 5 barrie backhurst 2011-07-30 23:16:38 UTC
Zac, many thanks for your patience and explanations, I found sys-apps/ed on my system
Comment 6 Zac Medico gentoo-dev 2015-03-24 23:23:41 UTC
*** Bug 519968 has been marked as a duplicate of this bug. ***
Comment 7 dwfreed 2018-05-16 17:25:29 UTC
*** Bug 655878 has been marked as a duplicate of this bug. ***