summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2019-08-13 00:10:31 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2019-08-13 00:10:31 +0530
commit43a014e03f47ef6119e67325d9b2a2f422f1209e (patch)
tree28bb1f35af31ff9008a27aecda969d78be4088de
parent97271e8c117e47c3975e8ca8a37d357beeec48d0 (diff)
cerbero: Improve error message when using BSD/MIT licenses
-rw-r--r--cerbero/build/recipe.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/cerbero/build/recipe.py b/cerbero/build/recipe.py
index e3c695e6..484f7cc3 100644
--- a/cerbero/build/recipe.py
+++ b/cerbero/build/recipe.py
@@ -462,8 +462,10 @@ SOFTWARE LICENSE COMPLIANCE.\n\n'''
Copy generic licenses from the cerbero licenses datadir.
'''
if lobj.acronym.startswith(('BSD', 'MIT')):
- raise RuntimeError('{}.recipe: must specify the license file for BSD and MIT licenses'
- .format(self.name))
+ msg = '{}.recipe: must specify the license file for BSD and MIT licenses ' \
+ 'using a dict of the form: ' \
+ "{License.enum: ['path-to-license-file-in-source-tree']}"
+ raise RuntimeError(msg.format(self.name))
fname = lobj.acronym + '.txt'
dest = str(install_dir / fname)
src = os.path.join(self.config.data_dir, 'licenses', lobj.acronym + '.txt')