summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch/local.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/fetch/local.py')
-rw-r--r--bitbake/lib/bb/fetch/local.py18
1 files changed, 8 insertions, 10 deletions
diff --git a/bitbake/lib/bb/fetch/local.py b/bitbake/lib/bb/fetch/local.py
index 51938f823e..5224976704 100644
--- a/bitbake/lib/bb/fetch/local.py
+++ b/bitbake/lib/bb/fetch/local.py
@@ -31,15 +31,13 @@ from bb import data
31from bb.fetch import Fetch 31from bb.fetch import Fetch
32 32
33class Local(Fetch): 33class Local(Fetch):
34 def supports(url, d): 34 def supports(self, url, urldata, d):
35 """Check to see if a given url can be fetched in the local filesystem.
36 Expects supplied url in list form, as outputted by bb.decodeurl().
37 """ 35 """
38 (type, host, path, user, pswd, parm) = bb.decodeurl(data.expand(url, d)) 36 Check to see if a given url can be fetched with cvs.
39 return type in ['file','patch'] 37 """
40 supports = staticmethod(supports) 38 return urldata.type in ['file','patch']
41 39
42 def localpath(url, d): 40 def localpath(self, url, urldata, d):
43 """Return the local filename of a given url assuming a successful fetch. 41 """Return the local filename of a given url assuming a successful fetch.
44 """ 42 """
45 path = url.split("://")[1] 43 path = url.split("://")[1]
@@ -52,10 +50,10 @@ class Local(Fetch):
52 filesdir = data.getVar('FILESDIR', d, 1) 50 filesdir = data.getVar('FILESDIR', d, 1)
53 if filesdir: 51 if filesdir:
54 newpath = os.path.join(filesdir, path) 52 newpath = os.path.join(filesdir, path)
53 # We don't set localfile as for this fetcher the file is already local!
55 return newpath 54 return newpath
56 localpath = staticmethod(localpath)
57 55
58 def go(self, urls = []): 56 def go(self, url, urldata, d):
59 """Fetch urls (no-op for Local method)""" 57 """Fetch urls (no-op for Local method)"""
60# no need to fetch local files, we'll deal with them in place. 58 # no need to fetch local files, we'll deal with them in place.
61 return 1 59 return 1