[bitbake-devel,3/5] fetch2: Print SCMs list when SRCREV_FORMAT is not set

Submitted by Robert Yang on March 14, 2019, 9:28 a.m. | Patch ID: 159569

Details

Message ID aca46e6fee49c13c8b1f091545c5df2873b921f7.1552555629.git.liezhi.yang@windriver.com
State New
Headers show

Commit Message

Robert Yang March 14, 2019, 9:28 a.m.
This makes it easier to debug, especially when multipe SCMs like gitsm,
otherwise we don't know why there are multiple SCMs.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 bitbake/lib/bb/fetch2/__init__.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 5062bb2..64d7526 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -777,7 +777,8 @@  def get_srcrev(d, method_name='sortable_revision'):
     #
     format = d.getVar('SRCREV_FORMAT')
     if not format:
-        raise FetchError("The SRCREV_FORMAT variable must be set when multiple SCMs are used.")
+        raise FetchError("The SRCREV_FORMAT variable must be set when multiple SCMs are used.\n"\
+                         "The SCMs are:\n%s" % '\n'.join(scms))
 
     name_to_rev = {}
     seenautoinc = False