summaryrefslogtreecommitdiffstats
path: root/lib/bb/pysh
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-11-11 08:57:04 -0700
committerChris Larson <chris_larson@mentor.com>2010-11-11 08:57:04 -0700
commitff4753e362714a3c4c759c2fad8a9e5b8fe5bef5 (patch)
treee41c60e13196ade113ef6c77ffde78ca80451820 /lib/bb/pysh
parent1cbf8a9403b4b60d59bfd90a51c3e4246ab834d6 (diff)
downloadbitbake-ff4753e362714a3c4c759c2fad8a9e5b8fe5bef5.tar.gz
bb.pysh: fix writing pyshtables all over the place
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'lib/bb/pysh')
-rw-r--r--lib/bb/pysh/pyshyacc.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/bb/pysh/pyshyacc.py b/lib/bb/pysh/pyshyacc.py
index 3d9510c0c..6b2bf466d 100644
--- a/lib/bb/pysh/pyshyacc.py
+++ b/lib/bb/pysh/pyshyacc.py
@@ -648,7 +648,10 @@ def p_error(p):
try:
import pyshtables
except ImportError:
- yacc.yacc(tabmodule = 'pyshtables')
+ outputdir = os.path.dirname(__file__)
+ if not os.access(outputdir, os.W_OK):
+ outputdir = ''
+ yacc.yacc(tabmodule = 'pyshtables', outputdir = outputdir, debug = 0)
else:
yacc.yacc(tabmodule = 'pysh.pyshtables', write_tables = 0, debug = 0)