summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch/__init__.py
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2010-11-17 14:44:40 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2011-01-04 14:46:41 +0000
commit87b6f7d27ace9d6465414c28bbba003f368a49dd (patch)
tree8c53d7327b7dc8eec439cae5c69de5b36ba42ed3 /bitbake/lib/bb/fetch/__init__.py
parentd0d67a9fe279d26423494946666a5ca0acc5d66f (diff)
downloadpoky-87b6f7d27ace9d6465414c28bbba003f368a49dd.tar.gz
fetch: add common helper _strip_leading_slashes()
Several fetcher need a way to strip leading slashes off a local path. This helper-function consolidates all such occurances. (Bitbake rev: 823a02185ed109054c6c1ae366221aaed0353f24) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb/fetch/__init__.py')
-rw-r--r--bitbake/lib/bb/fetch/__init__.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py
index faf7fc489f..c9c8bdb893 100644
--- a/bitbake/lib/bb/fetch/__init__.py
+++ b/bitbake/lib/bb/fetch/__init__.py
@@ -607,6 +607,13 @@ class Fetch(object):
607 and duplicate code execution) 607 and duplicate code execution)
608 """ 608 """
609 return url 609 return url
610 def _strip_leading_slashes(self, relpath):
611 """
612 Remove leading slash as os.path.join can't cope
613 """
614 while os.path.isabs(relpath):
615 relpath = relpath[1:]
616 return relpath
610 617
611 def setUrls(self, urls): 618 def setUrls(self, urls):
612 self.__urls = urls 619 self.__urls = urls