ebuild.py around line 850 does something like this (pseudocode): if userpriv in features and ccache in features: # do some other things chown ccache_dir to portage_uid, portage_gid chmod ccache_dir to 0775 if ccache_dir is not owned by portage_gid or perms are not at least 02070: chown ccache_dir to portage_uid, portage_gid chmod ccache_dir to 02770 chown -R cache_dir to portage_uid, portage_gid chmod -R cache_dir to g+rw The net effect of this is that portage will do a chown -R and chmod -R on it on every ebuild step if both userpriv and ccache are in FEATURES. This is silly. A consensus should be reached on: * if the CCACHE_DIR doesn't exist yet, with what permissions do we create it? should these initial permissions depend on userpriv? * on each emerge run, what are the minimal permissions that are enforced? Do these depend on userpriv? There's also a bunch of open bugs on ccache permission problems (like 16664, 22125, 33162 properly" href="show_bug.cgi?id=84062">bug 84062). Some testing of the chosen permissions wouldn't hurt :) I've worked around this for now by making the unconditional chmod/chown in the first "if" above only happen if the ccache dir doesn't exist yet. I'm not sure if this is the "right" fix. Reproducible: Always Steps to Reproduce: 1. install cvs HEAD portage 2. FEATURES="ccache userpriv" emerge portage Actual Results: lots of (slow) "*** Adjusting ccache permissions for portage user..." Expected Results: only done that permission adjustment once. Gentoo Base System version 1.6.10 Portage 1.585-cvs (hardened/x86/2.6, gcc-3.4.3-20050110, glibc-2.3.4.20050125-r0, 2.6.11-gentoo-r3-m3-more-minimal i686) ================================================================= System uname: 2.6.11-gentoo-r3-m3-more-minimal i686 AMD Athlon(tm) XP 2600+ Python: dev-lang/python-2.4-r2 [2.4 (#1, Feb 22 2005, 15:02:34)] distcc: No such file or directory [disabled] dev-lang/python: 2.4-r2 sys-devel/autoconf: 2.59-r6, 2.13 sys-devel/automake: 1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.5 sys-devel/binutils: 2.15.92.0.2-r6 sys-devel/libtool: 1.5.10-r5 virtual/os-headers: 2.6.8.1-r2 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer -fweb -frename-registers" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer -fweb -frename-registers" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig candy ccache confcache distlocks noauto prelink sandbox test userpriv usersandbox verify-rdepend" GENTOO_MIRRORS="http://ftp.easynet.nl/mirror/gentoo/ http://www.gigaload.org/gentoo.org/" LANG="en_US.UTF-8" MAKEOPTS="-j2" PKGDIR="/usr/portage//packages/x86/" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage/" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.nl.gentoo.org/gentoo-portage" USE="x86 3dnow 3dnowex X a52 alsa ansi bzip2 ccache cdr crypt dlloader emacs faad fbcon gnome gstreamer gtk2 javascript jit jpeg kdeenablefinal libcaca maildir md5sum mmx mmx2 mng mozdevelop mozsvg mpeg ncurses nethack network nls no-helpbrowser no-old-linux nptl nptlonly oggvorbis opengl pam png python qemu-fast quicktime readline rtc sdl softmmu spell splash sse ssl svg symlink tetex truetype truetype-fonts unicode userlocales xml2 xv zlib" Unset: ASFLAGS, CBUILD, CTARGET, LC_ALL, LDFLAGS
*** This bug has been marked as a duplicate of 102126 ***