summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-20 13:25:43 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-21 10:20:13 +0000
commit594c2e01e7f36476fee3ee47e2e94f60f06f2df9 (patch)
treeb1eb08ddece720c7534154a6c51735d9083798e4 /bitbake/lib
parent453eb5432d3341a304c1ff5b94de7e567d321aa3 (diff)
downloadpoky-594c2e01e7f36476fee3ee47e2e94f60f06f2df9.tar.gz
bitbake: fetch2: Improve invalid SRCREV error message
The current message can be ambiguous, improve it (and also rename a variable to clean up the rest of the function). (Bitbake rev: 0c1bb7c0fce7b0f334311a2893ccb00385fa8d55) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 8b6c3eed6c..de95074c40 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -897,17 +897,12 @@ def srcrev_internal_helper(ud, d, name):
897 raise FetchError("Conflicting revisions (%s from SRCREV and %s from the url) found, please spcify one valid value" % (srcrev, parmrev)) 897 raise FetchError("Conflicting revisions (%s from SRCREV and %s from the url) found, please spcify one valid value" % (srcrev, parmrev))
898 return parmrev 898 return parmrev
899 899
900 rev = srcrev 900 if srcrev == "INVALID" or not srcrev:
901 if rev == "INVALID" or not rev: 901 raise FetchError("Please set a valid SRCREV for url %s (possible key names are %s, or use a ;rev=X URL parameter)" % (str(attempts), ud.url), ud.url)
902 var = "SRCREV_pn-%s" % pn 902 if srcrev == "AUTOINC":
903 if name != '': 903 srcrev = ud.method.latest_revision(ud, d, name)
904 var = "SRCREV_%s_pn-%s" % (name, pn)
905 raise FetchError("Please set %s to a valid value" % var, ud.url)
906 if rev == "AUTOINC":
907 rev = ud.method.latest_revision(ud, d, name)
908
909 return rev
910 904
905 return srcrev
911 906
912def get_checksum_file_list(d): 907def get_checksum_file_list(d):
913 """ Get a list of files checksum in SRC_URI 908 """ Get a list of files checksum in SRC_URI