Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 282581 - sys-apps/portage-2.2.00.14153: dispatch-conf: NameError: name 'portage' is not defined
Summary: sys-apps/portage-2.2.00.14153: dispatch-conf: NameError: name 'portage' is no...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: x86 OS X
: High normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-24 16:05 UTC by Jacob Godserv
Modified: 2009-08-26 09:50 UTC (History)
1 user (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 Jacob Godserv 2009-08-24 16:05:50 UTC
With the (currently) latest portage, dispatch-conf crashes and burns:

$ dispatch-conf 
Traceback (most recent call last):
  File "/Users/jacob/Library/Gentoo_x86/usr/sbin/dispatch-conf", line 36, in <module>
    mydir = portage.const.EPREFIX+"/var/tmp/dispatch-conf."
NameError: name 'portage' is not defined


Reproducible: Always

Steps to Reproduce:
1. emerge -1v '=sys-apps/portage-2.2.00.1415'
2. dispatch-conf




$ emerge --info
Portage 2.2.00.14153-prefix (prefix/darwin/macos/10.5/x86, gcc-4.2.1, unavailable, 9.8.0 i386)
=================================================================
System uname: Darwin-9.8.0-i386-32bit
Timestamp of tree: Mon, 24 Aug 2009 15:33:39 +0000
distcc 2.18.5-Apple.1 i386-apple-darwin9.0 (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p28
dev-lang/python:     2.6.2-r01.1
dev-python/pycrypto: 2.0.1-r8
dev-util/ccache:     2.4-r8
sys-devel/autoconf:  2.63-r01.1
sys-devel/automake:  1.9.6-r2, 1.10.2-r00.1, 1.11
sys-devel/gcc-config: 1.4.1-r00.2
sys-devel/libtool:   2.2.6a-r00.1
ACCEPT_KEYWORDS="~x86-macos"
CBUILD="i686-apple-darwin9"
CFLAGS="-O2 -pipe -march=nocona -msse4.1"
CHOST="i686-apple-darwin9"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=nocona -msse4.1"
DISTDIR="/Users/jacob/Library/Gentoo_x86/usr/portage/distfiles"
FEATURES="assume-digests ccache collision-protect distlocks fixpackages nostrip parallel-fetch preserve-libs protect-owned sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_US.UTF-8"
LDFLAGS=""
LINGUAS="en"
MAKEOPTS="-j3"
PKGDIR="/Users/jacob/Library/Gentoo_x86/usr/portage/packages"
PORTAGE_CONFIGROOT="/Users/jacob/Library/Gentoo_x86/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/Users/jacob/Library/Gentoo_x86/var/tmp"
PORTDIR="/Users/jacob/Library/Gentoo_x86/usr/portage"
PORTDIR_OVERLAY="/Users/jacob/Library/Gentoo_x86/usr/local/portage"
SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix"
USE="a52 aac aqua bash-completion cjk coreaudio cracklib divx encode faac jabber mmx mmxext mp3 msn ncurses objc objc++ prefix readline sse sse2 ssl theora unicode x264 x86-macos xulrunner xvid yahoo zlib" APACHE2_MODULES="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 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" ELIBC="Darwin" INPUT_DEVICES="keyboard mouse" KERNEL="Darwin" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Sven Schwyn (svoop) 2009-08-24 19:23:00 UTC
Same here.
Comment 2 Stuart Shelton 2009-08-25 18:49:40 UTC
FWIW, also broken in exactly the same way on IRIX ;)
Comment 3 Stuart Shelton 2009-08-25 19:57:25 UTC
Additionally, I get the following (on IRIX):

Traceback (most recent call last):
  File "/opt/gentoo/usr/sbin/quickpkg", line 10, in <module>
    if os.environ.__contains__("PORTAGE_PYTHONPATH"):
NameError: name 'os' is not defined
Comment 4 Markus Duft (RETIRED) gentoo-dev 2009-08-26 06:02:06 UTC
happens on all interix versions too. i'll try to investigate, but i'm not so much of a python guru, so i promise nothing ;)
Comment 5 Markus Duft (RETIRED) gentoo-dev 2009-08-26 06:56:42 UTC
> from portage import os

this feels wrong. chaging this to

import os
import portage

fixes dispatch-conf

however this seems to happen a lot of times:

mduft prefix-portage-2.2.00.14153 $ find . -type f | xargs grep 'from portage import os' | wc -l
99
Comment 6 Markus Duft (RETIRED) gentoo-dev 2009-08-26 07:17:57 UTC
ah, i c. portage provides it's own os wrapper for unicode, so that one is ok. simply adding 'import portage' fixes the problem too..
Comment 7 Markus Duft (RETIRED) gentoo-dev 2009-08-26 07:42:00 UTC
ok, i solved the problem. seems that (in prefix only) there are a few import problems :) an import was missing, and another two where too late. i created a patch and revbumped portage - update should arive shortly.

@grobian: could you pick up the patch, and apply to the prefix branch?
Comment 8 Fabian Groffen gentoo-dev 2009-08-26 09:50:23 UTC
I fixed the issue differently in SVN