summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-03 18:24:25 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-10 23:36:52 +0000
commit9188a6a7db68370cc2d26eb1884f76c99e6b596e (patch)
treef2deeecf23e5713b6533ca8b265ade129e03e6b2 /lib
parent83f9445081595630488a5d3e170d282a13836c98 (diff)
downloadbitbake-9188a6a7db68370cc2d26eb1884f76c99e6b596e.tar.gz
bitbake/fetch2: Remove old local file acceleration code
Since local mirror fetches are always symlinked from the download directory directly, there is no need for this premirrors hack which doesn't cover mirrors and also abuses the localpath variable with inconsistent results. (From Poky rev: 282a828f3dc373d8f1397827ebbe1be1c54f2d2a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/bb/fetch2/__init__.py22
1 files changed, 4 insertions, 18 deletions
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index 2e8dab9f5..daf8578f5 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -594,24 +594,10 @@ class FetchData(object):
self.localpath = self.parm["localpath"]
self.basename = os.path.basename(self.localpath)
else:
- premirrors = bb.data.getVar('PREMIRRORS', d, True)
- local = ""
- if premirrors and self.url:
- aurl = self.url.split(";")[0]
- mirrors = mirror_from_string(premirrors)
- for (find, replace) in mirrors:
- if replace.startswith("file://"):
- path = aurl.split("://")[1]
- path = path.split(";")[0]
- local = replace.split("://")[1] + os.path.basename(path)
- if local == aurl or not os.path.exists(local) or os.path.isdir(local):
- local = ""
- self.localpath = local
- if not local:
- self.localpath = self.method.localpath(self.url, self, d)
- # We have to clear data's internal caches since the cached value of SRCREV is now wrong.
- # Horrible...
- bb.data.delVar("ISHOULDNEVEREXIST", d)
+ self.localpath = self.method.localpath(self.url, self, d)
+ # We have to clear data's internal caches since the cached value of SRCREV is now wrong.
+ # Horrible...
+ bb.data.delVar("ISHOULDNEVEREXIST", d)
if self.localpath is not None:
# Note: These files should always be in DL_DIR whereas localpath may not be.