non-source rpms should not be used in the importer

This commit is contained in:
Louis Abel 2023-07-13 09:50:45 -07:00
parent 3e8f3bb642
commit 32f0c3520c
Signed by: label
GPG Key ID: 3331F061D1D9990E

View File

@ -321,6 +321,12 @@ class SrpmImport(Import):
git_url = f'ssh://{git_user}@{git_url_path}/{org}/{pkg_name}.git' git_url = f'ssh://{git_user}@{git_url_path}/{org}/{pkg_name}.git'
self.__git_url = git_url self.__git_url = git_url
file_name_search_srpm_res = re.search(r'.*?\.src\.rpm$',
self.__srpm_path, re.IGNORECASE)
if not file_name_search_srpm_res:
raise err.RpmInfoError('This is not a source package')
if len(release) == 0: if len(release) == 0:
self.__release = self.__get_srpm_release_version self.__release = self.__get_srpm_release_version