aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/fetch/hg.py
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2010-11-17 14:44:40 +0100
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2010-11-19 15:59:36 +0100
commit823a02185ed109054c6c1ae366221aaed0353f24 (patch)
tree75ad908cdffc5e486ca615e393113df2904418d7 /lib/bb/fetch/hg.py
parentb8bb4433de7a981c6826173e926ca34705c4ac70 (diff)
downloadbitbake-823a02185ed109054c6c1ae366221aaed0353f24.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. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'lib/bb/fetch/hg.py')
-rw-r--r--lib/bb/fetch/hg.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/bb/fetch/hg.py b/lib/bb/fetch/hg.py
index 264a52da9..0f8d9b832 100644
--- a/lib/bb/fetch/hg.py
+++ b/lib/bb/fetch/hg.py
@@ -57,10 +57,7 @@ class Hg(Fetch):
ud.module = ud.parm["module"]
# Create paths to mercurial checkouts
- relpath = ud.path
- if relpath.startswith('/'):
- # Remove leading slash as os.path.join can't cope
- relpath = relpath[1:]
+ relpath = self._strip_leading_slashes(ud.path)
ud.pkgdir = os.path.join(data.expand('${HGDIR}', d), ud.host, relpath)
ud.moddir = os.path.join(ud.pkgdir, ud.module)