A symlink is made from /etc/make.profile to /usr/portage/profiles/default-linux/x86/2004.3 even if /usr is on a different filesystem. It makes the /etc/make.profile link hard to remove/change. Reproducible: Always Steps to Reproduce: 1. have root (/) on one filesystem and /usr on another. 2. 3. Actual Results: discovered the symlink to directory from / to /usr filesystems. Somehow ln accepts it but rm, when asked to delete it, complains that it is 'Not a directory'. annoying. Expected Results: Too much trouble to use symlinks when / and /usr on different filesystems. Better to use mount --bind. Only way I can think of. If this method is used then entries have to made in fstab and emerge has to stop complaining of the fact that /etc/make.profile is not a symlink. # emerge info !!! /etc/make.profile is not a symlink and will probably prevent most merges. !!! It should point into a profile within /usr/portage/profiles/ !!! (You can safely ignore this message when syncing. It's harmless.) Portage 2.0.51-r3 (unavailable, gcc-3.3.4, glibc-2.3.4.20040808-r1, 2.6.8-gentoo-r3 i686) ================================================================= System uname: 2.6.8-gentoo-r3 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz Gentoo Base System version 1.4.16 ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.14.90.0.8-r1 Headers: sys-kernel/linux-headers-2.4.21-r1 Libtools: sys-devel/libtool-1.5.2-r5 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O2 -mcpu=pentium4 -fomit-frame-pointer -march=pentium4 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -mcpu=pentium4 -fomit-frame-pointer -march=pentium4 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache distlocks sandbox sfperms" GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://gentoo.chem.wisc.edu/gentoo/ http://cudlug.cudenver.edu/gentoo/ http://gentoo.mirrors.pair.com/ http://ftp-mirror.internap.com/pub/gentoo/" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X apm arts avi berkdb bitmap-fonts crypt cups dvd encode f77 foomaticdb fortran gdbm gif gnome gtk2 imlib jpeg libg++ libwww mad mikmod mmx mpeg ncurses nls oggvorbis opengl oss pam pdflib png python qt quicktime readline sdl spell ssl svga tcpd threads truetype x86 xml2 xmms xv zlib"
I forgot to add that I am trying to upgrade to 2004.3 from 2004.2 when I discovered this bug.
Ok things to check: ls -lad /etc/make.profile ls -lad /usr/portage/profiles/default-linux/x86/2004.3 I did the following setups to change profile. On mine /usr/portage is a nfs mount. frog glimpse # cd /etc frog etc # ls -lad /etc/make.profile lrwxr-xr-x 1 root root 48 Nov 4 07:55 /etc/make.profile -> ../usr/portage/profiles/default-linux/x86/2004.2 frog etc # rm make.profile frog etc # ln -s ../usr/portage/profiles/default-linux/x86/2004.3 make.profile frog etc # ls -lad make.profile lrwxr-xr-x 1 root root 48 Nov 21 22:13 make.profile -> ../usr/portage/profiles/default-linux/x86/2004.3 frog etc # emerge info Portage 2.0.51-r3 (default-linux/x86/2004.3, gcc-3.4.3, glibc-2.3.4.20040808-r1, 2.6.8-gentoo-r10 i686)
frog pth # rm /etc/make.profile/ rm: cannot remove `/etc/make.profile/': Not a directory frog pth # rm /etc/make.profile works Don't put a trailing '/' on symlinks deletes.