diff options
Diffstat (limited to 'bitbake/lib/bb/fetch2/__init__.py')
-rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index d6ad3bb99a..9fec705ad6 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py | |||
@@ -525,6 +525,7 @@ class FetchData(object): | |||
525 | self.localpath = None | 525 | self.localpath = None |
526 | self.lockfile = None | 526 | self.lockfile = None |
527 | self.mirrortarball = None | 527 | self.mirrortarball = None |
528 | self.basename = None | ||
528 | (self.type, self.host, self.path, self.user, self.pswd, self.parm) = decodeurl(data.expand(url, d)) | 529 | (self.type, self.host, self.path, self.user, self.pswd, self.parm) = decodeurl(data.expand(url, d)) |
529 | self.date = self.getSRCDate(d) | 530 | self.date = self.getSRCDate(d) |
530 | self.url = url | 531 | self.url = url |
@@ -573,11 +574,10 @@ class FetchData(object): | |||
573 | elif self.localfile: | 574 | elif self.localfile: |
574 | self.localpath = self.method.localpath(self.url, self, d) | 575 | self.localpath = self.method.localpath(self.url, self, d) |
575 | 576 | ||
576 | if self.localfile and self.localpath: | 577 | # Note: These files should always be in DL_DIR whereas localpath may not be. |
577 | # Note: These files should always be in DL_DIR whereas localpath may not be. | 578 | basepath = bb.data.expand("${DL_DIR}/%s" % os.path.basename(self.localpath or self.basename), d) |
578 | basepath = bb.data.expand("${DL_DIR}/%s" % os.path.basename(self.localpath), d) | 579 | self.donestamp = basepath + '.done' |
579 | self.donestamp = basepath + '.done' | 580 | self.lockfile = basepath + '.lock' |
580 | self.lockfile = basepath + '.lock' | ||
581 | 581 | ||
582 | def setup_localpath(self, d): | 582 | def setup_localpath(self, d): |
583 | if not self.localpath: | 583 | if not self.localpath: |
@@ -913,9 +913,6 @@ class Fetch(object): | |||
913 | m = ud.method | 913 | m = ud.method |
914 | localpath = "" | 914 | localpath = "" |
915 | 915 | ||
916 | if not ud.localfile: | ||
917 | continue | ||
918 | |||
919 | lf = bb.utils.lockfile(ud.lockfile) | 916 | lf = bb.utils.lockfile(ud.lockfile) |
920 | 917 | ||
921 | try: | 918 | try: |
@@ -951,7 +948,7 @@ class Fetch(object): | |||
951 | mirrors = mirror_from_string(bb.data.getVar('MIRRORS', self.d, True)) | 948 | mirrors = mirror_from_string(bb.data.getVar('MIRRORS', self.d, True)) |
952 | localpath = try_mirrors (self.d, ud, mirrors) | 949 | localpath = try_mirrors (self.d, ud, mirrors) |
953 | 950 | ||
954 | if not localpath or not os.path.exists(localpath): | 951 | if not localpath or ((not os.path.exists(localpath)) and localpath.find("*") == -1): |
955 | raise FetchError("Unable to fetch URL %s from any source." % u, u) | 952 | raise FetchError("Unable to fetch URL %s from any source." % u, u) |
956 | 953 | ||
957 | if os.path.exists(ud.donestamp): | 954 | if os.path.exists(ud.donestamp): |