check_source: don't enforce name for kiwi images

The benefit of this check is unclear to me. It enforces the Name tag
inside he kiwi file to be the same as the package name in OBS while the
kiwi file name itself can be arbitrary.
So that means that kiwi package names end up encoding their distribution
and version (eg "openSUSE-Leap-15.2-Vagrant") and have to be renamed for
each release. Also means diffing between released versions isn't as
straight forward as it could be if the name was more flexibel.
If we wanted to enforce something then we should make sure the actual
kiwi file name is the same as the OBS package name. That is what the
spec file name check actually does after all (package hello needs to
have hello.spec ie srpm name hello).
This commit is contained in:
Ludwig Nussel 2019-09-20 14:37:46 +02:00
parent 155606e3d8
commit 67fd2718b5

View File

@ -145,7 +145,7 @@ class CheckSource(ReviewBot.ReviewBot):
shutil.rmtree(os.path.join(target_package, '.osc')) shutil.rmtree(os.path.join(target_package, '.osc'))
new_info = self.package_source_parse(source_project, source_package, source_revision) new_info = self.package_source_parse(source_project, source_package, source_revision)
if new_info['name'] != target_package: if not new_info['filename'].endswith('.kiwi') and new_info['name'] != target_package:
shutil.rmtree(dir) shutil.rmtree(dir)
self.review_messages['declined'] = "A package submitted as %s has to build as 'Name: %s' - found Name '%s'" % (target_package, target_package, new_info['name']) self.review_messages['declined'] = "A package submitted as %s has to build as 'Name: %s' - found Name '%s'" % (target_package, target_package, new_info['name'])
return False return False
@ -294,6 +294,9 @@ class CheckSource(ReviewBot.ReviewBot):
if xml.find('version') is not None: if xml.find('version') is not None:
ret['version'] = xml.find('version').text ret['version'] = xml.find('version').text
if xml.find('filename') is not None:
ret['filename'] = xml.find('filename').text
return ret return ret
def only_changes(self): def only_changes(self):