PR#3225: createrepo_c should fail on all errors

Merges #3225
https://pagure.io/koji/pull-request/3225

Fixes: #3190
https://pagure.io/koji/issue/3190
createrepo doesn't return error code when some files don't exist
This commit is contained in:
Tomas Kopecek 2022-02-07 09:34:39 +01:00
commit 987946478e
2 changed files with 3 additions and 3 deletions

View file

@ -5593,7 +5593,7 @@ class CreaterepoTask(BaseTaskHandler):
def create_local_repo(self, rinfo, arch, pkglist, groupdata, oldrepo):
koji.ensuredir(self.outdir)
if self.options.use_createrepo_c:
cmd = ['/usr/bin/createrepo_c']
cmd = ['/usr/bin/createrepo_c', '--error-exit-val']
else:
cmd = ['/usr/bin/createrepo']
cmd.extend(['-vd', '-o', self.outdir])
@ -5936,7 +5936,7 @@ class createDistRepoTask(BaseTaskHandler):
"""
koji.ensuredir(repodir)
if self.options.use_createrepo_c:
cmd = ['/usr/bin/createrepo_c']
cmd = ['/usr/bin/createrepo_c', '--error-exit-val']
else:
cmd = ['/usr/bin/createrepo']
if zck:

View file

@ -277,7 +277,7 @@ Requires(postun): systemd
Requires: /usr/bin/cvs
Requires: /usr/bin/svn
Requires: /usr/bin/git
Requires: createrepo >= 0.9.2
Requires: createrepo_c >= 0.11.0
%if 0%{py3_support} > 1
Requires: python%{python3_pkgversion}-%{name} = %{version}-%{release}
Requires: python%{python3_pkgversion}-librepo