tarmac depends on python-xdg but doesn't say so
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Tarmac |
Fix Released
|
High
|
Diogo Matsubara |
Bug Description
On a Ubuntu system without python-xdg package installed, try to run tarmac-
You'll get the following traceback:
Traceback (most recent call last):
File "./tarmac-
from tarmac.bin import TarmacAuthenticate
File "/home/
from tarmac.branch import Branch
File "/home/
from tarmac.config import TarmacConfig
File "/home/
from tarmac.xdgdirs import xdg_config_home, xdg_cache_home
ImportError: cannot import name xdg_config_home
Installing python-xdg get rids of the problem.
Tarmac should say in the documentation that it depends on python-xdg or a fallback for Linux systems without python-xdg should be added to xdgdirs.py Try something like:
=== modified file 'tarmac/xdgdirs.py'
--- tarmac/xdgdirs.py 2009-07-15 03:01:14 +0000
+++ tarmac/xdgdirs.py 2009-08-18 22:56:18 +0000
@@ -28,6 +28,10 @@
from bzrlib import win32utils as win
+ else:
+ home = os.environ.
+ xdg_config_home = os.path.join(home, '.config/')
+ xdg_cache_home = os.path.join(home, '.cache/')
# XXX This function should be merged into bzrlib.win32utils
Related branches
- Paul Hummer: Approve
- Diff: None lines
Changed in tarmac: | |
assignee: | nobody → Diogo Matsubara (matsubara) |
status: | Triaged → In Progress |
Changed in tarmac: | |
milestone: | none → tarmac-0.3 |
Changed in tarmac: | |
status: | Fix Committed → Fix Released |
Oh crap. I didn't see that. I thought we had implemented it in such a way that it didn't require python-xdg. That means the problem we were having is quite simple, actually. We just need to hardcode the platform path in there if it can't find xdg, methinks.
This is a blocker for Launchpad to adopt tarmac.