From e23f2bd0990451955679f7990c0929e08771d4c4 Mon Sep 17 00:00:00 2001 From: Randy Barlow Date: Sep 23 2016 14:38:16 +0000 Subject: Add a patch to skip waiting on a non-existing mash. --- diff --git a/0002-Sometimes-we-have-no-mash-so-dont-wait-for-mash_thre.patch b/0002-Sometimes-we-have-no-mash-so-dont-wait-for-mash_thre.patch new file mode 100644 index 0000000..ca4f672 --- /dev/null +++ b/0002-Sometimes-we-have-no-mash-so-dont-wait-for-mash_thre.patch @@ -0,0 +1,31 @@ +From b90bee3df0ff8db4456e058c5536ebad66bfeb3f Mon Sep 17 00:00:00 2001 +From: Patrick Uiterwijk +Date: Fri, 23 Sep 2016 10:33:10 +0000 +Subject: [PATCH] Sometimes we have no mash, so dont wait for mash_thread if we + dont + +If self.state['completed_repos'] is True, we don't kick off a mash thread, and +def mash() returns nothing (None). + +Signed-off-by: Patrick Uiterwijk +--- + bodhi/server/consumers/masher.py | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/bodhi/server/consumers/masher.py b/bodhi/server/consumers/masher.py +index 4e450ab..a99bc48 100644 +--- a/bodhi/server/consumers/masher.py ++++ b/bodhi/server/consumers/masher.py +@@ -663,6 +663,9 @@ class MasherThread(threading.Thread): + return mash_thread + + def wait_for_mash(self, mash_thread): ++ if mash_thread is None: ++ self.log.info('Not waiting for mash thread, as there was no mash') ++ return + self.log.debug('Waiting for mash thread to finish') + mash_thread.join() + if mash_thread.success: +-- +2.10.0 + diff --git a/bodhi.spec b/bodhi.spec index d1dea81..0a52715 100644 --- a/bodhi.spec +++ b/bodhi.spec @@ -3,7 +3,7 @@ Name: bodhi Version: 2.2.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A modular framework that facilitates publishing software updates Group: Applications/Internet License: GPLv2+ @@ -13,6 +13,9 @@ Source0: https://github.com/fedora-infra/bodhi/archive/%{version}.tar.gz # fix that problem, but it does fix template rendering on updates that have such comments. # See https://github.com/fedora-infra/bodhi/issues/949 Patch0: 0001-Only-put-the-comment-through-markdown-if-there-is-a-.patch +# This patch is already merged upstream in the 2.2 and develop branches, but is not part of an +# upstream release yet. +Patch1: 0002-Sometimes-we-have-no-mash-so-dont-wait-for-mash_thre.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch ExcludeArch: ppc64 ppc @@ -204,6 +207,7 @@ updates for a software distribution. %setup -q %patch0 -p1 +%patch1 -p1 # Kill some dev deps sed -i '/pyramid_debugtoolbar/d' setup.py @@ -318,6 +322,9 @@ PYTHONPATH=. %{__python} setup.py test %changelog +* Fri Sep 23 2016 Randy Barlow - 2.2.1-2 +- Add a patch to skip waiting on a mash thread if there isn't one. + * Thu Sep 22 2016 Randy Barlow - 2.2.1-1 - Update to 2.2.1. - Drop two patches, as they are included in 2.2.1 upstream.