summaryrefslogtreecommitdiff
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2008-07-22 09:13:51 +0000
committerRichard Purdie <richard@openedhand.com>2008-07-22 09:13:51 +0000
commit63e451ebbb79360aeed9572bf6d8af633be9cd55 (patch)
tree269e04c22d2dd8d678edbeb47a5fa783a97c8f76 /bitbake
parentdba215e3f2880f7642c9c3a4d4126a86356ebd43 (diff)
downloadopenembedded-core-63e451ebbb79360aeed9572bf6d8af633be9cd55.tar.gz
openembedded-core-63e451ebbb79360aeed9572bf6d8af633be9cd55.tar.bz2
openembedded-core-63e451ebbb79360aeed9572bf6d8af633be9cd55.zip
__init__.py: Error if SRCREV == INVALID
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4919 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/fetch/__init__.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py
index c3bea447c1..721eb4d646 100644
--- a/bitbake/lib/bb/fetch/__init__.py
+++ b/bitbake/lib/bb/fetch/__init__.py
@@ -49,6 +49,9 @@ class ParameterError(Exception):
class MD5SumError(Exception):
"""Exception raised when a MD5SUM of a file does not match the expected one"""
+class InvalidSRCREV(Exception):
+ """Exception raised when an invalid SRCREV is encountered"""
+
def uri_replace(uri, uri_find, uri_replace, d):
# bb.msg.note(1, bb.msg.domain.Fetcher, "uri_replace: operating on %s" % uri)
if not uri or not uri_find or not uri_replace:
@@ -425,6 +428,8 @@ class Fetch(object):
rev = data.getVar("SRCREV_pn-" + pn + "_" + ud.parm['name'], d, 1)
if not rev:
rev = data.getVar("SRCREV", d, 1)
+ if rev == "INVALID":
+ raise InvalidSRCREV("Please set SRCREV to a valid value")
if not rev:
return False
if rev is "SRCREVINACTION":