diff --git a/run_rpmlint.py b/run_rpmlint.py --- a/run_rpmlint.py +++ b/run_rpmlint.py @@ -46,8 +46,10 @@ command = ['rpmlint'] + srpms srpm_result = run_rpmlint(command) else: - log.warn('No .src.rpm files found in: %s', workdir) - srpm_result = Result('PASSED', [], None, None) + log.critical('No .src.rpm files found in: %s', workdir) + log.debug('Files available in the workdir:\n%s', '\n'.join(files)) + raise AssertionError('No .src.rpm files found. That should never happen, all Koji builds ' + 'should have a source RPM.') # run rpmlint on RPMs # disable network checks to avoid hitting websites too much (also the network checks were @@ -57,7 +59,7 @@ rpm_result = run_rpmlint(command) else: log.warn('No binary rpm files found in: %s', workdir) - rpm_result = Result('PASSED', [], None, None) + rpm_result = Result('PASSED', [], 0, 0) # compute overall results detail = check.CheckDetail(koji_build, check.ReportType.KOJI_BUILD, srpm_result.outcome)