diff options
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index 2e8dab9f57..daf8578f5f 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py | |||
@@ -594,24 +594,10 @@ class FetchData(object): | |||
594 | self.localpath = self.parm["localpath"] | 594 | self.localpath = self.parm["localpath"] |
595 | self.basename = os.path.basename(self.localpath) | 595 | self.basename = os.path.basename(self.localpath) |
596 | else: | 596 | else: |
597 | premirrors = bb.data.getVar('PREMIRRORS', d, True) | 597 | self.localpath = self.method.localpath(self.url, self, d) |
598 | local = "" | 598 | # We have to clear data's internal caches since the cached value of SRCREV is now wrong. |
599 | if premirrors and self.url: | 599 | # Horrible... |
600 | aurl = self.url.split(";")[0] | 600 | bb.data.delVar("ISHOULDNEVEREXIST", d) |
601 | mirrors = mirror_from_string(premirrors) | ||
602 | for (find, replace) in mirrors: | ||
603 | if replace.startswith("file://"): | ||
604 | path = aurl.split("://")[1] | ||
605 | path = path.split(";")[0] | ||
606 | local = replace.split("://")[1] + os.path.basename(path) | ||
607 | if local == aurl or not os.path.exists(local) or os.path.isdir(local): | ||
608 | local = "" | ||
609 | self.localpath = local | ||
610 | if not local: | ||
611 | self.localpath = self.method.localpath(self.url, self, d) | ||
612 | # We have to clear data's internal caches since the cached value of SRCREV is now wrong. | ||
613 | # Horrible... | ||
614 | bb.data.delVar("ISHOULDNEVEREXIST", d) | ||
615 | 601 | ||
616 | if self.localpath is not None: | 602 | if self.localpath is not None: |
617 | # Note: These files should always be in DL_DIR whereas localpath may not be. | 603 | # Note: These files should always be in DL_DIR whereas localpath may not be. |