]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bb.pysh: fix writing pyshtables all over the place
authorChris Larson <chris_larson@mentor.com>
Thu, 11 Nov 2010 15:57:04 +0000 (08:57 -0700)
committerChris Larson <chris_larson@mentor.com>
Thu, 11 Nov 2010 15:57:04 +0000 (08:57 -0700)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
lib/bb/pysh/pyshyacc.py

index 3d9510c0c37fa51eaa3a38d1625d71fcf6befa2c..6b2bf466d22c583b81363d725e2eeaa91424cdf6 100644 (file)
@@ -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)