rpms/pygobject2/devel Clear-error-if-we-failed-import.patch, NONE, 1.1 pygobject2.spec, 1.64, 1.65

Colin Walters walters at fedoraproject.org
Thu May 27 14:36:37 UTC 2010


Author: walters

Update of /cvs/pkgs/rpms/pygobject2/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv8852

Modified Files:
	pygobject2.spec 
Added Files:
	Clear-error-if-we-failed-import.patch 
Log Message:
* Thu May 27 2010 Colin Walters <walters at verbum.org> - 2.21.1-9
- Readd my patch to not blow up mysteriously
  Resolves: #596392


Clear-error-if-we-failed-import.patch:
 pygi-external.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- NEW FILE Clear-error-if-we-failed-import.patch ---
>From 8a577bcbbeca38f94363e8313410b8a5499de975 Mon Sep 17 00:00:00 2001
From: Colin Walters <walters at verbum.org>
Date: Wed, 5 May 2010 13:54:27 -0400
Subject: [PATCH] [pygi] Clear error if we failed the import

Otherwise we leave the exception set which causes bizarre problems
later in unrelated code.

https://bugzilla.redhat.com/show_bug.cgi?id=569885

https://bugzilla.gnome.org/show_bug.cgi?id=617796
---
 gobject/pygi-external.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/gobject/pygi-external.h b/gobject/pygi-external.h
index aec2f25..b369dca 100644
--- a/gobject/pygi-external.h
+++ b/gobject/pygi-external.h
@@ -27,11 +27,13 @@ _pygi_import (void)
 
     module = PyImport_ImportModule("gi");
     if (module == NULL) {
+        PyErr_Clear();
         return -1;
     }
 
     api = PyObject_GetAttrString(module, "_API");
     if (api == NULL) {
+        PyErr_Clear();
         Py_DECREF(module);
         return -1;
     }
-- 
1.7.0.1

Index: pygobject2.spec
===================================================================
RCS file: /cvs/pkgs/rpms/pygobject2/devel/pygobject2.spec,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -p -r1.64 -r1.65
--- pygobject2.spec	24 May 2010 14:38:20 -0000	1.64
+++ pygobject2.spec	27 May 2010 14:36:37 -0000	1.65
@@ -15,7 +15,7 @@
 
 Name: pygobject2
 Version: 2.21.1
-Release: 8%{?dist}
+Release: 9%{?dist}
 License: LGPLv2+
 Group: Development/Languages
 Summary: Python bindings for GObject
@@ -23,6 +23,8 @@ URL: http://www.pygtk.org/
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
 #VCS: git:git://git.gnome.org/pygobject
 Patch1: Don-t-raise-an-error-in-_pygi_import-if-pygi-support-is-disabled.patch
+# https://bugzilla.gnome.org/show_bug.cgi?id=617796
+Patch2: Clear-error-if-we-failed-import.patch
 Source: http://ftp.gnome.org/pub/GNOME/sources/pygobject/2.21/pygobject-%{version}.tar.bz2
 
 ### Build Dependencies ###
@@ -71,6 +73,7 @@ This package contains documentation file
 %prep
 %setup -q -n pygobject-%{version}
 %patch1 -p1
+%patch2 -p1
 
 %build
 %configure --enable-thread --enable-pygi
@@ -125,6 +128,10 @@ rm -fr $RPM_BUILD_ROOT
 %{_datadir}/pygobject/xsl
 
 %changelog
+* Thu May 27 2010 Colin Walters <walters at verbum.org> - 2.21.1-9
+- Readd my patch to not blow up mysteriously
+  Resolves: #596392
+
 * Mon May 24 2010 Colin Walters <walters at verbum.org> - 2.21.1-7
 - Reenable pygi in preparation for getting it packaged
 



More information about the scm-commits mailing list