summaryrefslogtreecommitdiffstats
path: root/bitbake/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
committerRichard Purdie <rpurdie@linux.intel.com>2011-01-04 14:46:41 +0000
commit87b6f7d27ace9d6465414c28bbba003f368a49dd (patch)
tree8c53d7327b7dc8eec439cae5c69de5b36ba42ed3 /bitbake/lib/bb/fetch/hg.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/hg.py')
-rw-r--r--bitbake/lib/bb/fetch/hg.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/bitbake/lib/bb/fetch/hg.py b/bitbake/lib/bb/fetch/hg.py
index 264a52da9f..0f8d9b8324 100644
--- a/bitbake/lib/bb/fetch/hg.py
+++ b/bitbake/lib/bb/fetch/hg.py
@@ -57,10 +57,7 @@ class Hg(Fetch):
57 ud.module = ud.parm["module"] 57 ud.module = ud.parm["module"]
58 58
59 # Create paths to mercurial checkouts 59 # Create paths to mercurial checkouts
60 relpath = ud.path 60 relpath = self._strip_leading_slashes(ud.path)
61 if relpath.startswith('/'):
62 # Remove leading slash as os.path.join can't cope
63 relpath = relpath[1:]
64 ud.pkgdir = os.path.join(data.expand('${HGDIR}', d), ud.host, relpath) 61 ud.pkgdir = os.path.join(data.expand('${HGDIR}', d), ud.host, relpath)
65 ud.moddir = os.path.join(ud.pkgdir, ud.module) 62 ud.moddir = os.path.join(ud.pkgdir, ud.module)
66 63