diff options
author | Richard Purdie <richard@openedhand.com> | 2008-10-17 11:04:26 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2008-10-17 11:04:26 +0000 |
commit | 7a4b36a7d16114f0cef3b7fa6cb393d9cff1dafa (patch) | |
tree | 9c5bb994849da9c483c013c7c0d541496c738fe2 /bitbake-dev/lib | |
parent | 8dd58f515c268ff5030d31b4b656438b9a82edcf (diff) | |
download | poky-7a4b36a7d16114f0cef3b7fa6cb393d9cff1dafa.tar.gz |
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
Diffstat (limited to 'bitbake-dev/lib')
-rw-r--r-- | bitbake-dev/lib/bb/utils.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bitbake-dev/lib/bb/utils.py b/bitbake-dev/lib/bb/utils.py index 94bc62f7cf..ad1a515292 100644 --- a/bitbake-dev/lib/bb/utils.py +++ b/bitbake-dev/lib/bb/utils.py | |||
@@ -235,6 +235,12 @@ def lockfile(name): | |||
235 | Use the file fn as a lock file, return when the lock has been acquired. | 235 | Use the file fn as a lock file, return when the lock has been acquired. |
236 | Returns a variable to pass to unlockfile(). | 236 | Returns a variable to pass to unlockfile(). |
237 | """ | 237 | """ |
238 | path = os.path.dirname(name) | ||
239 | if not os.path.isdir(path): | ||
240 | import bb, sys | ||
241 | bb.msg.error(bb.msg.domain.Util, "Error, lockfile path does not exist!: %s" % path) | ||
242 | sys.exit(1) | ||
243 | |||
238 | while True: | 244 | while True: |
239 | # If we leave the lockfiles lying around there is no problem | 245 | # If we leave the lockfiles lying around there is no problem |
240 | # but we should clean up after ourselves. This gives potential | 246 | # but we should clean up after ourselves. This gives potential |