[plague] Let server not crash in prep stage with RpmUtilsError exception.
Michael Schwendt
mschwendt at fedoraproject.org
Sat Mar 16 12:37:34 UTC 2013
commit 929584e09b9a38adac4367f5bd92f8749df3b4c1
Author: Michael Schwendt <mschwendt at fedoraproject.org>
Date: Sat Mar 16 13:37:29 2013 +0100
Let server not crash in prep stage with RpmUtilsError exception.
plague-0.4.5.8-prep-srpm-error.patch | 18 ++++++++++++++++++
plague.spec | 9 ++++++++-
2 files changed, 26 insertions(+), 1 deletions(-)
---
diff --git a/plague-0.4.5.8-prep-srpm-error.patch b/plague-0.4.5.8-prep-srpm-error.patch
new file mode 100644
index 0000000..07ae4f3
--- /dev/null
+++ b/plague-0.4.5.8-prep-srpm-error.patch
@@ -0,0 +1,18 @@
+diff -Nur plague-0.4.5.8-orig/server/PackageJob.py plague-0.4.5.8/server/PackageJob.py
+--- plague-0.4.5.8-orig/server/PackageJob.py 2008-09-21 15:38:41.000000000 +0200
++++ plague-0.4.5.8/server/PackageJob.py 2013-03-16 13:33:50.920680600 +0100
+@@ -394,7 +394,13 @@
+ raise PrepError(msg)
+
+ ts = rpmUtils.transaction.initReadOnlyTransaction()
+- hdr = rpmUtils.miscutils.hdrFromPackage(ts, self.srpm_path)
++ try:
++ hdr = rpmUtils.miscutils.hdrFromPackage(ts, self.srpm_path)
++ except rpmUtils.RpmUtilsError, e:
++ msg = """RpmUtilsError: %s
++ Package: %s
++""" % (e, self.srpm_path)
++ raise PrepError(msg)
+ self.name = hdr['name']
+ self.epoch = hdr['epoch']
+ if not self.epoch:
diff --git a/plague.spec b/plague.spec
index 141dde8..327911d 100644
--- a/plague.spec
+++ b/plague.spec
@@ -5,7 +5,7 @@ BuildArch: noarch
Summary: Distributed build system for RPMs
Name: plague
Version: 0.4.5.8
-Release: 12%{?dist}
+Release: 13%{?dist}
License: GPLv2+
Group: Development/Tools
#Source: http://fedoraproject.org/projects/plague/releases/%{name}-%{version}.tar.bz2
@@ -21,6 +21,8 @@ Patch0: plague-0.4.5.8-systemd-compat.patch
Patch1: plague-python25-sqlite.patch
# Let builder return only .rpm/.log files
Patch2: plague-0.4.5.8-filter-results.patch
+# Let server not crash in prep stage with RpmUtilsError exception.
+Patch3: plague-0.4.5.8-prep-srpm-error.patch
BuildRequires: python
BuildRequires: systemd-units
@@ -92,6 +94,8 @@ the interface to the build server.
%patch0 -p1 -b .systemd-compat
%patch1 -p1 -b .sqlite3
%patch2 -p1 -b .filter-results
+%patch3 -p1 -b .prep-srpm-exception
+
%build
make
@@ -177,6 +181,9 @@ mkdir -p $RPM_BUILD_ROOT/var/lib/plague/builder
%changelog
+* Sat Mar 16 2013 Michael Schwendt <mschwendt at fedoraproject.org> - 0.4.5.8-13
+- Let server not crash in prep stage with RpmUtilsError exception.
+
* Thu Mar 7 2013 Michael Schwendt <mschwendt at fedoraproject.org> - 0.4.5.8-12
- Fix the patch in -11.
More information about the scm-commits
mailing list