Various fixes to package name URL parsing (#4978)

This commit is contained in:
Adam J. Stewart 2017-08-05 10:15:47 -05:00 committed by GitHub
parent c7df12f698
commit a31ce17f0b
3 changed files with 5 additions and 0 deletions

View file

@ -334,6 +334,8 @@ def name_parsed_correctly(pkg, name):
pkg_name = pkg_name[2:]
elif pkg_name.startswith('py-'):
pkg_name = pkg_name[3:]
elif pkg_name.startswith('perl-'):
pkg_name = pkg_name[5:]
elif pkg_name.startswith('octave-'):
pkg_name = pkg_name[7:]

View file

@ -124,6 +124,8 @@ def test_url_strip_version_suffixes(url, expected):
('converge_install_2.3.16', '2.3.16', 'converge'),
# Download type - src
('jpegsrc.v9b', '9b', 'jpeg'),
# Download type - archive
('coinhsl-archive-2014.01.17', '2014.01.17', 'coinhsl'),
# Download type - std
('ghostscript-fonts-std-8.11', '8.11', 'ghostscript-fonts'),
# Download version - release

View file

@ -290,6 +290,7 @@ def strip_name_suffixes(path, version):
'install',
'src',
'(open)?[Ss]ources?',
'[._-]archive',
'[._-]std',
# Download version