Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 113551 - etc-update from sys-apps/portage-2.0.53_rc7 cannot find module named portage
Summary: etc-update from sys-apps/portage-2.0.53_rc7 cannot find module named portage
Status: RESOLVED CANTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: PPC OS X
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 115647
  Show dependency tree
 
Reported: 2005-11-25 05:07 UTC by Fabian Groffen
Modified: 2005-12-28 07:04 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Groffen gentoo-dev 2005-11-25 05:07:27 UTC
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
Comment 1 Jason Stubbs (RETIRED) gentoo-dev 2005-11-25 06:34:07 UTC
$ 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. 
Comment 2 Fabian Groffen gentoo-dev 2005-11-25 06:45:29 UTC
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.
Comment 3 Jason Stubbs (RETIRED) gentoo-dev 2005-11-25 06:50:51 UTC
Prefix? 
Comment 4 Fabian Groffen gentoo-dev 2005-11-25 07:37:28 UTC
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)
Comment 5 Jason Stubbs (RETIRED) gentoo-dev 2005-11-25 07:51:10 UTC
Will moving 05portage.envd somewhere else make it work? Would its contents 
need to be changed? 
Comment 6 Fabian Groffen gentoo-dev 2005-11-25 08:13:31 UTC
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).
Comment 7 Jason Stubbs (RETIRED) gentoo-dev 2005-11-25 08:35:12 UTC
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. 
Comment 8 Fabian Groffen gentoo-dev 2005-11-25 08:40:49 UTC
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.
Comment 9 Jason Stubbs (RETIRED) gentoo-dev 2005-12-21 08:22:49 UTC
Pong?
Comment 10 Fabian Groffen gentoo-dev 2005-12-24 02:48:47 UTC
ppc-macos legacy problem, IMHO not fixeable.