From dfcac3fe9c0c78053beb3aad2e4ff8db8f4c961a Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Tue, 17 May 2016 17:07:48 -0400 Subject: [PATCH] Bump gtk and pygobject deps to 3.14 We need to bump the gtk dep to at least 3.10 for GtkRevealer usage, and I want to bump the pygobject higher to drop some bug workarounds. But since the oldest thing I have that meets those requirements is RHEL/Centos 7.3 which is at 3.14 for both, set those as the minimum versions since that's what I'll be testing against. They are still 1.5 years old and only a bit over a year newer than the previous versions, so it's not a huge change. --- INSTALL | 13 +++++-------- tests/misc.py | 6 +++--- ui/about.ui | 2 +- ui/addhardware.ui | 2 +- ui/addstorage.ui | 2 +- ui/asyncjob.ui | 2 +- ui/choosecd.ui | 2 +- ui/clone.ui | 2 +- ui/connect.ui | 2 +- ui/create.ui | 2 +- ui/createinterface.ui | 2 +- ui/createnet.ui | 2 +- ui/createpool.ui | 2 +- ui/createvol.ui | 2 +- ui/delete.ui | 2 +- ui/details.ui | 2 +- ui/fsdetails.ui | 2 +- ui/gfxdetails.ui | 2 +- ui/host.ui | 2 +- ui/manager.ui | 2 +- ui/migrate.ui | 2 +- ui/netlist.ui | 2 +- ui/preferences.ui | 2 +- ui/snapshots.ui | 2 +- ui/storagebrowse.ui | 2 +- ui/storagelist.ui | 2 +- virt-manager | 17 ++++++++++++----- 27 files changed, 44 insertions(+), 40 deletions(-) diff --git a/INSTALL b/INSTALL index 3a0eb2c3e..8c4845b46 100644 --- a/INSTALL +++ b/INSTALL @@ -24,19 +24,16 @@ setup.py generally has all the build and install commands, for more info see: Pre-requisite software ====================== -virt-manager was ported to GTK3 at the beginning of 2013. Older GTK3 -or pygobject3 versions likely will not work for running virt-manager. +A detailed dependency list can be found in virt-manager.spec.in -Earliest tested versions of major components: +Minimum version requirements of major components: python >= 2.7 - gtk3 >= 3.6 - libvirt-python >= 0.4.0 - pygobject3 >= 3.4 + gtk3 >= 3.14 + libvirt-python >= 0.6.0 + pygobject3 >= 3.14 libosinfo >= 0.2.10 -A more detailed dependency list can be found in virt-manager.spec.in. - On Debian or Ubuntu based distributions, you need to install the gobject-introspection bindings for some depedencies like libvirt-glib and libosinfo. Look for package names that start with 'gir', for example diff --git a/tests/misc.py b/tests/misc.py index 51628f4f6..b96492a31 100644 --- a/tests/misc.py +++ b/tests/misc.py @@ -110,13 +110,13 @@ class TestMisc(unittest.TestCase): if required_version is None: raise AssertionError("ui file=%s doesn't have a " - "tag for gtk+, it should say 3.8") + "tag for gtk+, it should say 3.10") if (int(required_version.split(".")[0]) != 3 or - int(required_version.split(".")[1]) != 8): + int(required_version.split(".")[1]) != 14): failures.append((filename, required_version)) if failures: raise AssertionError("The following files should require gtk " - "version of gtk-3.8, which is what we target:\n" + + "version of gtk-3.10, which is what we target:\n" + "\n".join([("%s version=%s" % tup) for tup in failures])) diff --git a/ui/about.ui b/ui/about.ui index d665b9975..fc90590ac 100644 --- a/ui/about.ui +++ b/ui/about.ui @@ -1,7 +1,7 @@ - + False True diff --git a/ui/addhardware.ui b/ui/addhardware.ui index 39fb2adf7..92e72c7ed 100644 --- a/ui/addhardware.ui +++ b/ui/addhardware.ui @@ -1,7 +1,7 @@ - + 67000 1 diff --git a/ui/addstorage.ui b/ui/addstorage.ui index 5e0c74c5d..eec2366a3 100644 --- a/ui/addstorage.ui +++ b/ui/addstorage.ui @@ -1,7 +1,7 @@ - + 1000000 0.10000000000000001 diff --git a/ui/asyncjob.ui b/ui/asyncjob.ui index 04141ff0b..f9342487e 100644 --- a/ui/asyncjob.ui +++ b/ui/asyncjob.ui @@ -1,7 +1,7 @@ - + False 12 diff --git a/ui/choosecd.ui b/ui/choosecd.ui index 88066387c..5c31dc156 100644 --- a/ui/choosecd.ui +++ b/ui/choosecd.ui @@ -1,7 +1,7 @@ - + True True diff --git a/ui/clone.ui b/ui/clone.ui index 2168d76bf..70249d892 100644 --- a/ui/clone.ui +++ b/ui/clone.ui @@ -1,7 +1,7 @@ - + True False diff --git a/ui/connect.ui b/ui/connect.ui index 54f6251a1..685ad52c5 100644 --- a/ui/connect.ui +++ b/ui/connect.ui @@ -1,7 +1,7 @@ - + True False diff --git a/ui/create.ui b/ui/create.ui index 4185cd103..d271e0d92 100644 --- a/ui/create.ui +++ b/ui/create.ui @@ -1,7 +1,7 @@ - + 128 1 diff --git a/ui/createinterface.ui b/ui/createinterface.ui index f249b6d47..d7ba2cb54 100644 --- a/ui/createinterface.ui +++ b/ui/createinterface.ui @@ -1,7 +1,7 @@ - + 4095 1 diff --git a/ui/createnet.ui b/ui/createnet.ui index 60ba6a687..2945922e4 100644 --- a/ui/createnet.ui +++ b/ui/createnet.ui @@ -1,7 +1,7 @@ - + True False diff --git a/ui/createpool.ui b/ui/createpool.ui index 57d11fda2..d6c0d79b0 100644 --- a/ui/createpool.ui +++ b/ui/createpool.ui @@ -1,7 +1,7 @@ - + 350 False diff --git a/ui/createvol.ui b/ui/createvol.ui index dc90dfb5c..98c707fb5 100644 --- a/ui/createvol.ui +++ b/ui/createvol.ui @@ -1,7 +1,7 @@ - + 100000 1 diff --git a/ui/delete.ui b/ui/delete.ui index ad86d18de..eada2033f 100644 --- a/ui/delete.ui +++ b/ui/delete.ui @@ -1,7 +1,7 @@ - + 450 350 diff --git a/ui/details.ui b/ui/details.ui index 24a3cf33c..7578b3495 100644 --- a/ui/details.ui +++ b/ui/details.ui @@ -1,7 +1,7 @@ - + 1 diff --git a/ui/fsdetails.ui b/ui/fsdetails.ui index ecb22dcf7..811dcd87f 100644 --- a/ui/fsdetails.ui +++ b/ui/fsdetails.ui @@ -1,7 +1,7 @@ - + 18446744073709 100 diff --git a/ui/gfxdetails.ui b/ui/gfxdetails.ui index 85dbac627..ae01b0305 100644 --- a/ui/gfxdetails.ui +++ b/ui/gfxdetails.ui @@ -1,7 +1,7 @@ - + 5900 50000 diff --git a/ui/host.ui b/ui/host.ui index 43c95dd8e..4edc66691 100644 --- a/ui/host.ui +++ b/ui/host.ui @@ -1,7 +1,7 @@ - + True diff --git a/ui/manager.ui b/ui/manager.ui index 2f3d4656e..8f1635617 100644 --- a/ui/manager.ui +++ b/ui/manager.ui @@ -1,7 +1,7 @@ - + True diff --git a/ui/migrate.ui b/ui/migrate.ui index 1c8b8c7b0..3f7b3ed6b 100644 --- a/ui/migrate.ui +++ b/ui/migrate.ui @@ -1,7 +1,7 @@ - + 70000 1 diff --git a/ui/netlist.ui b/ui/netlist.ui index 0259e50e6..59ce53f19 100644 --- a/ui/netlist.ui +++ b/ui/netlist.ui @@ -1,7 +1,7 @@ - + True False diff --git a/ui/preferences.ui b/ui/preferences.ui index cbabaff96..5fd26e7c2 100644 --- a/ui/preferences.ui +++ b/ui/preferences.ui @@ -1,7 +1,7 @@ - + 1 60 diff --git a/ui/snapshots.ui b/ui/snapshots.ui index 0e1011dff..05982514c 100644 --- a/ui/snapshots.ui +++ b/ui/snapshots.ui @@ -1,7 +1,7 @@ - + True False diff --git a/ui/storagebrowse.ui b/ui/storagebrowse.ui index b12169809..8fde146f1 100644 --- a/ui/storagebrowse.ui +++ b/ui/storagebrowse.ui @@ -1,7 +1,7 @@ - + False 6 diff --git a/ui/storagelist.ui b/ui/storagelist.ui index 7aeee8181..bc1cd602f 100644 --- a/ui/storagelist.ui +++ b/ui/storagelist.ui @@ -1,7 +1,7 @@ - + True False diff --git a/virt-manager b/virt-manager index e8583606a..36f866803 100755 --- a/virt-manager +++ b/virt-manager @@ -27,7 +27,6 @@ import sys import traceback import gi -from gi.repository import GObject gi.require_version('LibvirtGLib', '1.0') from gi.repository import LibvirtGLib @@ -43,10 +42,10 @@ import warnings # pylint: disable=wrong-import-order warnings.simplefilter("ignore") try: - # Avoid a deprecation warning about threads_init - gi.check_version("3.9.1") + gi.check_version("3.14.0") except (ValueError, AttributeError): - GObject.threads_init() + print "pygobject3 3.14.0 or later is required." + sys.exit(1) def _show_startup_error(msg, details): @@ -171,6 +170,10 @@ def main(): from gi.repository import Gtk leftovers = sys.argv[1:] + if Gtk.check_version(3, 14, 0): + print "gtk3 3.14.0 or later is required." + return + # This will error if Gtk wasn't correctly initialized Gtk.Window() @@ -186,7 +189,7 @@ def main(): msg += ": Could not open display: %s" % display logging.debug("".join(traceback.format_exc())) print msg - return 1 + return finally: sys.argv = origargv @@ -197,6 +200,10 @@ def main(): if leftovers: raise RuntimeError("Unhandled command line options '%s'" % leftovers) + logging.debug("PyGObject version: %d.%d.%d", + gi.version_info[0], + gi.version_info[1], + gi.version_info[2]) logging.debug("GTK version: %d.%d.%d", Gtk.get_major_version(), Gtk.get_minor_version(),