summaryrefslogtreecommitdiff
path: root/bitbake/lib/bb/fetch/osc.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/fetch/osc.py')
-rw-r--r--bitbake/lib/bb/fetch/osc.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/bitbake/lib/bb/fetch/osc.py b/bitbake/lib/bb/fetch/osc.py
index 6fcb344ce..a32d0b0a2 100644
--- a/bitbake/lib/bb/fetch/osc.py
+++ b/bitbake/lib/bb/fetch/osc.py
@@ -33,10 +33,7 @@ class Osc(Fetch):
ud.module = ud.parm["module"]
# Create paths to osc 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('${OSCDIR}', d), ud.host)
ud.moddir = os.path.join(ud.pkgdir, relpath, ud.module)
@@ -73,10 +70,7 @@ class Osc(Fetch):
if ud.revision:
options.append("-r %s" % ud.revision)
- coroot = ud.path
- if coroot.startswith('/'):
- # Remove leading slash as os.path.join can't cope
- coroot= coroot[1:]
+ coroot = self._strip_leading_slashes(ud.path)
if command is "fetch":
osccmd = "%s %s co %s/%s %s" % (basecmd, config, coroot, ud.module, " ".join(options))