diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2021-05-29 16:35:11 +0300 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2021-05-29 18:03:31 +0300 |
commit | 88ddf1ea8212fcffb8a9b12f7645b16ea446f97c (patch) | |
tree | 21e94acb3f21a4f042462059d07304702dcc12c9 /calm/hint.py | |
parent | aea57c2823ad55b2c34b6d0cf8d8548f7965e679 (diff) |
Make 'homepage:' mandatory in new -src.hint uploads
Also update test data appropriately
Diffstat (limited to 'calm/hint.py')
-rwxr-xr-x | calm/hint.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/calm/hint.py b/calm/hint.py index 6cabea4..9deb2f0 100755 --- a/calm/hint.py +++ b/calm/hint.py @@ -192,7 +192,7 @@ def split_trim_sort_join(hint, splitchar, joinchar=None): # parse the file |fn| as a .hint file of kind |kind| -def hint_file_parse(fn, kind): +def hint_file_parse(fn, kind, strict=False): hints = OrderedDict() errors = [] warnings = [] @@ -289,9 +289,13 @@ def hint_file_parse(fn, kind): 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 + # (genini also requires 'requires' but that seems wrong) + # for the spvr kind, 'homepage' must be present for new packages if (kind == pvr) or (kind == spvr): mandatory = ['category', 'sdesc'] + if (kind == spvr) and strict: + mandatory.append('homepage') + for k in mandatory: if k not in hints: errors.append("required key '%s' missing" % (k)) |