GNOME Bugzilla – Bug 782887
Cannot run meld installed in a jhbuild prefix
Last modified: 2017-05-26 23:16:16 UTC
meld is available in gnome-world moduleset shipped with jhbuild and can be installed without error using jhbuild. $ jhbuild buildone meld *** Building meld *** [1/1] python3 setup.py build --build-base /home/lantw44/gnome/build/meld ... *** Installing meld *** [1/1] python3 setup.py build --build-base /home/lantw44/gnome/build/meld install --prefix /home/lantw44/gnome/devinstall --root /home/lantw44/gnome/devinstall/_jhbuild/root-meld ... I: Moving temporary DESTDIR u'/home/lantw44/gnome/devinstall/_jhbuild/root-meld' into build prefix I: Install complete: 312 files copied ... However, meld/build_helpers.py isn't able to pick the value passed by --prefix during installation. It fallbacks to the default value /usr/local and causes meld to crash. $ jhbuild run meld Couldn't load Meld-specific CSS (/usr/local/share/meld/meld.css) gtk-css-provider-error-quark: <broken file>:1:0Failed to import: Error opening file /usr/local/share/meld/meld.css: No such file or directory (2) ... Traceback (most recent call last):
+ Trace 237499
builder = meld.ui.util.get_builder("application.ui")
builder.add_from_file(ui_file(filename))
Traceback (most recent call last): File "/home/lantw44/gnome/devinstall/lib/python3.5/site-packages/meld/meldapp.py", line 76, in do_command_line tab = self.parse_args(command_line) File "/home/lantw44/gnome/devinstall/lib/python3.5/site-packages/meld/meldapp.py", line 334, in parse_args focus=i == 0) File "/home/lantw44/gnome/devinstall/lib/python3.5/site-packages/meld/meldapp.py", line 147, in open_files window = self.get_meld_window() File "/home/lantw44/gnome/devinstall/lib/python3.5/site-packages/meld/meldapp.py", line 142, in get_meld_window return self.get_active_window().meldwindow AttributeError: 'NoneType' object has no attribute 'meldwindow'
Created attachment 352245 [details] [review] build_helpers: Use get_option_dict to get prefix value The build_py class was added to support installing meld into an alternative prefix, which is required in a jhbuild environment. However, command_obj doesn't seem to work with current python3 version, Replacing it with get_option_dict fixes the problem.
Looks good to me. I've just pushed your patch to master. Thanks!