summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2008-09-30 20:04:19 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2008-09-30 20:04:19 +0000
commitb3acedac34137d83dda0f4aafe2c4af9031364e4 (patch)
treee9892afb55bb798b86c10d6a634d760baf5bd59c
parentaf88d22ee676fde9af6477eb75dde9ca38e8d17e (diff)
downloadbitbake-b3acedac34137d83dda0f4aafe2c4af9031364e4.tar.gz
fetch/__init__.py: Raise an exception if SRCREV == 'INVALID' (from Poky)
-rw-r--r--ChangeLog1
-rw-r--r--lib/bb/fetch/__init__.py5
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index fc77cbf31..225786c51 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -144,6 +144,7 @@ Changes in Bitbake 1.9.x:
- When a regexp fails to compile for PACKAGES_DYNAMIC, print a more useful error (#4444)
- Allow to checkout CVS by Date and Time. Just add HHmm to the SRCDATE.
- Move prunedir function to utils.py and add explode_dep_versions function
+ - Raise an exception if SRCREV == 'INVALID'
Changes in Bitbake 1.8.0:
- Release 1.7.x as a stable series
diff --git a/lib/bb/fetch/__init__.py b/lib/bb/fetch/__init__.py
index c3bea447c..721eb4d64 100644
--- a/lib/bb/fetch/__init__.py
+++ b/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":