]> code.ossystems Code Review - openembedded-core.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)
committerRichard Purdie <rpurdie@linux.intel.com>
Tue, 4 Jan 2011 14:46:39 +0000 (14:46 +0000)
(Bitbake rev: ff4753e362714a3c4c759c2fad8a9e5b8fe5bef5)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
bitbake/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)