diff options
| -rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index 3f5de990de..90c894f60f 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py | |||
| @@ -756,6 +756,7 @@ class FetchData(object): | |||
| 756 | self.lockfile = None | 756 | self.lockfile = None |
| 757 | self.mirrortarball = None | 757 | self.mirrortarball = None |
| 758 | self.basename = None | 758 | self.basename = None |
| 759 | self.basepath = None | ||
| 759 | (self.type, self.host, self.path, self.user, self.pswd, self.parm) = decodeurl(data.expand(url, d)) | 760 | (self.type, self.host, self.path, self.user, self.pswd, self.parm) = decodeurl(data.expand(url, d)) |
| 760 | self.date = self.getSRCDate(d) | 761 | self.date = self.getSRCDate(d) |
| 761 | self.url = url | 762 | self.url = url |
| @@ -812,8 +813,14 @@ class FetchData(object): | |||
| 812 | elif self.localfile: | 813 | elif self.localfile: |
| 813 | self.localpath = self.method.localpath(self.url, self, d) | 814 | self.localpath = self.method.localpath(self.url, self, d) |
| 814 | 815 | ||
| 815 | # Note: These files should always be in DL_DIR whereas localpath may not be. | 816 | dldir = d.getVar("DL_DIR", True) |
| 816 | basepath = d.expand("${DL_DIR}/%s" % os.path.basename(self.localpath or self.basename)) | 817 | # Note: .done and .lock files should always be in DL_DIR whereas localpath may not be. |
| 818 | if self.localpath and self.localpath.startswith(dldir): | ||
| 819 | basepath = self.localpath | ||
| 820 | elif self.localpath: | ||
| 821 | basepath = dldir + os.sep + os.path.basename(self.localpath) | ||
| 822 | else: | ||
| 823 | basepath = dldir + os.sep + (self.basepath or self.basename) | ||
| 817 | self.donestamp = basepath + '.done' | 824 | self.donestamp = basepath + '.done' |
| 818 | self.lockfile = basepath + '.lock' | 825 | self.lockfile = basepath + '.lock' |
| 819 | 826 | ||
