diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2018-01-23 16:33:39 +0300 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2018-01-23 19:15:44 +0300 |
commit | 730c7eebef23c43e30542da192b9616f1062a0c5 (patch) | |
tree | 8c3152654f861af99f4ceafa74a48554e80894de /calm/hint.py | |
parent | c7933435cc2da9e6ac9cc6f10cc0ca7ed48949ed (diff) |
Add a replace-versions: key in override.hint to list versions which should always be replaced
This is intended for (temporarily) dealing with anomalous versions e.g.
those which have been removed (or relabelled as test), without a
superseding higher version existing, and indicates to setup that the named
versions(s), if installed, should be replaced with different version.
Also warn if this key pointlessly lists versions which will be replaced by
the current version anyhow.
Diffstat (limited to 'calm/hint.py')
-rwxr-xr-x | calm/hint.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/calm/hint.py b/calm/hint.py index 7e30913..98386ef 100755 --- a/calm/hint.py +++ b/calm/hint.py @@ -68,6 +68,7 @@ overridekeys = { 'keep-count': 'val', 'keep-days': 'val', 'disable-check': 'val', + 'replace-versions': 'val', } hintkeys = {} @@ -319,6 +320,9 @@ def hint_file_parse(fn, kind): if 'obsoletes' in hints: hints['obsoletes'] = split_trim_sort_join(hints['obsoletes'], ',') + if 'replace-versions' in hints: + hints['replace-versions'] = split_trim_sort_join(hints['replace-versions'], None, ' ') + except UnicodeDecodeError: errors.append('invalid UTF-8') |