mirror of
https://github.com/clearlinux/autospec.git
synced 2026-06-16 02:45:56 +00:00
Fix version parsing for libopenmpt
Given tarball libopenmpt-0.7.13+release.autotools.tar.gz, ban 'autotools' from the version number, and replace '+' with '.', so instead of 0.7.13+.autotools, generate simply 0.7.13.
This commit is contained in:
committed by
William Douglas
parent
8b9384758b
commit
2618dc3eb1
+2
-2
@@ -153,7 +153,7 @@ def convert_version(ver_str, name):
|
||||
# them out with expensive regular expressions
|
||||
banned_subs = ["x86.64", "source", "src", "all", "bin", "release", "rh",
|
||||
"ga", ".ce", "lcms", "onig", "linux", "gc", "sdk", "orig",
|
||||
"jurko", "%2f", "%2F", "%20", "x265"]
|
||||
"jurko", "%2f", "%2F", "%20", "x265", "autotools"]
|
||||
|
||||
# package names may be modified in the version string by adding "lib" for
|
||||
# example. Remove these from the name before trying to remove the name from
|
||||
@@ -169,7 +169,7 @@ def convert_version(ver_str, name):
|
||||
ver_str = ver_str.replace(name.replace(mod, ""), "")
|
||||
|
||||
# replace illegal characters
|
||||
ver_str = ver_str.strip().replace('-', '.').replace('_', '.')
|
||||
ver_str = ver_str.strip().replace('-', '.').replace('_', '.').replace('+', '.')
|
||||
|
||||
# remove banned substrings
|
||||
for sub in banned_subs:
|
||||
|
||||
Reference in New Issue
Block a user