[pygobject2] fix warnings on startup (patch 1; rhbz#790053)
dmalcolm
dmalcolm at fedoraproject.org
Fri Jun 15 18:25:01 UTC 2012
commit 3b049fd2879dee1c23bccc259128b8f234161ec3
Author: David Malcolm <dmalcolm at redhat.com>
Date: Fri Jun 15 14:23:59 2012 -0400
fix warnings on startup (patch 1; rhbz#790053)
* Fri Jun 15 2012 David Malcolm <dmalcolm at redhat.com> - 2.28.6-5
- fix warnings on startup (patch 1; rhbz#790053)
fix-gio-flags.patch | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
pygobject2.spec | 11 ++++++++++-
2 files changed, 59 insertions(+), 1 deletions(-)
---
diff --git a/fix-gio-flags.patch b/fix-gio-flags.patch
new file mode 100644
index 0000000..95b9114
--- /dev/null
+++ b/fix-gio-flags.patch
@@ -0,0 +1,49 @@
+From 42d01f060c5d764baa881d13c103d68897163a49 Mon Sep 17 00:00:00 2001
+From: Ryan Lortie <desrt at desrt.ca>
+Date: Mon, 12 Mar 2012 16:44:14 -0400
+Subject: [PATCH] gio-types.defs: change some enums to flags
+
+These flags types were originally incorrectly handled in glib as being
+enums. That bug was fixed, but they're still enums here, leading to
+warnings about the mismatch.
+
+Change them to flags.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=668522
+---
+ gio/gio-types.defs | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/gio/gio-types.defs b/gio/gio-types.defs
+index 331e0bc..7eee5c8 100644
+--- a/gio/gio-types.defs
++++ b/gio/gio-types.defs
+@@ -526,7 +526,7 @@
+ )
+ )
+
+-(define-enum MountMountFlags
++(define-flags MountMountFlags
+ (in-module "gio")
+ (c-name "GMountMountFlags")
+ (gtype-id "G_TYPE_MOUNT_MOUNT_FLAGS")
+@@ -545,7 +545,7 @@
+ )
+ )
+
+-(define-enum DriveStartFlags
++(define-flags DriveStartFlags
+ (in-module "gio")
+ (c-name "GDriveStartFlags")
+ (gtype-id "G_TYPE_DRIVE_START_FLAGS")
+@@ -770,7 +770,7 @@
+ )
+ )
+
+-(define-enum SocketMsgFlags
++(define-flags SocketMsgFlags
+ (in-module "gio")
+ (c-name "GSocketMsgFlags")
+ (gtype-id "G_TYPE_SOCKET_MSG_FLAGS")
+--
+1.7.9.1
\ No newline at end of file
diff --git a/pygobject2.spec b/pygobject2.spec
index 2871fd6..91d278e 100644
--- a/pygobject2.spec
+++ b/pygobject2.spec
@@ -6,7 +6,7 @@
Name: pygobject2
Version: 2.28.6
-Release: 4%{?dist}
+Release: 5%{?dist}
License: LGPLv2+
Group: Development/Languages
Summary: Python 2 bindings for GObject
@@ -16,6 +16,11 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-root
Source: http://ftp.gnome.org/pub/GNOME/sources/pygobject/2.28/pygobject-%{version}.tar.bz2
### Patches ###
+# Fix this warning on startup:
+# ** WARNING **: Trying to register gtype 'GMountMountFlags' as enum when
+# in fact it is of type 'GFlags'
+# using upstream patch (rhbz#790053)
+Patch1: fix-gio-flags.patch
### Build Dependencies ###
@@ -59,6 +64,7 @@ This package contains documentation files for %{name}.
%prep
%setup -q -n pygobject-%{version}
+%patch1 -p1
find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python}|'
@@ -114,6 +120,9 @@ rm examples/Makefile*
%{_datadir}/pygobject/xsl
%changelog
+* Fri Jun 15 2012 David Malcolm <dmalcolm at redhat.com> - 2.28.6-5
+- fix warnings on startup (patch 1; rhbz#790053)
+
* Mon Feb 13 2012 Matthias Clasen <mclasen at redhat.com> - 2.28.6-4
- Require python2-devel in -devel
More information about the scm-commits
mailing list