mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 00:39:46 +00:00
bitbake: Add some sanity checks to the lockfile functions
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5534 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
@@ -235,6 +235,12 @@ def lockfile(name):
|
|||||||
Use the file fn as a lock file, return when the lock has been acquired.
|
Use the file fn as a lock file, return when the lock has been acquired.
|
||||||
Returns a variable to pass to unlockfile().
|
Returns a variable to pass to unlockfile().
|
||||||
"""
|
"""
|
||||||
|
path = os.path.dirname(name)
|
||||||
|
if not os.path.isdir(path):
|
||||||
|
import bb, sys
|
||||||
|
bb.msg.error(bb.msg.domain.Util, "Error, lockfile path does not exist!: %s" % path)
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
# If we leave the lockfiles lying around there is no problem
|
# If we leave the lockfiles lying around there is no problem
|
||||||
# but we should clean up after ourselves. This gives potential
|
# but we should clean up after ourselves. This gives potential
|
||||||
|
|||||||
@@ -235,6 +235,12 @@ def lockfile(name):
|
|||||||
Use the file fn as a lock file, return when the lock has been acquired.
|
Use the file fn as a lock file, return when the lock has been acquired.
|
||||||
Returns a variable to pass to unlockfile().
|
Returns a variable to pass to unlockfile().
|
||||||
"""
|
"""
|
||||||
|
path = os.path.dirname(name)
|
||||||
|
if not os.path.isdir(path):
|
||||||
|
import bb, sys
|
||||||
|
bb.msg.error(bb.msg.domain.Util, "Error, lockfile path does not exist!: %s" % path)
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
# If we leave the lockfiles lying around there is no problem
|
# If we leave the lockfiles lying around there is no problem
|
||||||
# but we should clean up after ourselves. This gives potential
|
# but we should clean up after ourselves. This gives potential
|
||||||
|
|||||||
Reference in New Issue
Block a user