summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/utils.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index 210e535f05..826024661b 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -461,13 +461,16 @@ def lockfile(name, shared=False, retry=True, block=False):
461 consider the possibility of sending a signal to the process to break 461 consider the possibility of sending a signal to the process to break
462 out - at which point you want block=True rather than retry=True. 462 out - at which point you want block=True rather than retry=True.
463 """ 463 """
464 if len(name) > 255: 464 basename = os.path.basename(name)
465 root, ext = os.path.splitext(name) 465 if len(basename) > 255:
466 name = root[:255 - len(ext)] + ext 466 root, ext = os.path.splitext(basename)
467 basename = root[:255 - len(ext)] + ext
467 468
468 dirname = os.path.dirname(name) 469 dirname = os.path.dirname(name)
469 mkdirhier(dirname) 470 mkdirhier(dirname)
470 471
472 name = os.path.join(dirname, basename)
473
471 if not os.access(dirname, os.W_OK): 474 if not os.access(dirname, os.W_OK):
472 logger.error("Unable to acquire lock '%s', directory is not writable", 475 logger.error("Unable to acquire lock '%s', directory is not writable",
473 name) 476 name)