]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
fetch2/__init__.py: Error if lockfile path invalid
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 26 Feb 2016 17:50:37 +0000 (17:50 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 28 Feb 2016 11:33:58 +0000 (11:33 +0000)
Rather than create ".lock" and ".done" files with no name, error,
forcing us to fix the cases where this is a problem.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/fetch2/__init__.py

index 5f0e6c9266096109641523df06e8e7377cc92557..11fe95b5413f72f756b2faeefe1f908cc4e5b931 100644 (file)
@@ -1188,8 +1188,11 @@ class FetchData(object):
             basepath = self.localpath
         elif self.localpath:
             basepath = dldir + os.sep + os.path.basename(self.localpath)
-        else:
+        elif self.basepath or self.basename:
             basepath = dldir + os.sep + (self.basepath or self.basename)
+        else:
+             bb.fatal("Can't determine lock path for url %s" % url)
+
         self.donestamp = basepath + '.done'
         self.lockfile = basepath + '.lock'