summaryrefslogtreecommitdiff
path: root/portato
diff options
context:
space:
mode:
Diffstat (limited to 'portato')
-rw-r--r--portato/backend/catapult/system.py4
-rw-r--r--portato/backend/portage/system.py3
-rw-r--r--portato/backend/system_interface.py7
-rw-r--r--portato/gui/__init__.py2
-rw-r--r--portato/gui/exception_handling.py19
5 files changed, 33 insertions, 2 deletions
diff --git a/portato/backend/catapult/system.py b/portato/backend/catapult/system.py
index c04f997..8c84b56 100644
--- a/portato/backend/catapult/system.py
+++ b/portato/backend/catapult/system.py
@@ -32,6 +32,10 @@ class CatapultSystem (SystemInterface):
so = self.bus.get_object(catapult.get_dbus_address(catapult.DEFAULT), catapult.CATAPULT_SYSTEM_BUS, follow_name_owner_changes = True)
self.proxy = dbus.Interface(so, catapult.CATAPULT_SYSTEM_IFACE)
+ def get_version (self):
+ admint = dbus.Interface(self.bus.get_object(catapult.get_dbus_address(catapult.DEFAULT), catapult.CATAPULT_BUS), catapult.CATAPULT_ADMIN_IFACE)
+ return "Catapult: %s v. %s" % (self.proxy.bus_name.split(".")[-1], str(admint.version()))
+
def geneticize_list (self, list_of_packages, only_cpv = False):
"""Convertes a list of cpv's into L{backend.Package}s.
diff --git a/portato/backend/portage/system.py b/portato/backend/portage/system.py
index e2a00cb..5b9e6cf 100644
--- a/portato/backend/portage/system.py
+++ b/portato/backend/portage/system.py
@@ -33,6 +33,9 @@ class PortageSystem (SystemInterface):
self.settings = PortageSettings()
portage.WORLD_FILE = self.settings.settings["ROOT"]+portage.WORLD_FILE
+ def get_version (self):
+ return "Portage %s" % portage.VERSION
+
def new_package (self, cpv):
return PortagePackage(cpv)
diff --git a/portato/backend/system_interface.py b/portato/backend/system_interface.py
index fce8069..43a44ad 100644
--- a/portato/backend/system_interface.py
+++ b/portato/backend/system_interface.py
@@ -12,6 +12,13 @@
class SystemInterface (object):
+ def get_version (self):
+ """Returns the version of the used backend.
+
+ @rtype: string
+ """
+ raise NotImplementedError
+
def split_cpv (self, cpv):
"""Splits a cpv into all its parts.
diff --git a/portato/gui/__init__.py b/portato/gui/__init__.py
index 1349e00..ba7bb3e 100644
--- a/portato/gui/__init__.py
+++ b/portato/gui/__init__.py
@@ -19,7 +19,7 @@ from .exception_handling import register_ex_handler
def run ():
from .windows.splash import SplashScreen
try:
- s = SplashScreen(_("Loading Portage"))
+ s = SplashScreen(_("Loading Backend"))
register_ex_handler()
s.show()
from .windows.main import MainWindow
diff --git a/portato/gui/exception_handling.py b/portato/gui/exception_handling.py
index db0cab9..33e58ab 100644
--- a/portato/gui/exception_handling.py
+++ b/portato/gui/exception_handling.py
@@ -101,12 +101,29 @@ class UncaughtExceptionDialog(gtk.MessageDialog):
break
self.destroy()
+def convert (version):
+ """Converts a version given as int-tuple to a normal version string."""
+ return ".".join(map(str, version))
+
+def get_version_infos():
+ from ..constants import VERSION
+ from ..backend import system
+ from lxml import etree
+
+ return "\n".join((
+ "Portato version: %s" % VERSION,
+ "Used backend: %s" % system.get_version(),
+ "pygtk: %s (using GTK+: %s)" % (convert(gtk.pygtk_version), convert(gtk.gtk_version)),
+ "pygobject: %s (using GLib: %s)" % (convert(gobject.pygobject_version), convert(gobject.glib_version)),
+ "lxml: %s" % convert(etree.LXML_VERSION),
+ ""))
+
def get_trace(type, value, tb):
trace = StringIO()
traceback.print_exception(type, value, tb, None, trace)
traceStr = trace.getvalue()
trace.close()
- return traceStr
+ return traceStr + "\n" + get_version_infos()
def register_ex_handler():
'nohover-highlight'> 2020-05-10Ignore 'dist' folder and build productsRené 'Necoro' Neumann1-0/+2 2020-05-08Print item hashes in debug modeRené 'Necoro' Neumann1-1/+7 2020-05-07Improve html renderingRené 'Necoro' Neumann2-53/+32 2020-05-07Do not assume items to be new when their published date is newer than the ↵René 'Necoro' Neumann2-7/+1 last run 2020-05-07Updating some depsRené 'Necoro' Neumann2-2/+7 2020-05-07Better detection if a text starts with html or notRené 'Necoro' Neumann2-4/+13 2020-05-07go fmtRené 'Necoro' Neumann1-3/+2 2020-05-07Add header X-Feed2Imap-GUIDRené 'Necoro' Neumann3-1/+7 2020-05-07update changelogRené 'Necoro' Neumann1-0/+1 2020-05-07FixRené 'Necoro' Neumann1-1/+1 2020-05-07Unified publishedDate and updatedDate into one (just as the old feed2imap...)René 'Necoro' Neumann5-21/+32 2020-05-06Print version during startupRené 'Necoro' Neumann1-1/+1 2020-05-06Improve templateRené 'Necoro' Neumann3-20/+28 2020-05-05Fix pipelineRené 'Necoro' Neumann1-2/+5 2020-05-05Make changelog a part of the release pipeline (untested)René 'Necoro' Neumann2-0/+12