summaryrefslogtreecommitdiffstats
path: root/lib/bb/fetch/svn.py
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2007-07-25 21:21:42 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2007-07-25 21:21:42 +0000
commit4e20ca743962a51c3064cb8213c89b66837c4e88 (patch)
tree6e677fd70ae749c3cb3757afbbc9655d9e0be18d /lib/bb/fetch/svn.py
parentfaadbc9bccb7fcf25ae274fee9bf387a5bbd8829 (diff)
downloadbitbake-4e20ca743962a51c3064cb8213c89b66837c4e88.tar.gz
svn.py: Fix #2624 and #2644 by changing svn layout in SVNDIR
Diffstat (limited to 'lib/bb/fetch/svn.py')
-rw-r--r--lib/bb/fetch/svn.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/bb/fetch/svn.py b/lib/bb/fetch/svn.py
index c7d27a285..23ca262bc 100644
--- a/lib/bb/fetch/svn.py
+++ b/lib/bb/fetch/svn.py
@@ -42,8 +42,9 @@ class Svn(Fetch):
def localpath(self, url, ud, d):
if not "module" in ud.parm:
raise MissingParameterError("svn method needs a 'module' parameter")
- else:
- ud.module = ud.parm["module"]
+
+ ud.module = ud.parm["module"]
+ ud.moddir = ud.module.replace('/', '.')
ud.revision = ""
if 'rev' in ud.parm:
@@ -52,7 +53,7 @@ class Svn(Fetch):
if ud.revision:
ud.date = ""
- ud.localfile = data.expand('%s_%s_%s_%s_%s.tar.gz' % (ud.module.replace('/', '.'), ud.host, ud.path.replace('/', '.'), ud.revision, ud.date), d)
+ ud.localfile = data.expand('%s_%s_%s_%s_%s.tar.gz' % (ud.moddir, ud.host, ud.path.replace('/', '.'), ud.revision, ud.date), d)
return os.path.join(data.getVar("DL_DIR", d, True), ud.localfile)
@@ -115,7 +116,11 @@ class Svn(Fetch):
return
pkg = data.expand('${PN}', d)
- pkgdir = os.path.join(data.expand('${SVNDIR}', d), pkg)
+ relpath = ud.path
+ if relpath.startswith('/'):
+ # Remove leading slash as os.path.join can't cope
+ relpath = relpath[1:]
+ pkgdir = os.path.join(data.expand('${SVNDIR}', d), ud.host, relpath)
moddir = os.path.join(pkgdir, ud.module)
bb.msg.debug(2, bb.msg.domain.Fetcher, "Fetch: checking for module directory '" + moddir + "'")