summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/utils.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index b282d09abf..40b5006fe3 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -451,6 +451,10 @@ def lockfile(name, shared=False, retry=True, block=False):
451 consider the possibility of sending a signal to the process to break 451 consider the possibility of sending a signal to the process to break
452 out - at which point you want block=True rather than retry=True. 452 out - at which point you want block=True rather than retry=True.
453 """ 453 """
454 if len(name) > 255:
455 root, ext = os.path.splitext(name)
456 name = root[:255 - len(ext)] + ext
457
454 dirname = os.path.dirname(name) 458 dirname = os.path.dirname(name)
455 mkdirhier(dirname) 459 mkdirhier(dirname)
456 460
@@ -487,7 +491,7 @@ def lockfile(name, shared=False, retry=True, block=False):
487 return lf 491 return lf
488 lf.close() 492 lf.close()
489 except OSError as e: 493 except OSError as e:
490 if e.errno == errno.EACCES: 494 if e.errno == errno.EACCES or e.errno == errno.ENAMETOOLONG:
491 logger.error("Unable to acquire lock '%s', %s", 495 logger.error("Unable to acquire lock '%s', %s",
492 e.strerror, name) 496 e.strerror, name)
493 sys.exit(1) 497 sys.exit(1)