Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 384411

Summary: sys-apps/portage: ebuild-ipc ImportError: cannot import name getstatusoutput
Product: Gentoo Linux Reporter: Agostino Sarubbo <ago>
Component: New packagesAssignee: Portage team <dev-portage>
Status: RESOLVED OBSOLETE    
Severity: normal CC: bazaar+obsolete
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log

Description Agostino Sarubbo gentoo-dev 2011-09-25 09:26:30 UTC
Created attachment 287675 [details]
build.log

Strange output, see build log.
Comment 1 Christian Faulhammer (RETIRED) gentoo-dev 2011-09-25 17:59:07 UTC
I cannot reproduce.  Same set as USE flags and so on.  What is your active Python version?
Comment 2 Agostino Sarubbo gentoo-dev 2011-09-25 18:00:50 UTC
(In reply to comment #1)
> I cannot reproduce.  Same set as USE flags and so on.  What is your active
> Python version?

2.7
Comment 3 Peter Volkov (RETIRED) gentoo-dev 2011-09-29 06:18:25 UTC
ebuild itself does nothing special in src_prepare:

src_prepare() {
    # Remove after release of > 0.99.0
    cp "${FILESDIR}"/credits.pickle "${S}"/credits.pickle
}

From build.log:
Traceback (most recent call last):
  File "/usr/lib64/portage/bin/ebuild-ipc.py", line 32, in <module>
    import portage
  File "/usr/lib64/portage/pym/portage/__init__.py", line 25, in <module>
    from subprocess import getstatusoutput as subprocess_getstatusoutput
ImportError: cannot import name getstatusoutput

This trace indicates problem in portage not in bzr-gtk.

@portage any ideas here?
Comment 4 Zac Medico gentoo-dev 2011-09-29 15:21:04 UTC
(In reply to comment #3)
> Traceback (most recent call last):
>   File "/usr/lib64/portage/bin/ebuild-ipc.py", line 32, in <module>
>     import portage
>   File "/usr/lib64/portage/pym/portage/__init__.py", line 25, in <module>
>     from subprocess import getstatusoutput as subprocess_getstatusoutput
> ImportError: cannot import name getstatusoutput

Maybe there's a permission issue accessing the commands.py or subprocess.py files in /usr/lib/python-$VERSION, triggered by FEATURES=userpriv.
Comment 5 Aistis Jokubauskas 2012-03-03 10:24:51 UTC
I have the same issue installing bzr-git:

In [1]: import subprocess

In [2]: subprocess.__file__
Out[2]: '/usr/lib64/python2.7/subprocess.pyc'

In [3]: import commands

In [4]: from subprocess import getstatusoutput as subprocess_getstatusoutput
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)

/root/<ipython console> in <module>()

ImportError: cannot import name getstatusoutput
Comment 6 Zac Medico gentoo-dev 2016-12-14 17:05:01 UTC
Current versions of portage do not import getstatusoutput:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=09de8dc47ec48af2276dfa098dd5e1d3d09ddbdd

Closing as obsolete.