From ef84f01d1b7bffb1aa3adbc4b47146b098d4adea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dirk=20M=C3=BCller?= Date: Thu, 20 Jul 2023 12:36:34 +0200 Subject: [PATCH] Revert temporary fixups, these are working now --- check_source.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/check_source.py b/check_source.py index a2df03a0e..2839c322f 100755 --- a/check_source.py +++ b/check_source.py @@ -1,6 +1,5 @@ #!/usr/bin/python3 -from contextlib import suppress import difflib import glob import os @@ -248,22 +247,17 @@ def check_source_submission( pathname=copath, server_service_files=True, expand_link=True) os.rename(source_package, target_package) shutil.rmtree(os.path.join(target_package, '.osc')) - # TODO(dmllr): Fix in the source checker - with suppress(FileNotFoundError): - os.remove(os.path.join(target_package, '.gitattributes')) new_info = self.package_source_parse(source_project, source_package, source_revision, target_package) filename = new_info.get('filename', '') expected_name = target_package if filename == '_preinstallimage': expected_name = 'preinstallimage' - # TODO(dmllr): self.package_source_parse cannot handle scm_sync submissions, so skip the check for now - if not self.source_is_scm_staging_submission(source_project): - if not (filename.endswith('.kiwi') or filename == 'Dockerfile') and new_info['name'] != expected_name: - shutil.rmtree(copath) - self.review_messages['declined'] = "A package submitted as %s has to build as 'Name: %s' - found Name '%s'" % ( - target_package, expected_name, new_info['name']) - return False + if not (filename.endswith('.kiwi') or filename == 'Dockerfile') and new_info['name'] != expected_name: + shutil.rmtree(copath) + self.review_messages['declined'] = "A package submitted as %s has to build as 'Name: %s' - found Name '%s'" % ( + target_package, expected_name, new_info['name']) + return False if not self.check_service_file(target_package): return False