diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2019-06-09 23:13:35 +0300 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2019-06-15 01:30:01 +0300 |
commit | 4a35a245b35b5817c772eda941b45d06ffacb01f (patch) | |
tree | 3c70bb721200aa4dbaf2c1552a6c5b2b154e925c /calm/hint.py | |
parent | c1d428b24f352cbb1f92ceae9b279bcffe128e50 (diff) |
Don't allow hint file to consist of just 'skip:'
Historically, this was allowed for a source-only package, but source
packages not having a sdesc: is now inconvenient.
For uploads, this should be no great hardship, as we already suggest
cygport >= 0.23.0 for pvr.hint generation.
'calm-tool fix-skip-only-hint' can be used on an existing relarea.
Diffstat (limited to 'calm/hint.py')
-rwxr-xr-x | calm/hint.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/calm/hint.py b/calm/hint.py index c340b94..5b050a7 100755 --- a/calm/hint.py +++ b/calm/hint.py @@ -276,10 +276,12 @@ def hint_file_parse(fn, kind): else: errors.append("unknown construct '%s' at line %d" % (item, i)) - # for the pvr kind, if 'skip' isn't present, 'category' and - # 'sdesc' must be + if ('skip' in hints) and (len(hints) == 1): + errors.append("hint only contains skip: key, please update to cygport >= 0.22.0") + + # for the pvr kind, 'category' and 'sdesc' must be present # XXX: genini also requires 'requires' but that seems wrong - if 'skip' not in hints and kind == pvr: + if kind == pvr: mandatory = ['category', 'sdesc'] for k in mandatory: if k not in hints: |