Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 279832

Summary: dev-python/libwnck-python-2.30.2 will not run correctly with x11-libs/libwnck-2.30.2
Product: Gentoo Linux Reporter: Jim Ramsay (lack) (RETIRED) <lack>
Component: [OLD] GNOMEAssignee: Gentoo Linux Gnome Desktop Team <gnome>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://bugzilla.gnome.org/show_bug.cgi?id=616306
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 313037    

Description Jim Ramsay (lack) (RETIRED) gentoo-dev 2009-07-31 22:53:58 UTC
$ python -c "import wnck"

** (-c:15390): WARNING **: Trying to register gtype 'WnckWindowState' as flags when in fact it is of type 'GEnum'

** (-c:15390): WARNING **: Trying to register gtype 'WnckWindowActions' as flags when in fact it is of type 'GEnum'

** (-c:15390): WARNING **: Trying to register gtype 'WnckWindowMoveResizeMask' as flags when in fact it is of type 'GEnum'

The end result is that the various constants defined in these 3 enumerations are no longer available via that module, so any program (Such as rox-base/tasktray which uses them) will fail.

If I downrev to x11-libs/libwnck-2.26.1 everything works just fine.

I suggest adjusting the libwnck-python ebuild to depend on "<=x11-libs/libwnck-2.26.1"

I'll also try reporting this upstream, if I can figure out where/how.
Comment 1 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-08-02 10:23:26 UTC
Afaics, it is just a warning. Could you report this at http://bugzilla.gnome.org and paste the URL here ?
Comment 2 Jim Ramsay (lack) (RETIRED) gentoo-dev 2009-08-02 16:30:31 UTC
(In reply to comment #1)
> Afaics, it is just a warning.

No, unfortunately it's a warning that also means "We did not register those values, so you can't use them in a program", so any python app that tries to use, say, wnck.WINDOW_STATE_URGENT will suddenly get an AttributeError!

Try this:
  python -c "import wnck; print wnck.WINDOW_STATE_URGENT"

With libwnck-2.26.1 I get:

<flags WNCK_WINDOW_STATE_URGENT of type WnckWindowState>

With libwnck-2.66.2 I get:

** (-c:20623): WARNING **: Trying to register gtype 'WnckWindowState' as flags when in fact it is of type 'GEnum'

** (-c:20623): WARNING **: Trying to register gtype 'WnckWindowActions' as flags when in fact it is of type 'GEnum'

** (-c:20623): WARNING **: Trying to register gtype 'WnckWindowMoveResizeMask' as flags when in fact it is of type 'GEnum'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: 'module' object has no attribute 'WINDOW_STATE_URGENT'
Comment 3 Jim Ramsay (lack) (RETIRED) gentoo-dev 2009-08-02 16:38:08 UTC
(In reply to comment #1)
> Could you report this at http://bugzilla.gnome.org and paste the URL here ? 

http://bugzilla.gnome.org/show_bug.cgi?id=590534
Comment 4 Arun Raghavan (RETIRED) gentoo-dev 2009-08-09 18:49:26 UTC
Fixed in libwnck-2.6.2-r2 and submitted a patch upstream.
Comment 5 Jim Ramsay (lack) (RETIRED) gentoo-dev 2010-07-21 04:52:04 UTC
Oh no, it's back.  After upgrading to 2.30.2:

$ python -c "import wnck"

** (-c:21056): WARNING **: Trying to register gtype 'WnckWindowState' as enum when in fact it is of type 'GFlags'

** (-c:21056): WARNING **: Trying to register gtype 'WnckWindowActions' as enum when in fact it is of type 'GFlags'

** (-c:21056): WARNING **: Trying to register gtype 'WnckWindowMoveResizeMask' as enum when in fact it is of type 'GFlags'

I'll see if I can find some time to look into the root cause, but the patch submitted to upstream last time this happened looks like it's still there.  Something else must be going wrong.
Comment 6 Pacho Ramos gentoo-dev 2010-07-21 15:43:31 UTC
That looks:
https://bugzilla.gnome.org/show_bug.cgi?id=616306
Comment 7 Pacho Ramos gentoo-dev 2010-07-21 15:54:56 UTC
+*libwnck-python-2.30.2-r1 (21 Jul 2010)
+
+  21 Jul 2010; Pacho Ramos <pacho@gentoo.org>
+  +libwnck-python-2.30.2-r1.ebuild,
+  +files/libwnck-python-2.30.2-flagsfix.patch:
+  Fix again three enum items that should be flags (bug #279832, by Jim
+  Ramsay) applying fedora patch provided in upstream bug #616306.