Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

webapp-config broken, no module named portage

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
7 posts • Page 1 of 1
Author
Message
while1
n00b
n00b
User avatar
Posts: 17
Joined: Tue Sep 18, 2007 6:19 pm
Location: Lund, Sweden

webapp-config broken, no module named portage

  • Quote

Post by while1 » Mon Mar 02, 2009 8:08 pm

Hi!
When I try to emerge phpmyadmin I get the following error:

Code: Select all

Traceback (most recent call last):
  File "/usr/sbin/webapp-config", line 27, in <module>
    from WebappConfig.config import Config
  File "/usr/local/lib/python2.5/site-packages/WebappConfig/config.py", line 29, in <module>
    import WebappConfig.server
  File "/usr/local/lib/python2.5/site-packages/WebappConfig/server.py", line 25, in <module>
    from WebappConfig.worker       import WebappRemove, WebappAdd
  File "/usr/local/lib/python2.5/site-packages/WebappConfig/worker.py", line 29, in <module>
    import WebappConfig.wrapper as wrapper
  File "/usr/local/lib/python2.5/site-packages/WebappConfig/wrapper.py", line 36, in <module>
    import sys, portage, os, types
ImportError: No module named portage
 *
 * ERROR: dev-db/phpmyadmin-2.11.9.4 failed.
 * Call stack:
 *                    ebuild.sh, line   49:  Called pkg_setup
 *   phpmyadmin-2.11.9.4.ebuild, line   24:  Called webapp_pkg_setup
 *                webapp.eclass, line  378:  Called webapp_read_config
 *                webapp.eclass, line   60:  Called die
 * The specific snippet of code:
 *              ENVVAR=$(${WEBAPP_CONFIG} --query ${PN} ${PVR}) || die "Could not read settings from webapp-config!"
 *  The die message:
 *   Could not read settings from webapp-config!
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/dev-db/phpmyadmin-2.11.9.4/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-db/phpmyadmin-2.11.9.4/temp/die.env'.
 
I also get the same error when I run webapp-config.

Code: Select all

Traceback (most recent call last):
  File "/usr/sbin/webapp-config", line 27, in <module>
    from WebappConfig.config import Config
  File "/usr/local/lib/python2.5/site-packages/WebappConfig/config.py", line 29, in <module>
    import WebappConfig.server
  File "/usr/local/lib/python2.5/site-packages/WebappConfig/server.py", line 25, in <module>
    from WebappConfig.worker       import WebappRemove, WebappAdd
  File "/usr/local/lib/python2.5/site-packages/WebappConfig/worker.py", line 29, in <module>
    import WebappConfig.wrapper as wrapper
  File "/usr/local/lib/python2.5/site-packages/WebappConfig/wrapper.py", line 36, in <module>
    import sys, portage, os, types
ImportError: No module named portage
If i run python interpreter can run "import portage" without any problems.

I've tried to reemerge both webapp-config and python and i've run python-updater as well afterwars. it still doesn't work. The only thing I find wierd is that webapp-config is installed in /usr/local/lib/python2.5... but other modules I have are installed in /usr/lib/python2.5... But I can't find why. I tried install webapp-config on one of my other machines and then it was installed directly in /usr/lib

Please help, it seems like my system has become as confused as I am.

This is on my x86 webserver. If you need an emerge --info or something please let me know.
Top
AllenJB
Veteran
Veteran
User avatar
Posts: 1285
Joined: Fri Sep 02, 2005 10:47 am
Contact:
Contact AllenJB
Website

  • Quote

Post by AllenJB » Mon Mar 02, 2009 10:10 pm

Try running "python-updater"
Top
while1
n00b
n00b
User avatar
Posts: 17
Joined: Tue Sep 18, 2007 6:19 pm
Location: Lund, Sweden

  • Quote

Post by while1 » Tue Mar 03, 2009 11:49 am

I have already but it doesn't make any difference.
Top
AllenJB
Veteran
Veteran
User avatar
Posts: 1285
Joined: Fri Sep 02, 2005 10:47 am
Contact:
Contact AllenJB
Website

  • Quote

Post by AllenJB » Wed Mar 04, 2009 12:59 pm

while1 wrote:I have already but it doesn't make any difference.
Then I recommend you search for / file a bug
Top
while1
n00b
n00b
User avatar
Posts: 17
Joined: Tue Sep 18, 2007 6:19 pm
Location: Lund, Sweden

  • Quote

Post by while1 » Wed Mar 04, 2009 1:06 pm

I've searched for it but I cannot find any with the same problem. Of couse I can file one but I don't know how to reproduce it. Seems more like I've done something wrong than a bug.
Top
PolyTekPatrick
n00b
n00b
Posts: 1
Joined: Wed Mar 25, 2009 10:11 pm

  • Quote

Post by PolyTekPatrick » Thu Mar 26, 2009 8:12 pm

Hey while1,
I had exactly the same problem with webapp-config and I just figured out how to solve it, thanks to the little bit of insight that you provided in your post. Like you, I was unable to find any solutions online, and no one has touched the bug report at: http://bugs.gentoo.org/show_bug.cgi?id=261165

You mentioned in your post that typing "import portage" into the python interpreter worked for you. When I just ran python and tried it on my server, it didn't work for me. But it did work when I ran sudo python and tried it there. I think the discrepancy is due to the /usr/local/lib/python2.5 versus /usr/lib/python2.5 confusion, which I also have on my machine (webapp-config installs stuff into the /usr/local/lib/python2.5/site-packages/WebappConfig directory on my machine).

I don't know much about python, but I figured that maybe python code running from the local version didn't have the portage directory in its search path. So I just learned how to add a directory to python's path using a .pth file:

Code: Select all

cd /usr/local/lib/python2.5/site-packages
sudo vim portage.pth
type the following into the file and save:

Code: Select all

/usr/lib/portage/pym
Then I was able to do import portage from a regular (non-sudo) python, and webapp-config finally worked and other webapps that depend on it finally emerged. So I got it working at least, though I don't know why the problem occurred in the first place, or why there are two python directories.

Hope this helps!
-Patrick
Top
Joseph_sys
Advocate
Advocate
Posts: 2731
Joined: Tue Jun 08, 2004 4:05 pm
Location: Edmonton, AB

  • Quote

Post by Joseph_sys » Tue Aug 11, 2009 8:03 pm

I run into the same problem.
Re-emerging: webapp-config
solved the problem.
Top
Post Reply

7 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic