summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorJens Rehsack <rehsack@gmail.com>2015-10-16 19:14:04 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-10-27 07:24:30 +0000
commitdcd9cd0f9e117d5cc1440ddbf7582e3440d0cc66 (patch)
treec48d31ad7af81fc5473cd5e18c0161fa5d962161 /bitbake
parent4ab7202c31482dcb42a4406ec5f35e06963a6eaf (diff)
downloadpoky-dcd9cd0f9e117d5cc1440ddbf7582e3440d0cc66.tar.gz
bitbake: fetcher: svn: Add support for checkout to a custom path
Add support for the Subversion fetcher to checkout modules to a custom path than the module name to avoid checkout is always module - svn is path based and tag/branch-checkout might break builds because of invaid path specs. (Bitbake rev: af88f538e61afa1b115be4d7afe00d8477f61750) Signed-off-by: Jens Rehsack <sno@netbsd.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/fetch2/svn.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/svn.py b/bitbake/lib/bb/fetch2/svn.py
index 1733c2beb6..8a291935c1 100644
--- a/bitbake/lib/bb/fetch2/svn.py
+++ b/bitbake/lib/bb/fetch2/svn.py
@@ -54,6 +54,11 @@ class Svn(FetchMethod):
54 54
55 ud.module = ud.parm["module"] 55 ud.module = ud.parm["module"]
56 56
57 if not "path_spec" in ud.parm:
58 ud.path_spec = ud.module
59 else:
60 ud.path_spec = ud.parm["path_spec"]
61
57 # Create paths to svn checkouts 62 # Create paths to svn checkouts
58 relpath = self._strip_leading_slashes(ud.path) 63 relpath = self._strip_leading_slashes(ud.path)
59 ud.pkgdir = os.path.join(data.expand('${SVNDIR}', d), ud.host, relpath) 64 ud.pkgdir = os.path.join(data.expand('${SVNDIR}', d), ud.host, relpath)
@@ -102,7 +107,7 @@ class Svn(FetchMethod):
102 107
103 if command == "fetch": 108 if command == "fetch":
104 transportuser = ud.parm.get("transportuser", "") 109 transportuser = ud.parm.get("transportuser", "")
105 svncmd = "%s co %s %s://%s%s/%s%s %s" % (ud.basecmd, " ".join(options), proto, transportuser, svnroot, ud.module, suffix, ud.module) 110 svncmd = "%s co %s %s://%s%s/%s%s %s" % (ud.basecmd, " ".join(options), proto, transportuser, svnroot, ud.module, suffix, ud.path_spec)
106 elif command == "update": 111 elif command == "update":
107 svncmd = "%s update %s" % (ud.basecmd, " ".join(options)) 112 svncmd = "%s update %s" % (ud.basecmd, " ".join(options))
108 else: 113 else:
@@ -149,7 +154,7 @@ class Svn(FetchMethod):
149 154
150 os.chdir(ud.pkgdir) 155 os.chdir(ud.pkgdir)
151 # tar them up to a defined filename 156 # tar them up to a defined filename
152 runfetchcmd("tar %s -czf %s %s" % (tar_flags, ud.localpath, ud.module), d, cleanup = [ud.localpath]) 157 runfetchcmd("tar %s -czf %s %s" % (tar_flags, ud.localpath, ud.path_spec), d, cleanup = [ud.localpath])
153 158
154 def clean(self, ud, d): 159 def clean(self, ud, d):
155 """ Clean SVN specific files and dirs """ 160 """ Clean SVN specific files and dirs """