Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 453132 - sys-apps/portage-2.2.0_alpha157: '* Fatal error: No module named portage' in middle of 'emerge -C'
Summary: sys-apps/portage-2.2.0_alpha157: '* Fatal error: No module named portage' in ...
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-20 12:18 UTC by Michał Górny
Modified: 2013-08-21 21:52 UTC (History)
2 users (show)

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


Attachments
strace equery (equery_strace.txt,59.29 KB, text/plain)
2013-08-20 21:51 UTC, jospezial
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-01-20 12:18:31 UTC
I'm getting this randomly for a second time (previous time was with around _alpha154, I'd guess):

$ emerge -C django
 * This action can remove important packages! In order to be safer, use
 * `emerge -pv --depclean <atom>` to check for reverse dependencies before
 * removing packages.

>>> These are the packages that would be unmerged:

 dev-python/django
    selected: 1.4.2-r1 
   protected: none 
     omitted: none 

All selected packages: dev-python/django-1.4.2-r1

>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.

Would you like to unmerge these packages? [Yes/No] 
>>> Waiting 5 seconds before starting...
>>> (Control-C to abort)...
>>> Unmerging in:  5 4 3 2 1 
>>> Unmerging (1 of 1) dev-python/django-1.4.2-r1...
 * Adjusting permissions for FEATURES=userpriv: '/tmp/portage/.distcc'
 * Adjusting permissions for FEATURES=userpriv: '/tmp/portage/.distcc/lock'
 * Adjusting permissions for FEATURES=userpriv: '/tmp/portage/.distcc/state'
* Fatal error: Portage libraries not found, quitting:
* Fatal error: No module named portage
* Fatal error(s) - aborting

 * GNU info directory index is up-to-date.


The package was unmerged fine however.

--
emerge --info:
Portage 2.2.0_alpha157 (!/usr/src/gx86/profiles/default/linux/amd64/13.0/desktop, gcc-4.7.2, glibc-2.16.0, 3.7.0-pomiocik+ x86_64)
=================================================================
System uname: Linux-3.7.0-pomiocik+-x86_64-Intel-R-_Pentium-R-_Dual_CPU_T2330_@_1.60GHz-with-gentoo-2.2
KiB Mem:     1922944 total,    286656 free
KiB Swap:    2097120 total,   2097120 free
Timestamp of tree: Sun, 20 Jan 2013 08:45:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
distcc 3.1 x86_64-pc-linux-gnu [enabled]
app-shells/bash:          4.2_p42
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.5.4-r5, 2.6.8-r1, 2.7.3-r3, 3.1.5-r1, 3.2.3-r2, 3.3.0-r1
dev-util/cmake:           2.8.10.2
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.11.6, 1.12.6
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.7.2
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.7 (virtual/os-headers)
sys-libs/glibc:           2.16.0
Repositories: gentoo gentoo-cvs science x11 sunrise mgorny
Installed sets: @dep_librarian, @dep_stconnlist
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /lib64/systemd/system /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=core2 -O2 -pipe"
DISTDIR="/usr/local/portage/distfiles"
EMERGE_DEFAULT_OPTS="--ask --keep-going --quiet-build=n"
FCFLAGS="-march=core2 -O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg collision-protect config-protect-if-modified distcc distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms sign strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=core2 -O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
INSTALL_MASK="/usr/share/locale /etc/logrotate.d"
LANG="pl_PL.UTF-8"
LC_ALL="C"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
MAKEOPTS="-j6"
PKGDIR="/usr/local/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --times --compress --force --whole-file --delete --stats --timeout=45 --exclude=/distfiles --exclude=/packages --exclude=/local"
PORTAGE_TMPDIR="/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/src/gx86 /usr/portage/local/science /usr/portage/local/x11 /usr/portage/local/sunrise /home/mgorny/git/mgorny-repo"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi adns alsa amd64 ares avahi bash-completion bluetooth branding bzip2 cairo caps cdda cdr cli cracklib crypt cups curl cxx dbus dirac djvu dri dts dvd dvdr emboss encode exif fam fbcon fftw filecaps firefox flac fontconfig gd gdbm gif gmp gnome-keyring gnutls gpm graphviz gtk iconv icu idn imagemagick ipv6 java6 jbig jpeg jpeg2k kate lcms libedit libnotify libproxy lzma mad matroska mmap mmx mmxext mng modules mp3 mp4 mpeg mtp mudflap multilib ncurses nptl ogg opencore-amr openexr opengl openmp pam pango pch pcre pdf png ppds pppd qt3support qt4 raw readline schroedinger sdl session smp sndfile speex spell sse sse2 sse3 ssl ssse3 startup-notification svg systemd tcpd theora threads tiff timidity truetype udev unicode upnp upower usb v4l v4l2 vcd vim-syntax vorbis wavpack wifi wmf wxwidgets x264 xattr xcb xcomposite xml xmpp xpm xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_5 python2_6 python2_7 python3_1 python3_2 python3_3 pypy2_0 pypy1_9" RUBY_TARGETS="ruby18 ruby19" SANE_BACKENDS="artec_eplus48u net" USERLAND="GNU" VIDEO_CARDS="fbdev modesetting radeon r300 r600 vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="2.6 2.7 3.2 3.3 2.7-pypy-2.0 2.7-pypy-1.9 2.5 3.1"
Unset:  CPPFLAGS, CTARGET, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Zac Medico gentoo-dev 2013-01-20 16:05:56 UTC
Portage itself doesn't have any messages like that, so it must be something running in pkg_*rm from environment.bz2. It's probably some old eclass thing that's since been fixed, and there's nothing more to do now.
Comment 2 jospezial 2013-08-20 21:51:34 UTC
Created attachment 356528 [details]
strace equery
Comment 3 jospezial 2013-08-20 21:54:12 UTC
bastellinux ~ # equery 
Traceback (most recent call last):
  File "/usr/bin/equery", line 35, in <module>
    from gentoolkit import equery, errors
  File "/usr/lib64/python3.3/site-packages/gentoolkit/equery/__init__.py", line 30, in <module>
    import portage
ImportError: No module named 'portage'
bastellinux ~ # 

bastellinux ~ # emerge --info
Portage 2.2.0 (default/linux/amd64/13.0, gcc-4.8.1, glibc-2.17, 3.11.0-rc6 x86_64)
=================================================================
System uname: Linux-3.11.0-rc6-x86_64-AMD_Athlon-tm-_II_X2_240_Processor-with-gentoo-2.2
KiB Mem:     1018284 total,     22800 free
KiB Swap:    4347896 total,   4347896 free
Timestamp of tree: Mon, 19 Aug 2013 22:45:02 +0000
ld GNU ld (GNU Binutils) 2.23.2
ccache version 3.1.9 [enabled]
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.5-r2, 3.2.5-r2, 3.3.2-r2
dev-util/ccache:          3.1.9
dev-util/cmake:           2.8.11.1
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.13.4, 1.14
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.8.1
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.10 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo overlay_jl
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask-write=y --keep-going --quiet-build=y"
FCFLAGS="-march=native -O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext 64bit X Xaw3d a52 aac aacplus aacs aalib ace acl acpi activefilter aften alsa amd64 ap apm apng archive async audacious audiofile automount bazaar berkdb binary-drivers binfilter blender-game bluray boost bzip2 bzr cairo canusb ccache cdda cddb cdio cdparanoia cdr cdrdao cdrom cgi charconv chroot city cjk cleartype cli colordiff colors compress consolekit corefonts cpio cracklib crypt css cue cups curl curlwrappers cvs cxx daemon dbus declarative device-mapper dga dhcp doom doomsday dos download-subs dri drm dts dump dv dvb dvd dvdnav eap eap-sim eap-tls emerald emoticon enca encode enscript equalizer exif extensions extras faac faad fat fax fbcon ffmpeg fftw firefox flac floppy fluidsynth fontconfig foomaticdb fortran ftp fts3 fuse g3dvl gallium gbm gd gdbm gdu geoip gif gimp git glamor glut gme gnutls gphoto2 gpm graphite gsm gstreamer gtk gtk3 gudev gui gzip hddtemp hdf hdf5 highlight hwdb iconv icq icu id3 id3tag idn imagemagick introspection ios ipc ipod ipv6 java javascript jit jpeg jpeg2k kate kde keymap ladspa lame laptop lcms lensfun lha libass libcaca libcanberra libkms libnl libnotify libsamplerate libssh2 libtiger libv4l libv4l2 libwww lm_sensors logrotate lua lxde lzma lzo mad madwifi magic man matroska md5sum metalink midi mikmod mime minizip mixer mjpeg mmap mms mmx mmxext mng mod modplug modules mono mouse mozilla mp3 mp4 mpeg mplayer mtp mudflap multilib multislot musepack musicbrainz nano-syntax ncat ncurses ndiff network nfs nfsidmap nfsv3 nfsv4 nfsv41 nls nmap nmap-update nokia normalize nowlistening nping nptl nsplugin nss ntfs ntfsprogs ntp nvidia nvram obex ocr ogg ogm openal opengl openmp optimized-qmake oscar osdmenu otr p2p pam pango panorama parport parse-clocks pcap pci pcre pdf pdfimport phonon pipes plasma plugins pm-utils pmu png policykit portaudio postscript ppds privacy projectm projectx pulseaudio pvr python qalculate qt3support qt4 quicktime radio rar raw rdesktop readline recording redeyes reiser4 reiserfs remote-access remoteosd replaygain rpm rtc rtmp rtsp rubberband samba sbsms scanner schroedinger sdl secure-delete semantic-desktop sensord session sftp sha512 shorten shout skins slang smbclient smi sndfile sockets sound soundtouch speex spell sql sqlite sqlite3 sse sse2 sse3 ssh ssl startup-notification statistics stk stream subtitles subversion svg swat symlink syslog szip taglib tcpd texteffect tftp theora threads thumbnail tiff translator truetype twolame udev udisks unicode upcall urlpicpreview usb v4l vaapi vamp vcd vcdx vdpau video videos vim-syntax virtualbox vlm vnc vorbis vpx vroot vst wad wav wavpack webgl webkit webm webpresence wifi winbind winpopup wireshark wmf wps wxwidgets x264 xa xattr xcb xcomposite xfs xine xinerama xinetd xml xorg xosd xpm xrandr xscreensaver xv xvid xvmc zip zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-4" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev vesa svga vga radeon v4l modesetting r100 r200 r300 r600 nouveau" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 4 Zac Medico gentoo-dev 2013-08-20 22:05:32 UTC
(In reply to jospezial from comment #3)
> bastellinux ~ # equery 
> Traceback (most recent call last):
>   File "/usr/bin/equery", line 35, in <module>
>     from gentoolkit import equery, errors
>   File "/usr/lib64/python3.3/site-packages/gentoolkit/equery/__init__.py",
> line 30, in <module>
>     import portage
> ImportError: No module named 'portage'

You need to do this:

  echo sys-apps/portage python_targets_python3_3 >> /etc/portage/package.use
  emerge --oneshot portage
Comment 5 jospezial 2013-08-21 21:22:46 UTC
Thank you. that worked.
I also added in make.conf:

PYTHON_TARGETS="python2_7 python3_3"
This overwrites the defaults competly. I wish it would be additive only.
But when new versions come I have to change it.
Comment 6 Zac Medico gentoo-dev 2013-08-21 21:52:40 UTC
(In reply to jospezial from comment #5)
> PYTHON_TARGETS="python2_7 python3_3"
> This overwrites the defaults competly. I wish it would be additive only.

You can make it additive by using either of these two approaches:

PYTHON_TARGETS="${PYTHON_TARGETS} python2_7 python3_3"

  or

USE="${USE} python_targets_python2_7 python_targets_python3_3"