diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2018-02-20 16:04:33 +0300 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2018-02-20 16:27:28 +0300 |
commit | 3691f731db4121d9db07aa3a69c90e6000895eae (patch) | |
tree | e5802b5a7060414fe4180883b82dd92a08f29e2e | |
parent | dd5b9e83d5251aafe6880008b09ef59f9be4b634 (diff) |
Tolerate comma or space separated obsoletes: in hints
-rwxr-xr-x | calm/hint.py | 6 | ||||
-rwxr-xr-x | test/testdata/relarea/noarch/release/test-c/test-c-1.0-1.hint | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/calm/hint.py b/calm/hint.py index 98386ef..f5d7419 100755 --- a/calm/hint.py +++ b/calm/hint.py @@ -318,7 +318,11 @@ def hint_file_parse(fn, kind): hints['depends'] = split_trim_sort_join(hints['depends'], ',') if 'obsoletes' in hints: - hints['obsoletes'] = split_trim_sort_join(hints['obsoletes'], ',') + # obsoletes is specified as comma separated, but cygport writes it space separated at the moment... + if ',' in hints['obsoletes']: + hints['obsoletes'] = split_trim_sort_join(hints['obsoletes'], ',') + else: + hints['obsoletes'] = split_trim_sort_join(hints['obsoletes'], None, ', ') if 'replace-versions' in hints: hints['replace-versions'] = split_trim_sort_join(hints['replace-versions'], None, ' ') diff --git a/test/testdata/relarea/noarch/release/test-c/test-c-1.0-1.hint b/test/testdata/relarea/noarch/release/test-c/test-c-1.0-1.hint index 9db4f40..4610d7a 100755 --- a/test/testdata/relarea/noarch/release/test-c/test-c-1.0-1.hint +++ b/test/testdata/relarea/noarch/release/test-c/test-c-1.0-1.hint @@ -1,4 +1,4 @@ category: Devel sdesc: "test package C" -obsoletes: obs-a, obs-b +obsoletes: obs-a obs-b depends: test-d (>= 1.0), test-e |