After 'upgrading' portage from portage-2.0.51.22-r3 to portage-2.0.53_rc7, etc-update now gives this message when starting it: % sudo etc-update Traceback (most recent call last): File "<string>", line 1, in ? ImportError: No module named portage Scanning Configuration files... Automerging trivial changes in: etc-update.conf Automerging trivial changes in: make.conf.example Exiting: Nothing left to do; exiting. :) Reproducible: Always Steps to Reproduce: 1. emerge/upgrade portage from 2.0.51.22-r3 to 2.0.53_rc7 2. execute etc-update Actual Results: got import error Expected Results: shut up and do whatever it should do !!! Relying on the shell to locate gcc, this may break !!! DISTCC, installing gcc-config and setting your current gcc !!! profile will fix this Portage 2.0.53_rc7 (default-darwin/macos/10.4, gcc-4.0.0, libsystem-7.1-r0, 8.3.0 Power Macintosh) ================================================================= System uname: 8.3.0 Power Macintosh powerpc macos-20041118 distcc 2.0.1-zeroconf powerpc-apple-darwin7.0 (protocol 1) (default port 3632) [disabled] dev-lang/python: [Not Present] sys-apps/sandbox: [Not Present] sys-devel/autoconf: [Not Present] sys-devel/automake: [Not Present] sys-devel/binutils: [Not Present] sys-devel/libtool: [Not Present] virtual/os-headers: 7.1 ACCEPT_KEYWORDS="ppc-macos" AUTOCLEAN="yes" CBUILD="powerpc-apple-darwin8" CFLAGS="-O3 -pipe" CHOST="powerpc-apple-darwin8" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-O3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig collision-protect cvs distlocks sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/nfs/poseidon/export/home/gentoo/gentoo-x86" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="ppc emboss expat gd gdbm gmp jpeg lcms libwww mng nls opengl pcre png ppc-macos qt tetex tiff truetype userland_Darwin kernel_Darwin elibc_Darwin" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
$ cat /etc/env.d/05portage.envd PYTHONPATH="/usr/lib/portage/pym" You need to env-update. Gentoo's python contains a hack to add in the above path. MacOS was initially supported by hardcoding it throughout portage as well. The above is the happy medium.
env-update won't work with the current situation. In the prefix it will. Thanks for the explanation. I'll stick with 2.0.51.22 for now.
Prefix?
uhm... yeah. Gentoo for OSX currently installs into /usr/bin, where the OS itself places its files too. Because of that, we can't install our own shells for instance. In the prefix we are able to do this, and hence actually source the environment vars without the need to change system provided files (i.e. almost get the same situation the other arches have)
Will moving 05portage.envd somewhere else make it work? Would its contents need to be changed?
env-update does generate the nice files with all of the settings, AFAIK. The problem is not in there. The generated files (like /etc/profile.env) should be sourced by each shell. Problem of the current (broken) OSX setup is that this is not done. Several considerations apply: - you don't want to touch the global settings, as the OS itself might depend on this, and some of the envs might break it - shell startup files (like /etc/profile) can only be influenced by the installer, which only once installed a bash /etc/profile file (which unfortunately is not that super, and updating is always done through portage, so the file is never updated again) - the current installer only accomodates bash users, tcsh users (old default on OSX) are left out - its just far from optimal at the moment, which is a (legacy) problem on our side. We expect to solve this using a prefix-aware version of portage. So to conclude, I think it's just a pity we can't use the new portage without risking getting some trouble, but this shouldn't be a big problem for long (hopefully).
Hmm.. actually, etc-update only uses portageq and portageq still has 'sys.path = ["/usr/lib/portage/pym"]+sys.path' sitting at the top of it. What you are describing doesn't seem possible.
Hmm, ok. I added kito which is in general much better in explaining the portage related things. I probably have a wrong understanding of the system as a whole.
Pong?
ppc-macos legacy problem, IMHO not fixeable.