Opened 8 years ago
Closed 7 years ago
#4900 closed defect (fixed)
Sugar can accidentally import WebKit1.0 (GTK2)
Reported by: | SAMdroid | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | Unspecified |
Component: | Sugar | Version: | Unspecified |
Severity: | Blocker | Keywords: | patch |
Cc: | ignacio | Distribution/OS: | Fedora |
Bug Status: | Unconfirmed |
Description
On Fedora 23 Beta 1 XFCE and sugar build MODE_NONE:
Sugar fails to start because it imports WebKit, which in turn imports Gtk2. This is because it importing WebKit1.0, not WebKit3.0.
gi warns us that we need to specify which version we want, so we need to add the following before the first import:
gi.require_version('WebKit', '3.0')
Irc log:
16:08 <ignacio> gi.RepositoryError: Requiring namespace 'Gtk' version '2.0', but '3.0' is already loaded 16:08 <ignacio> wuut 16:08 <samdroid> shell.log? 16:08 <samdroid> what that an error? 16:08 <ignacio> samdroid, 16:08 <ignacio> http://paste.fedoraproject.org/277418/45371414 16:09 <samdroid> WTF WHY DOES THE SHELL IMPORT GTK2 16:09 <samdroid> oh webkit 16:09 <samdroid> so we need to move to webkit2? 16:10 <ignacio> maybe? 16:10 <samdroid> ignacio: do the errors go away if you sed -i 's/WebKit/WebKit2' -r src 16:10 <samdroid> or something like that? 16:10 <ignacio> lemme check 16:11 <samdroid> and wtf why does this happen on fc23 and not on rawhide 16:11 <ignacio> maybe this is important: I'm not using Gnome 16:11 <ignacio> XFCE Spin 16:11 <samdroid> ah 16:11 <ignacio> the command doesnt work 16:12 <samdroid> try 16:12 <samdroid> find sugar/src -type f | xargs sed -i 's/WebKit/WebKit2/' 16:14 <ignacio> samdroid, works 16:15 <ignacio> Browse activity doesnt start 16:15 <samdroid> so webkit1 included with the XFCE spin is GTK2 16:15 <samdroid> wait, maybe we should use the gi version thing 16:15 <samdroid> brb 16:16 <ignacio> reproduced your toolbar bug btw 16:16 <samdroid> :) 16:17 <samdroid> just wondering, what is the WARNING output of running the following python statement on your machine? 16:17 <samdroid> from gi.repository import WebKit 16:17 <ignacio> >>> from gi.repository import WebKit 16:17 <ignacio> __main__:1: PyGIWarning: WebKit was imported without specifying a version first. Use gi.require_version('WebKit', '1.0') before import to ensure that the right version gets loaded. 16:17 <ignacio> >>> 16:18 <ignacio> the background of journal is grey 16:18 <ignacio> same with listview :P 16:20 <samdroid> ignacio: that would be the webkit bug 16:20 <samdroid> WebKit1,Gtk2=1.0 WebKit1,Gtk3=3.0 16:20 <samdroid> I'll log a ticket
Traceback:
Traceback (most recent call last): File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/home/ignacio/Escritorio/sugar-build/build/out/install/lib/python2.7/site-packages/jarabe/main.py", line 66, in <module> from jarabe.view import keyhandler File "/home/ignacio/Escritorio/sugar-build/build/out/install/lib/python2.7/site-packages/jarabe/view/keyhandler.py", line 32, in <module> from jarabe.journal import journalactivity File "/home/ignacio/Escritorio/sugar-build/build/out/install/lib/python2.7/site-packages/jarabe/journal/journalactivity.py", line 41, in <module> from jarabe.journal.volumestoolbar import VolumesToolbar File "/home/ignacio/Escritorio/sugar-build/build/out/install/lib/python2.7/site-packages/jarabe/journal/volumestoolbar.py", line 43, in <module> from jarabe.view.palettes import VolumePalette File "/home/ignacio/Escritorio/sugar-build/build/out/install/lib/python2.7/site-packages/jarabe/view/palettes.py", line 39, in <module> from jarabe.view.viewhelp import setup_view_help File "/home/ignacio/Escritorio/sugar-build/build/out/install/lib/python2.7/site-packages/jarabe/view/viewhelp.py", line 26, in <module> from gi.repository import WebKit File "/usr/lib/python2.7/site-packages/gi/importer.py", line 159, in load_module introspection_module = get_introspection_module(namespace) File "/usr/lib/python2.7/site-packages/gi/module.py", line 271, in get_introspection_module module = IntrospectionModule(namespace, version) File "/usr/lib/python2.7/site-packages/gi/module.py", line 120, in __init__ repository.require(namespace, version) gi.RepositoryError: Requiring namespace 'Gtk' version '2.0', but '3.0' is already loaded
Change History (2)
comment:1 Changed 8 years ago by SAMdroid
- Keywords patch added
comment:2 Changed 7 years ago by sam
- Resolution set to fixed
- Status changed from new to closed
Merged for 0.190.0.3
Note: See
TracTickets for help on using
tickets.
Patch: https://github.com/sugarlabs/sugar/pull/600