diff options
Diffstat (limited to 'bitbake/lib/bb/fetch/__init__.py')
-rw-r--r-- | bitbake/lib/bb/fetch/__init__.py | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py index f739245bd1..229b28c19d 100644 --- a/bitbake/lib/bb/fetch/__init__.py +++ b/bitbake/lib/bb/fetch/__init__.py | |||
@@ -182,8 +182,21 @@ def get_srcrev(d): | |||
182 | if len(scms) == 1: | 182 | if len(scms) == 1: |
183 | return urldata[scms[0]].method.sortable_revision(scms[0], urldata[scms[0]], d) | 183 | return urldata[scms[0]].method.sortable_revision(scms[0], urldata[scms[0]], d) |
184 | 184 | ||
185 | bb.msg.error(bb.msg.domain.Fetcher, "Sorry, support for SRCREV_FORMAT still needs to be written") | 185 | # |
186 | raise ParameterError | 186 | # Mutiple SCMs are in SRC_URI so we resort to SRCREV_FORMAT |
187 | # | ||
188 | format = bb.data.getVar('SRCREV_FORMAT', d, 1) | ||
189 | if not format: | ||
190 | bb.msg.error(bb.msg.domain.Fetcher, "The SRCREV_FORMAT variable must be set when multiple SCMs are used.") | ||
191 | raise ParameterError | ||
192 | |||
193 | for scm in scms: | ||
194 | if 'name' in urldata[scm].parm: | ||
195 | name = urldata[scm].parm["name"] | ||
196 | rev = urldata[scm].method.sortable_revision(scm, urldata[scm], d) | ||
197 | format = format.replace(name, rev) | ||
198 | |||
199 | return format | ||
187 | 200 | ||
188 | def localpath(url, d, cache = True): | 201 | def localpath(url, d, cache = True): |
189 | """ | 202 | """ |