This commit is contained in:
Tomas Kopecek 2018-10-04 12:23:47 +02:00 committed by Mike McLean
parent 009081c0fc
commit ccf1c41274
2 changed files with 3 additions and 3 deletions

View file

@ -1279,7 +1279,7 @@ class BuildArchTask(BaseBuildTask):
# peel E:N-V-R from package
h = koji.get_rpm_header(fn)
name = koji.get_header_field(h, 'name')
if koji.get_header_field('sourcepackage'):
if not koji.get_header_field(h, 'sourcepackage'):
raise koji.BuildError("not a source package")
# Disable checking for distribution in the initial SRPM because it
# might have been built outside of the build system

View file

@ -802,14 +802,14 @@ class TaskManager(object):
#about). This will happen after a daemon restart, for example.
self.logger.info("freeing stale tasks: %r" % stale)
self.session.host.freeTasks(stale)
for id, pid in self.pids.items():
for id, pid in list(self.pids.items()):
if self._waitTask(id, pid):
# the subprocess handles most everything, we just need to clear things out
if self.cleanupTask(id, wait=False):
del self.pids[id]
if id in self.tasks:
del self.tasks[id]
for id, pid in self.pids.items():
for id, pid in list(self.pids.items()):
if id not in tasks:
# expected to happen when:
# - we are in the narrow gap between the time the task