From 87b6f7d27ace9d6465414c28bbba003f368a49dd Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Wed, 17 Nov 2010 14:44:40 +0100 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch/hg.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'bitbake/lib/bb/fetch/hg.py') diff --git a/bitbake/lib/bb/fetch/hg.py b/bitbake/lib/bb/fetch/hg.py index 264a52da9..0f8d9b832 100644 --- a/bitbake/lib/bb/fetch/hg.py +++ b/bitbake/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) -- cgit v1.2.3