Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 236509 - www-apps/trac-0.11.1 Crashes due to bad PYTHON_EGG_CACHE
Summary: www-apps/trac-0.11.1 Crashes due to bad PYTHON_EGG_CACHE
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Web Application Packages Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-02 21:47 UTC by David Sveningsson
Modified: 2008-09-15 11:55 UTC (History)
0 users

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


Attachments
Explicitly sets the PYTHON_EGG_CACHE environment variable (tracd.patch,470 bytes, patch)
2008-09-02 21:50 UTC, David Sveningsson
Details | Diff
Explicitly sets the PYTHON_EGG_CACHE environment variable (tracd.patch,494 bytes, patch)
2008-09-02 21:52 UTC, David Sveningsson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Sveningsson 2008-09-02 21:47:05 UTC
The standalone tracd server starts but crashes and displays the following:

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/trac/web/api.py", line 339, in send_error
    'text/html')
  File "/usr/lib/python2.5/site-packages/trac/web/chrome.py", line 683, in render_template
    template = self.load_template(filename, method=method)
  File "/usr/lib/python2.5/site-packages/trac/web/chrome.py", line 659, in load_template
    self.templates = TemplateLoader(self.get_all_templates_dirs(),
  File "/usr/lib/python2.5/site-packages/trac/web/chrome.py", line 406, in get_all_templates_dirs
    dirs += provider.get_templates_dirs()
  File "build/bdist.linux-i686/egg/timingandestimationplugin/webui.py", line 118, in get_templates_dirs
    rtn = [resource_filename(__name__, 'templates')]
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 841, in resource_filename
    self, resource_name
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1311, in get_resource_filename
    return self._extract_resource(manager, zip_path)
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1318, in _extract_resource
    manager, os.path.join(zip_path, name)
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1332, in _extract_resource
    self.egg_name, self._parts(zip_path)
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 921, in get_cache_path
    self.extraction_error()
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 887, in extraction_error
    raise err
ExtractionError: Can't extract file(s) to egg cache

The following error occurred while trying to extract file(s) to the Python egg
cache:

  [Errno 20] Not a directory: '/dev/null/.python-eggs'

The Python egg cache directory is currently set to:

  /dev/null/.python-eggs

Perhaps your account does not have write access to this directory?  You can
change the cache directory by setting the PYTHON_EGG_CACHE environment
variable to point to an accessible directory.


Reproducible: Always

Steps to Reproduce:
1. Start using /etc/init.d/tracd
2. Open the browser and open http://localhost:8000




This happens because the PYTHON_EGG_CACHE environment variable defaults to the users homedir and tracd runs as the user tracd with the homedir /dev/null
Comment 1 David Sveningsson 2008-09-02 21:50:14 UTC
Created attachment 164429 [details, diff]
Explicitly sets the PYTHON_EGG_CACHE environment variable

This patch works for me but I'm not sure if it is a good idea to set PYTHON_EGG_CACHE to /tmp
Comment 2 David Sveningsson 2008-09-02 21:52:43 UTC
Created attachment 164431 [details, diff]
Explicitly sets the PYTHON_EGG_CACHE environment variable

Correct patch
Comment 3 Wormo (RETIRED) gentoo-dev 2008-09-03 07:10:01 UTC
Thanks for the patch, assigning to maintainers.
Comment 4 Gunnar Wrobel (RETIRED) gentoo-dev 2008-09-10 07:50:07 UTC
Thanks for the report. Let's rather use a separate directory for this. Does trac-0.11.1-r1 fix the issue for you?
Comment 5 David Sveningsson 2008-09-10 15:45:06 UTC
Almost, the egg-cache directory must be writable by the tracd user so I had to run "chown tracd:tracd /var/lib/trac/egg-cache".
Comment 6 Gunnar Wrobel (RETIRED) gentoo-dev 2008-09-15 11:55:37 UTC
Thanks for the feedback! Hopefully fixed now :)