From 4ae927e113fd9d24036c8038e944ed97df419f2e Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 10 Aug 2009 21:47:30 +0000 Subject: [PATCH] Add portage ImportError sys.path insertion. svn path=/main/trunk/; revision=13979 --- bin/egencache | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 -- 2.26.2