Bug 11546

Summary: python-gi breaks system-config-printer when run in mcc
Product: Mageia Reporter: Thierry Vignaud <thierry.vignaud>
Component: RPM PackagesAssignee: Mageia Bug Squad <bugsquad>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: fundawang, makowski.mageia, olav
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: python-gobject3 CVE:
Status comment:
Attachments: python-gi regression reproducer

Description Thierry Vignaud 2013-10-27 14:56:54 CET
python-gi breaks system-config-printer when run in mcc.

Since system-config-printer was ported from gtk2 to gtk3, it uses python-gi instead of pygtk.

But creating a Gtk.Plug no longer works:

/usr/lib64/python2.7/site-packages/gi/overrides/Gtk.py:445: Warning: value "((GtkWindowType) 56640845)" of type 'GtkWindowType' is invalid or out of range for property 'type' of type 'GtkWindowType'
  Gtk.Window.__init__(self, type=type, **kwds)


This happens on the following line:
     PlugWindow = Gtk.Plug(PlugWindowId)

See attached reproducer

Reproducible: 

Steps to Reproduce:
Thierry Vignaud 2013-10-27 14:57:47 CET

CC: (none) => fundawang, olav

Comment 1 Thierry Vignaud 2013-10-27 14:59:49 CET
Created attachment 4463 [details]
python-gi regression reproducer

Of course the socket ID is a random value but that's for showing the issue with system-config-printer in MCC:

$ python /tmp/reproducer.py 
  File "/tmp/reproducer.py", line 2, in <module>
    p = Gtk.Plug(123)
  File "/usr/lib64/python2.7/site-packages/gi/overrides/Gtk.py", line 442, in __init__
    traceback.print_stack()
/usr/lib64/python2.7/site-packages/gi/overrides/Gtk.py:447: Warning: value "((GtkWindowType) 123)" of type 'GtkWindowType' is invalid or out of range for property 'type' of type 'GtkWindowType'
  Gtk.Window.__init__(self, type=type, **kwds)
Comment 2 Thierry Vignaud 2013-10-27 15:00:07 CET
We might just miss an override for Gtk.Plug
Comment 3 Thierry Vignaud 2013-10-27 16:15:13 CET
Workarounded by using Gtk.Plug.new() instead of Gtk.Plug() for now

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 4 Philippe Makowski 2013-10-27 22:20:15 CET
are you sure you are using python-gobject3 ?
system-config-printer have Requires: python-gobject which is 2.28.6
and not Requires: python-gobject3
and python-gi have Conflicts: python-gobject < 2.28.6-4

CC: (none) => makowski.mageia

Comment 5 Thierry Vignaud 2013-10-28 09:34:58 CET
Those manual requires are outdated & obsoletes.
The runtime error came from python-gi which is generated by python-gobject3
The right ones are the autogenerated typelib(*)