summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb')
-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)