app-emulation/xen-tools-3.0.2 installs both .py and .pyc files, but the .pyc files are modified/overwritten during program execution so portage doesn't remove them during the unmerge. Portage 2.0.54-r2 (default-linux/x86/2006.0, gcc-3.4.6, glibc-2.3.6-r3, 2.6.16.18-xen i686) ================================================================= System uname: 2.6.16.18-xen i686 AMD Athlon(tm) Gentoo Base System version 1.6.14 dev-lang/python: 2.4.2 dev-python/pycrypto: [Not Present] dev-util/ccache: [Not Present] dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1-r2 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-mtune=athlon-xp -O2 -pipe -mno-tls-direct-seg-refs" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-mtune=athlon-xp -O2 -pipe -mno-tls-direct-seg-refs" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig collinsion-protect distlocks maketest sandbox sfperms strict test" GENTOO_MIRRORS="http://mirror.aarnet.edu.au/pub/gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.au.gentoo.org/gentoo-portage" USE="x86 acl apache2 bash-completion berkdb bitmap-fonts bzip2 cli crypt cups encode expat foomaticdb gdbm gif gpm imlib isdnlog jpeg libg++ libwww mikmod motif mp3 mpeg ncurses nls nptl ogg opengl oss pam pcre pdflib perl png pppd python qt quicktime readline reflection sdl session spell spl ssl symlink sysfs tcpd truetype truetype-fonts type1-fonts udev vorbis xml xml2 xmms xorg xv zlib userland_GNU kernel_linux elibc_glibc" Unset: CTARGET, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS, PORTAGE_RSYNC_OPTS
Created attachment 88748 [details] log of emerge unmerge xen-tools
Created attachment 88749 [details, diff] ebuild patch to use distutils eclass The distutils eclass already addresses this problem, so I think using it is the simplest solution. I'm confirmed that when this patch is applyed the .pyc files are correctly removed during unmerge.
Thanks. I've commited your patch.