summaryrefslogtreecommitdiff
path: root/poky/bitbake/lib/bb/codeparser.py
diff options
context:
space:
mode:
authorEd Tanous <ed.tanous@intel.com>2019-04-15 23:11:05 +0300
committerEd Tanous <ed.tanous@intel.com>2019-04-15 23:11:05 +0300
commita75bff085ba9443315222231c42692745e5781e9 (patch)
treee1aa422babae0dffc866af076a0274ff26c2c4b2 /poky/bitbake/lib/bb/codeparser.py
parent3e809d0d5cf96c18c5720d1b6b3b53e9f4c0cfae (diff)
parent6d4bcf0a75b2a6055055c9ad8ed6b93599082385 (diff)
downloadopenbmc-a75bff085ba9443315222231c42692745e5781e9.tar.xz
Merge branch 'master' of ssh://git-amr-1.devtools.intel.com:29418/openbmc-openbmc into intel
Diffstat (limited to 'poky/bitbake/lib/bb/codeparser.py')
-rw-r--r--poky/bitbake/lib/bb/codeparser.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/poky/bitbake/lib/bb/codeparser.py b/poky/bitbake/lib/bb/codeparser.py
index ddd1b97dc..ac995a6a1 100644
--- a/poky/bitbake/lib/bb/codeparser.py
+++ b/poky/bitbake/lib/bb/codeparser.py
@@ -33,7 +33,7 @@ from bb.cache import MultiProcessCache
logger = logging.getLogger('BitBake.CodeParser')
def bbhash(s):
- return hashlib.md5(s.encode("utf-8")).hexdigest()
+ return hashlib.sha256(s.encode("utf-8")).hexdigest()
def check_indent(codestr):
"""If the code is indented, add a top level piece of code to 'remove' the indentation"""
@@ -140,7 +140,7 @@ class CodeParserCache(MultiProcessCache):
# so that an existing cache gets invalidated. Additionally you'll need
# to increment __cache_version__ in cache.py in order to ensure that old
# recipe caches don't trigger "Taskhash mismatch" errors.
- CACHE_VERSION = 10
+ CACHE_VERSION = 11
def __init__(self):
MultiProcessCache.__init__(self)
@@ -368,8 +368,9 @@ class ShellParser():
def _parse_shell(self, value):
try:
tokens, _ = pyshyacc.parse(value, eof=True, debug=False)
- except pyshlex.NeedMore:
- raise sherrors.ShellSyntaxError("Unexpected EOF")
+ except Exception:
+ bb.error('Error during parse shell code, the last 5 lines are:\n%s' % '\n'.join(value.split('\n')[-5:]))
+ raise
self.process_tokens(tokens)