When switching between python versions eselect-python resets the permissions on /usr/bin/python-config to root's umask. While root has a umask that does not permit 'others' to execute root's files, emerge of ebuilds that need python fail. This happens only when building as another user than root ofcourse. In my case I think it's caused by FEATURES='usersandbox userpriv', which compiles as user portage:portage. What it comes down to is that user portage should have the ability to execute the file /usr/bin/python-config. Reproducible: Always Steps to Reproduce: 1. Set root's umask to 0027. 2. Set FEATURES='userpriv usersandbox' 3. Change python profile with eselect-python 4. Emerge some ebuild that needs python. dev-python/numpy for instance. Actual Results: This error: >>> Compiling source in /var/tmp/portage/dev-python/numpy-1.3.0-r2/work/numpy-1.3.0 ... /var/tmp/portage/dev-python/numpy-1.3.0-r2/temp/environment: line 4831: /usr/bin/python-config: Permission denied * ERROR: dev-python/numpy-1.3.0-r2 failed: * '/usr/bin/python-config' isn't valid script Expected Results: A successful emerge.
Fixed in r314.
Fixed in app-admin/eselect-python-20100321.