diff options
Diffstat (limited to 'bitbake/lib/bb/fetch/svn.py')
-rw-r--r-- | bitbake/lib/bb/fetch/svn.py | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/bitbake/lib/bb/fetch/svn.py b/bitbake/lib/bb/fetch/svn.py index ac5eebf5c0..6e3a9277ab 100644 --- a/bitbake/lib/bb/fetch/svn.py +++ b/bitbake/lib/bb/fetch/svn.py | |||
@@ -98,20 +98,14 @@ class Svn(Fetch): | |||
98 | 98 | ||
99 | date = Fetch.getSRCDate(d) | 99 | date = Fetch.getSRCDate(d) |
100 | 100 | ||
101 | if "method" in parm: | ||
102 | method = parm["method"] | ||
103 | else: | ||
104 | method = "pserver" | ||
105 | |||
106 | if "proto" in parm: | 101 | if "proto" in parm: |
107 | proto = parm["proto"] | 102 | proto = parm["proto"] |
108 | else: | 103 | else: |
109 | proto = "svn" | 104 | proto = "svn" |
110 | 105 | ||
111 | svn_rsh = None | 106 | svn_rsh = None |
112 | if method == "ext": | 107 | if proto == "svn+ssh" and "rsh" in parm: |
113 | if "rsh" in parm: | 108 | svn_rsh = parm["rsh"] |
114 | svn_rsh = parm["rsh"] | ||
115 | 109 | ||
116 | tarfn = data.expand('%s_%s_%s_%s_%s.tar.gz' % (module.replace('/', '.'), host, path.replace('/', '.'), revision, date), localdata) | 110 | tarfn = data.expand('%s_%s_%s_%s_%s.tar.gz' % (module.replace('/', '.'), host, path.replace('/', '.'), revision, date), localdata) |
117 | data.setVar('TARFILES', dlfile, localdata) | 111 | data.setVar('TARFILES', dlfile, localdata) |
@@ -122,24 +116,13 @@ class Svn(Fetch): | |||
122 | bb.debug(1, "%s already exists, skipping svn checkout." % tarfn) | 116 | bb.debug(1, "%s already exists, skipping svn checkout." % tarfn) |
123 | continue | 117 | continue |
124 | 118 | ||
125 | svn_tarball_stash = data.getVar('CVS_TARBALL_STASH', d, 1) | 119 | # try to use the tarball stash |
126 | if svn_tarball_stash: | 120 | if Fetch.try_mirror(d, tarfn): |
127 | fetchcmd = data.getVar("FETCHCOMMAND_wget", d, 1) | 121 | continue |
128 | uri = svn_tarball_stash + tarfn | ||
129 | bb.note("fetch " + uri) | ||
130 | fetchcmd = fetchcmd.replace("${URI}", uri) | ||
131 | ret = os.system(fetchcmd) | ||
132 | if ret == 0: | ||
133 | bb.note("Fetched %s from tarball stash, skipping checkout" % tarfn) | ||
134 | continue | ||
135 | 122 | ||
136 | olddir = os.path.abspath(os.getcwd()) | 123 | olddir = os.path.abspath(os.getcwd()) |
137 | os.chdir(data.expand(dldir, localdata)) | 124 | os.chdir(data.expand(dldir, localdata)) |
138 | 125 | ||
139 | # setup svnroot | ||
140 | # svnroot = ":" + method + ":" + user | ||
141 | # if pswd: | ||
142 | # svnroot += ":" + pswd | ||
143 | svnroot = host + path | 126 | svnroot = host + path |
144 | 127 | ||
145 | data.setVar('SVNROOT', svnroot, localdata) | 128 | data.setVar('SVNROOT', svnroot, localdata) |