bitbake/fetch2: Define a sane localpath function and remove code duplication

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2011-02-03 21:20:39 +00:00
parent 972eb5faba
commit 5a52cb80d6
11 changed files with 2 additions and 31 deletions

View File

@@ -621,7 +621,8 @@ class Fetch(object):
Can also setup variables in urldata for use in go (saving code duplication
and duplicate code execution)
"""
return url
return os.path.join(data.getVar("DL_DIR", d, True), urldata.localfile)
def _strip_leading_slashes(self, relpath):
"""
Remove leading slash as os.path.join can't cope