diff options
Diffstat (limited to 'bitbake/lib/bb/fetch/osc.py')
-rw-r--r-- | bitbake/lib/bb/fetch/osc.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/bitbake/lib/bb/fetch/osc.py b/bitbake/lib/bb/fetch/osc.py index 6fcb344ce0..a32d0b0a29 100644 --- a/bitbake/lib/bb/fetch/osc.py +++ b/bitbake/lib/bb/fetch/osc.py | |||
@@ -33,10 +33,7 @@ class Osc(Fetch): | |||
33 | ud.module = ud.parm["module"] | 33 | ud.module = ud.parm["module"] |
34 | 34 | ||
35 | # Create paths to osc checkouts | 35 | # Create paths to osc checkouts |
36 | relpath = ud.path | 36 | relpath = self._strip_leading_slashes(ud.path) |
37 | if relpath.startswith('/'): | ||
38 | # Remove leading slash as os.path.join can't cope | ||
39 | relpath = relpath[1:] | ||
40 | ud.pkgdir = os.path.join(data.expand('${OSCDIR}', d), ud.host) | 37 | ud.pkgdir = os.path.join(data.expand('${OSCDIR}', d), ud.host) |
41 | ud.moddir = os.path.join(ud.pkgdir, relpath, ud.module) | 38 | ud.moddir = os.path.join(ud.pkgdir, relpath, ud.module) |
42 | 39 | ||
@@ -73,10 +70,7 @@ class Osc(Fetch): | |||
73 | if ud.revision: | 70 | if ud.revision: |
74 | options.append("-r %s" % ud.revision) | 71 | options.append("-r %s" % ud.revision) |
75 | 72 | ||
76 | coroot = ud.path | 73 | coroot = self._strip_leading_slashes(ud.path) |
77 | if coroot.startswith('/'): | ||
78 | # Remove leading slash as os.path.join can't cope | ||
79 | coroot= coroot[1:] | ||
80 | 74 | ||
81 | if command is "fetch": | 75 | if command is "fetch": |
82 | osccmd = "%s %s co %s/%s %s" % (basecmd, config, coroot, ud.module, " ".join(options)) | 76 | osccmd = "%s %s co %s/%s %s" % (basecmd, config, coroot, ud.module, " ".join(options)) |