Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 45079 - gensync fails on 'import portage' at line 20 with 'ImportError: No module named portage'
Summary: gensync fails on 'import portage' at line 20 with 'ImportError: No module nam...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Karl Trygve Kalleberg (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-18 16:11 UTC by Jonathan Wright
Modified: 2004-09-10 02:26 UTC (History)
0 users

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 Jonathan Wright 2004-03-18 16:11:10 UTC
After emerging gentoolkit (version 0.2.0_pre2) and updating portage (to 2.0.50-r1) to be able to use gensync to import bmg ebuilds, gensync whenever run complained with the following error:

stan bin # gensync bmg-gnome-current
Traceback (most recent call last):
  File "/usr/bin/gensync", line 20, in ?
    import portage
ImportError: No module named portage

even re-emerging portage didn't solve the problem

however, after looking at the first ~25 lines of emerge, i copied over the first sent of import lines (including the details about the classer and os path, changing as needed):

--cut--------------
import fileinput
import sys
import os
os.environ["PORTAGE_CALLER"]="gensync"
sys.path = ["/usr/lib/portage/pym"]+sys.path

import portage
from output import *
--cut--------------

after that, gensync ran fine! :)

Reproducible: Always
Steps to Reproduce:
1.emerge gentoolkit-dev (and portage)
2.edit configuration files as per steps on breakmygentoo.net
3.run gensync bmg-gnome-current

Actual Results:  
Traceback (most recent call last):
  File "/usr/bin/gensync", line 20, in ?
    import portage
ImportError: No module named portage


stan bin # emerge info
Portage 2.0.50-r1 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1, 2.4.23-ck1)
=================================================================
System uname: 2.4.23-ck1 i686 AMD Athlon(tm) Processor
Gentoo Base System version 1.4.3.10p1
Autoconf: sys-devel/autoconf-2.57-r1
Automake: sys-devel/automake-1.7.7
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -mcpu=athlon-tbird -funroll-loops -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3/share/config /usr/share/config /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O3 -mcpu=athlon-tbird -funroll-loops -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://kenny.cardiff.djnauk.co.uk/home/gentoo-packages
http://www.ibiblio.org/gentoo
http://www.mirror.ac.uk/sites/www.ibiblio.org/gentoo/
http://www.fhh.opensource-mirror.de/gentoo.org/"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/bmg-gnome /usr/local/portage/bmg-main"
SYNC="rsync://kenny.cardiff.djnauk.co.uk/gentoo-portage"
USE="3dnow X Xaw3d acpi alsa avi bonobo cdr crypt cups curl dga dvd dvdr gd gif
gnome gphoto2 gtk2 imap jpeg libg++ libwww mbox mmx mpeg mysql ncurses oggvorbis
opengl pam pdflib png postgres quicktime readline samba spell ssl tiff truetype
usb x86 xml xml2 xmms xosd xv zlib"
Comment 1 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2004-08-28 03:07:20 UTC
Will look at it.
Comment 2 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2004-09-10 02:26:34 UTC
Fixed. Will be available in the next release of Gentoolkit