From: Chris Larson Date: Thu, 11 Nov 2010 15:57:04 +0000 (-0700) Subject: bb.pysh: fix writing pyshtables all over the place X-Git-Tag: 2011-1~3140 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=32b4bd92242b5ec3b5c405340dfd24044bad7796;p=openembedded-core.git bb.pysh: fix writing pyshtables all over the place (Bitbake rev: ff4753e362714a3c4c759c2fad8a9e5b8fe5bef5) Signed-off-by: Chris Larson Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/bb/pysh/pyshyacc.py b/bitbake/lib/bb/pysh/pyshyacc.py index 3d9510c0c3..6b2bf466d2 100644 --- a/bitbake/lib/bb/pysh/pyshyacc.py +++ b/bitbake/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)