summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/recipetool/create.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index f7b0676f32..f8701d401e 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -336,10 +336,16 @@ def supports_srcrev(uri):
336 # odd interactions with the urldata cache which lead to errors 336 # odd interactions with the urldata cache which lead to errors
337 localdata.setVar('SRCREV', '${AUTOREV}') 337 localdata.setVar('SRCREV', '${AUTOREV}')
338 bb.data.update_data(localdata) 338 bb.data.update_data(localdata)
339 fetcher = bb.fetch2.Fetch([uri], localdata) 339 try:
340 urldata = fetcher.ud 340 fetcher = bb.fetch2.Fetch([uri], localdata)
341 for u in urldata: 341 urldata = fetcher.ud
342 if urldata[u].method.supports_srcrev(): 342 for u in urldata:
343 if urldata[u].method.supports_srcrev():
344 return True
345 except bb.fetch2.FetchError as e:
346 logger.debug('FetchError in supports_srcrev: %s' % str(e))
347 # Fall back to basic check
348 if uri.startswith(('git://', 'gitsm://')):
343 return True 349 return True
344 return False 350 return False
345 351