summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-08-10 21:47:30 +0000
committerZac Medico <zmedico@gentoo.org>2009-08-10 21:47:30 +0000
commit4ae927e113fd9d24036c8038e944ed97df419f2e (patch)
tree25a8205a3f37c04713fd163837353e519c6e7ed1
parentc133668dc9ae95e3afbb7fb08a4f2030d9584cb4 (diff)
downloadportage-4ae927e113fd9d24036c8038e944ed97df419f2e.tar.gz
portage-4ae927e113fd9d24036c8038e944ed97df419f2e.tar.bz2
portage-4ae927e113fd9d24036c8038e944ed97df419f2e.zip
Add portage ImportError sys.path insertion.
svn path=/main/trunk/; revision=13979
-rwxr-xr-xbin/egencache9
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/egencache b/bin/egencache
index ac0786fa5..f5c644be9 100755
--- a/bin/egencache
+++ b/bin/egencache
@@ -22,7 +22,14 @@ except KeyboardInterrupt:
import logging
import optparse
import os
-import portage
+
+try:
+ import portage
+except ImportError:
+ from os import path as osp
+ sys.path.insert(0, osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), "pym"))
+ import portage
+
from _emerge.MetadataRegen import MetadataRegen
from portage.cache.cache_errors import CacheError, StatCollision
from portage.util import writemsg_level