I just installed: [ebuild R ] sys-kernel/gentoo-sources-2.6.23-r5 USE="-build -symlink" 0 kB Before that, I had: --($:/usr/src)-- ls -la /usr/src insgesamt 72 drwxr-xr-x 7 root root 4096 8. Jan 13:51 . drwxr-xr-x 19 root root 4096 18. Oct 09:44 .. -rw-r--r-- 1 root root 43678 27. Sep 12:06 .config -rw-r--r-- 1 root root 0 3. Aug 2006 .keep drwxr-xr-x 19 root root 4096 9. Nov 09:21 linux-2.6.23-gentoo-r1 drwxr-xr-x 2 root root 4096 9. Nov 09:21 linux-2.6.23-gentoo-r1.objdir-gentoo-usb drwxr-xr-x 20 root root 4096 10. Dec 15:38 linux-2.6.23-gentoo-r1.objdir-notebook drwxr-xr-x 7 root root 4096 18. Jul 10:26 rpm Now I have: --($:/usr/src)-- ls -la /usr/src insgesamt 72 drwxr-xr-x 7 root root 4096 8. Jan 13:51 . drwxr-xr-x 19 root root 4096 18. Oct 09:44 .. -rw-r--r-- 1 root root 43678 27. Sep 12:06 .config -rw-r--r-- 1 root root 0 3. Aug 2006 .keep lrwxrwxrwx 1 root root 22 8. Jan 13:51 linux -> linux-2.6.23-gentoo-r5 drwxr-xr-x 19 root root 4096 9. Nov 09:21 linux-2.6.23-gentoo-r1 drwxr-xr-x 2 root root 4096 9. Nov 09:21 linux-2.6.23-gentoo-r1.objdir-gentoo-usb drwxr-xr-x 20 root root 4096 10. Dec 15:38 linux-2.6.23-gentoo-r1.objdir-notebook drwxr-xr-x 19 root root 4096 8. Jan 13:51 linux-2.6.23-gentoo-r5 drwxr-xr-x 7 root root 4096 18. Jul 10:26 rpm Ie. the system created a linux-2.6.23-gentoo-r5 directory, as expected, but also a /usr/src/linux -> linux-2.6.23-gentoo-r5 symlink. The symlink should NOT have been created, as I have used USE=-symlink. --($:~)-- emerge --info Portage 2.1.4_rc14 (default-linux/x86/2007.0/desktop, gcc-4.2.2, glibc-2.7-r0, 2.6.23-gentoo-r1.r08.mit-ide-mod_2 i686) ================================================================= System uname: 2.6.23-gentoo-r1.r08.mit-ide-mod_2 i686 Genuine Intel(R) CPU T2400 @ 1.83GHz Timestamp of tree: Tue, 08 Jan 2008 08:46:01 +0000 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.4 [enabled] app-shells/bash: 3.2_p17-r1 dev-java/java-config: 1.3.7, 2.1.2-r1 dev-lang/python: 2.4.4-r4, 2.5.1-r3 dev-python/pycrypto: 2.0.1-r6 dev-util/ccache: 2.4-r7 sys-apps/baselayout: 1.12.10-r5 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.61-r1 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.18-r1 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.24 virtual/os-headers: 2.6.22-r2 ACCEPT_KEYWORDS="x86 ~x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=pentium-m -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-march=pentium-m -O2 -pipe -fomit-frame-pointer" DISTDIR="/Gentoo/Portage/distfiles" EMERGE_DEFAULT_OPTS="--alphabetical" FEATURES="buildpkg ccache collision-protect distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS=" http://ftp.heanet.ie/pub/gentoo/ http://ftp.gentoo.or.kr/ http://distfiles.gentoo.org/ http://www.ibiblio.org/pub/Linux/distributions/gentoo " LANG="de_CH.UTF-8" LINGUAS="de" MAKEOPTS="-j3" PKGDIR="/Gentoo/Portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/Gentoo/Portage/build" PORTDIR="/Gentoo/Portage/tree" PORTDIR_OVERLAY="/Gentoo/Portage/local-tree/misc" SYNC="rsync://winds02:10873/gentoo-portage" USE="X acpi alsa berkdb bitmap-fonts bluetooth cairo cdr cli cracklib crypt cups dbus dmi doc dri dvd dvdr dvdread encode fam firefox fortran gdbm gif gnome gnutls gpm gstreamer gtk hal iconv isdnlog jpeg kde kdeenablefinal kdehiddenvisibility ldap libnotify mad midi mmx mp3 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp pam pcmcia pcre pdf perl png pppd python qt3 qt3support qt4 quicktime readline reflection samba sdl session spell spl sse sse2 ssl svg tcpd tiff truetype truetype-fonts type1-fonts unicode vorbis wifi win32codecs x86 xine xinerama xml xorg xv zlib" ALSA_CARDS="hda-intel intel8x0 intel8x0m usb-audio usb-usx3y" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter 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 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" APACHE2_MPMS="worker" CAMERAS="ptp2 directory" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" USERLAND="GNU" VIDEO_CARDS="nv nvidia vga none" Unset: CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Nope, not resolved. Issue exists (for a long time now). On multiple systems. Steps to reproduce: mv /usr/src /usr/src.temp mkdir /usr/src touch /usr/src/.keep USE=-symlink emerge gentoo --(askwar@winnb000488)-(34/pts/12)-(08:04:28/2008-01-09)-- --($:/usr)-- sudo mv src src.temp ; sudo mkdir src ; sudo touch src/.keep --(askwar@winnb000488)-(35/pts/12)-(08:05:06/2008-01-09)-- --($:/usr)-- ls -la src insgesamt 8 drwxr-xr-x 2 root root 4096 9. Jan 08:05 . drwxr-xr-x 19 root root 4096 9. Jan 08:05 .. -rw-r--r-- 1 root root 0 9. Jan 08:05 .keep --(askwar@winnb000488)-(37/pts/12)-(08:05:13/2008-01-09)-- --($:/usr)-- USE=-symlink sudo emerge -1 gentoo-sources > /dev/null 2>&1 --($:/usr)-- ls -la /usr/src insgesamt 12 drwxr-xr-x 3 root root 4096 9. Jan 08:13 . drwxr-xr-x 19 root root 4096 9. Jan 08:05 .. -rw-r--r-- 1 root root 0 9. Jan 08:05 .keep lrwxrwxrwx 1 root root 22 9. Jan 08:13 linux -> linux-2.6.23-gentoo-r5 drwxr-xr-x 19 root root 4096 9. Jan 08:12 linux-2.6.23-gentoo-r5 As you can see, there's now a /usr/src/linux symlink, which should not have been there. How comes, that this symlink exists? And how comes, that this is WFM for you, Jakub?
The symlink will be created no matter whether USE=symlink is enabled if none exist previously, see kernel-2 eclass. That's intended behaviour and not a bug.
Sorry for the confusion. USE=symlink is confusing and quite broken by design. It will be removed at some point in the future. The existing unconditional functionality where a "linux" link is created if it does not exist will stay.