diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-26 17:50:37 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-28 11:33:58 +0000 |
commit | 81158071508cc68c39db7d501370872f44d335cc (patch) | |
tree | 307f198a7119872a65b4e0533d57621f8931ab25 /lib/bb/fetch2/__init__.py | |
parent | 83203cd2e677706e0111892a7843b83263cb8bd9 (diff) | |
download | openembedded-core-contrib-81158071508cc68c39db7d501370872f44d335cc.tar.gz |
fetch2/__init__.py: Error if lockfile path invalid
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>
Diffstat (limited to 'lib/bb/fetch2/__init__.py')
-rw-r--r-- | lib/bb/fetch2/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py index 5f0e6c9266..11fe95b541 100644 --- a/lib/bb/fetch2/__init__.py +++ b/lib/bb/fetch2/__init__.py @@ -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' |