Various fixes to package name URL parsing (#4978)
This commit is contained in:
parent
c7df12f698
commit
a31ce17f0b
3 changed files with 5 additions and 0 deletions
|
@ -334,6 +334,8 @@ def name_parsed_correctly(pkg, name):
|
||||||
pkg_name = pkg_name[2:]
|
pkg_name = pkg_name[2:]
|
||||||
elif pkg_name.startswith('py-'):
|
elif pkg_name.startswith('py-'):
|
||||||
pkg_name = pkg_name[3:]
|
pkg_name = pkg_name[3:]
|
||||||
|
elif pkg_name.startswith('perl-'):
|
||||||
|
pkg_name = pkg_name[5:]
|
||||||
elif pkg_name.startswith('octave-'):
|
elif pkg_name.startswith('octave-'):
|
||||||
pkg_name = pkg_name[7:]
|
pkg_name = pkg_name[7:]
|
||||||
|
|
||||||
|
|
|
@ -124,6 +124,8 @@ def test_url_strip_version_suffixes(url, expected):
|
||||||
('converge_install_2.3.16', '2.3.16', 'converge'),
|
('converge_install_2.3.16', '2.3.16', 'converge'),
|
||||||
# Download type - src
|
# Download type - src
|
||||||
('jpegsrc.v9b', '9b', 'jpeg'),
|
('jpegsrc.v9b', '9b', 'jpeg'),
|
||||||
|
# Download type - archive
|
||||||
|
('coinhsl-archive-2014.01.17', '2014.01.17', 'coinhsl'),
|
||||||
# Download type - std
|
# Download type - std
|
||||||
('ghostscript-fonts-std-8.11', '8.11', 'ghostscript-fonts'),
|
('ghostscript-fonts-std-8.11', '8.11', 'ghostscript-fonts'),
|
||||||
# Download version - release
|
# Download version - release
|
||||||
|
|
|
@ -290,6 +290,7 @@ def strip_name_suffixes(path, version):
|
||||||
'install',
|
'install',
|
||||||
'src',
|
'src',
|
||||||
'(open)?[Ss]ources?',
|
'(open)?[Ss]ources?',
|
||||||
|
'[._-]archive',
|
||||||
'[._-]std',
|
'[._-]std',
|
||||||
|
|
||||||
# Download version
|
# Download version
|
||||||
|
|
Loading…
Reference in a new issue