summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-07-02 21:23:04 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-07-04 14:48:15 +0100
commitdd5f6ae551bd074926771091326c4152af8cbc4b (patch)
treeb8b4d81ae729eb96a560a0b070dc96a8596cd949 /bitbake/lib
parent852266d0bcc13e46c083e102ddb5f0eda0d59513 (diff)
downloadpoky-dd5f6ae551bd074926771091326c4152af8cbc4b.tar.gz
bitbake: fetch2/svn: Enhance to cope with subversion 1.7 upgrade
svn changed working checkout formats between 1.6 and 1.7. Its convoluted to detect what format a given working copy is in so the simplest solution is simply to run "svn upgrade" within the working copy. The base svn command variable is relocated slightly to enable this new code to work effectively. (Bitbake rev: ebd3ecdb5f3c6d3fe1fad27cbed4d80f4277e92e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/fetch2/svn.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/bitbake/lib/bb/fetch2/svn.py b/bitbake/lib/bb/fetch2/svn.py
index 59d7ccbac1..bc5b96b556 100644
--- a/bitbake/lib/bb/fetch2/svn.py
+++ b/bitbake/lib/bb/fetch2/svn.py
@@ -49,6 +49,8 @@ class Svn(FetchMethod):
49 if not "module" in ud.parm: 49 if not "module" in ud.parm:
50 raise MissingParameterError('module', ud.url) 50 raise MissingParameterError('module', ud.url)
51 51
52 ud.basecmd = d.getVar('FETCHCMD_svn', True)
53
52 ud.module = ud.parm["module"] 54 ud.module = ud.parm["module"]
53 55
54 # Create paths to svn checkouts 56 # Create paths to svn checkouts
@@ -69,8 +71,6 @@ class Svn(FetchMethod):
69 command is "fetch", "update", "info" 71 command is "fetch", "update", "info"
70 """ 72 """
71 73
72 basecmd = data.expand('${FETCHCMD_svn}', d)
73
74 proto = ud.parm.get('proto', 'svn') 74 proto = ud.parm.get('proto', 'svn')
75 75
76 svn_rsh = None 76 svn_rsh = None
@@ -88,7 +88,7 @@ class Svn(FetchMethod):
88 options.append("--password %s" % ud.pswd) 88 options.append("--password %s" % ud.pswd)
89 89
90 if command == "info": 90 if command == "info":
91 svncmd = "%s info %s %s://%s/%s/" % (basecmd, " ".join(options), proto, svnroot, ud.module) 91 svncmd = "%s info %s %s://%s/%s/" % (ud.basecmd, " ".join(options), proto, svnroot, ud.module)
92 else: 92 else:
93 suffix = "" 93 suffix = ""
94 if ud.revision: 94 if ud.revision:
@@ -96,9 +96,9 @@ class Svn(FetchMethod):
96 suffix = "@%s" % (ud.revision) 96 suffix = "@%s" % (ud.revision)
97 97
98 if command == "fetch": 98 if command == "fetch":
99 svncmd = "%s co %s %s://%s/%s%s %s" % (basecmd, " ".join(options), proto, svnroot, ud.module, suffix, ud.module) 99 svncmd = "%s co %s %s://%s/%s%s %s" % (ud.basecmd, " ".join(options), proto, svnroot, ud.module, suffix, ud.module)
100 elif command == "update": 100 elif command == "update":
101 svncmd = "%s update %s" % (basecmd, " ".join(options)) 101 svncmd = "%s update %s" % (ud.basecmd, " ".join(options))
102 else: 102 else:
103 raise FetchError("Invalid svn command %s" % command, ud.url) 103 raise FetchError("Invalid svn command %s" % command, ud.url)
104 104
@@ -117,6 +117,11 @@ class Svn(FetchMethod):
117 logger.info("Update " + loc) 117 logger.info("Update " + loc)
118 # update sources there 118 # update sources there
119 os.chdir(ud.moddir) 119 os.chdir(ud.moddir)
120 # We need to attempt to run svn upgrade first in case its an older working format
121 try:
122 runfetchcmd(ud.basecmd + " upgrade", d)
123 except FetchError:
124 pass
120 logger.debug(1, "Running %s", svnupdatecmd) 125 logger.debug(1, "Running %s", svnupdatecmd)
121 bb.fetch2.check_network_access(d, svnupdatecmd, ud.url) 126 bb.fetch2.check_network_access(d, svnupdatecmd, ud.url)
122 runfetchcmd(svnupdatecmd, d) 127 runfetchcmd(svnupdatecmd, d)