Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 454502 - app-admin/eselect - kernel.eselect: manage world set as well as kernel symlink to prevent depclean of current kernel sources
Summary: app-admin/eselect - kernel.eselect: manage world set as well as kernel symlin...
Status: RESOLVED DUPLICATE of bug 283587
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: eselect (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Gentoo eselect Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-29 09:05 UTC by Volkmar Glauche
Modified: 2013-01-29 15:47 UTC (History)
0 users

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


Attachments
patch to run emerge when changing the kernel symlink (kernel.eselect.patch,785 bytes, patch)
2013-01-29 09:19 UTC, Volkmar Glauche
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Volkmar Glauche 2013-01-29 09:05:28 UTC
I have eselect'ed my active kernel sources so that the /usr/src/linux symlink points to them. I don't always want or manage to keep track with kernel source updates. Once new source versions are released, emerge --depclean always offers to clean the older versions, including the one which has been eselect'ed.
It would be a very helpful enhancement if eselect would not only manage the symlink, but also try to prevent active versions from depclean. Of course, one can run emerge --noreplace and emerge --deselect manually for versions to keep or remove. However, it would be nice if eselect did this while managing the symlink.


Reproducible: Always

Steps to Reproduce:
1. eselect some kernel source
2. emerge -u, updating kernel source
3. emerge -c
Actual Results:  
emerge -c offers to depclean kernel source where /usr/src/linux points to.

Expected Results:  
emerge -c should only offer to depclean that are neither the most recent version nor the one that is currently eselect'ed. Obviously, this will not catch all situations. /usr/src/linux might point to a source not installed from gentoo, the current running kernel might neither be the most recent nor the one eselect'ed. 

Portage 2.1.11.31 (default/linux/amd64/13.0/desktop/gnome, gcc-4.5.4, glibc-2.15-r3, 3.5.7-gentoo-2013-01-22 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.5.7-gentoo-2013-01-22-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E8400_@_3.00GHz-with-gentoo-2.1
Timestamp of tree: Tue, 29 Jan 2013 00:45:01 +0000
ld GNU ld (GNU Binutils) 2.22
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.3-r2, 3.2.3
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13::<unknown repository>, 2.69
sys-devel/automake:       1.5-r1, 1.10.3, 1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.4, 4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo science x-overlay
Installed sets: @system
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=athlon64"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xorg.conf.d /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb /var/spool/maui /var/spool/torque"
CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=athlon64"
DISTDIR="/adm/swinstall/gentoo/portage/distfiles"
EMERGE_DEFAULT_OPTS="-j 3 --keep-going y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://de-mirror.org/gentoo/ ftp://mirror.netcologne.de/gentoo/ ftp://ftp.halifax.rwth-aachen.de/gentoo/ ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://gd.tuwien.ac.at/opsys/linux/gentoo/"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j1"
PKGDIR="/adm/swinstall/gentoo/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/adm/swinstall/gentoo/portage"
PORTDIR_OVERLAY="/var/lib/layman/science /adm/swinstall/gentoo/overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X Xaw3d a52 aac aalib accessibility acl acpi adns afs alsa amd64 ao audiofile auto-hinter avahi bash-completion bcmath berkdb bindist blas bluetooth bonobo branding bzip2 cairo calendar caps cdda cdparanoia cdr clamav cli colord consolekit cracklib crypt cscope ctype cups curl curlwrappers cxx dbm dbus dga dri dts dv dvb dvd dvdr eds emacs emboss encode esd evo exif expat fam fax fbcon ffmpeg fftw firefox flac flash flatfile fltk fortran ftp gcj gd gdbm geoip ggi gif gimp glut gmp gnome gnome-keyring gnome-online-accounts gnutls gphoto2 gpm graphviz gstreamer gtk gtkhtml guile hardened http iconv idn ieee1394 imagemagick imap imlib inifile ipod ipv6 jack java javascript jbig jpeg jpeg2k kde kerberos ladspa lame lapack lash lcms ldap leim libcaca libedit libnotify libvisual libwww lm_sensors logrotate lua m17n-lib mad maildir matroska mbox memlimit mhash migemo mikmod mime mmap mms mmx mng modules mono motif mozilla mp3 mp4 mpeg mplayer mudflap mule multilib musepack nas nautilus ncurses neXt netboot netcdf nls nntp nptl nsplugin offensive ogg openal openexr opengl openmp pam pango pcntl pcre pda pdf perl php plotutils png policykit posix ppds profile pulseaudio python qt3support qt4 quicktime rdesktop readline recode ruby sasl scanner sdl session sharedmem shorten simplexml slang slp smartcard sndfile soap socialweb sockets sox speex spell sqlite sqlite3 sse sse2 ssl startup-notification svg sysvipc szip taglib tcl tcpd theora threads tidy tiff tk tokenizer truetype twolame udev udisks unicode upower usb vcd vim-syntax vorbis vpx wavpack wmf wxwidgets x264 xcb xft xine xinetd xml xmlrpc xpm xsl xv xvid 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="authn_core authz_core socache_shmcb unixd 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="kexi words flow plan sheets stage tables krita karbon braindump" 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="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en de it fr" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="dummy fbdev modesetting nv noveau mga radeon vesa vga ati fglrx intel" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================
USE="(multilib) -doc"

app-admin/eselect-1.3.1 was built with the following:
Comment 1 Volkmar Glauche 2013-01-29 09:19:20 UTC
Created attachment 337198 [details, diff]
patch to run emerge when changing the kernel symlink

This patch runs emerge --deselect when removing the symlink from a source dir that belongs to a kernel version in portage. It also runs emerge --noreplace --nodeps when setting the symlink to a source dir that belongs to a kernel version in portage.
This patch uses equery from app-portage/gentoolkit. If included, the ebuild for app-admin/eselect would need to depend on app-portage/gentoolkit.
Comment 2 Ulrich Müller gentoo-dev 2013-01-29 15:47:50 UTC

*** This bug has been marked as a duplicate of bug 283587 ***