fix required version

This commit is contained in:
Tomas Kopecek 2020-06-30 13:12:58 +02:00 committed by Mike McLean
parent 393bc1d9e1
commit 3a6bfec59e
2 changed files with 5 additions and 5 deletions

View file

@ -1,4 +1,4 @@
PYVER := $(shell $(PYTHON) -c 'import sys; print("%.3s" %(sys.version))')
PYVER := $(shell $(PYTHON) -c 'import sys; print("%.1s" %(sys.version))')
BINFILES = kojid
LIBEXECFILES = mergerepos
@ -23,7 +23,7 @@ _install:
mkdir -p $(DESTDIR)/usr/sbin
install -p -m 755 $(BINFILES) $(DESTDIR)/usr/sbin
@if [ "$(PYVER)" -gt 2 ] ; then \
@if [ "$(PYVER)" -lt 3 ] ; then \
mkdir -p $(DESTDIR)/usr/libexec/kojid; \
install -p -m 755 $(LIBEXECFILES) $(DESTDIR)/usr/libexec/kojid; \
fi

View file

@ -5558,9 +5558,9 @@ class CreaterepoTask(BaseTaskHandler):
if merge_mode == 'simple':
if self.options.use_createrepo_c or six.PY3:
version = self._get_mergerepo_c_version()
if version < (0, 15, 1):
raise koji.GenericError("mergerepo_c is not installed or has low "
"version: %s (0.15.1 - required)" % version)
if version < (0, 13, 0):
raise koji.GenericError("mergerepo_c is not installed or has low version: "
"%s (0.13.0 - required for --simple)" % version)
cmd = ['/usr/bin/mergerepo_c', '--koji', '--simple']
else:
cmd = ['/usr/libexec/kojid/mergerepos',