diff options
Diffstat (limited to 'bitbake/lib/bb/fetch/local.py')
-rw-r--r-- | bitbake/lib/bb/fetch/local.py | 18 |
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 from bb.fetch import Fetch class Local(Fetch): - def supports(url, d): - """Check to see if a given url can be fetched in the local filesystem. - Expects supplied url in list form, as outputted by bb.decodeurl(). + def supports(self, url, urldata, d): """ - (type, host, path, user, pswd, parm) = bb.decodeurl(data.expand(url, d)) - return type in ['file','patch'] - supports = staticmethod(supports) + Check to see if a given url can be fetched with cvs. + """ + return urldata.type in ['file','patch'] - def localpath(url, d): + def localpath(self, url, urldata, d): """Return the local filename of a given url assuming a successful fetch. """ path = url.split("://")[1] @@ -52,10 +50,10 @@ class Local(Fetch): filesdir = data.getVar('FILESDIR', d, 1) if filesdir: newpath = os.path.join(filesdir, path) + # We don't set localfile as for this fetcher the file is already local! return newpath - localpath = staticmethod(localpath) - def go(self, urls = []): + def go(self, url, urldata, d): """Fetch urls (no-op for Local method)""" -# no need to fetch local files, we'll deal with them in place. + # no need to fetch local files, we'll deal with them in place. return 1 |