diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-01-27 15:00:34 +0100 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-01-27 15:00:34 +0100 |
| commit | 8ee0526d6b07c329a016e8d0009db51e9839e9f4 (patch) | |
| tree | dfa2c9c435c15d62784b36f9eb86940249ebb147 | |
| parent | 6c0a6bf0ca259670c3f85abec265e041f7aa372a (diff) | |
| parent | 8448f22c260be4f6e7732a193f330fd6cd94d9b6 (diff) | |
Merge branch 'master' into rhel6
| -rw-r--r-- | po/es.po | 152 | ||||
| -rw-r--r-- | po/pl.po | 65 | ||||
| -rw-r--r-- | src/Gui/CCDBusBackend.py | 53 |
3 files changed, 127 insertions, 143 deletions
@@ -9,8 +9,8 @@ msgid "" msgstr "" "Project-Id-Version: abrt.master.es\n" "Report-Msgid-Bugs-To: jmoskovc@redhat.com\n" -"POT-Creation-Date: 2010-01-21 19:34+0000\n" -"PO-Revision-Date: 2010-01-21 16:03-0600\n" +"POT-Creation-Date: 2010-01-27 13:02+0000\n" +"PO-Revision-Date: 2010-01-27 10:42-0300\n" "Last-Translator: Claudio Rodrigo Pereyra Diaz <claudio@pereyradiaz.com.ar>\n" "Language-Team: Fedora Spanish <fedora-trans-es@redhat.com>\n" "MIME-Version: 1.0\n" @@ -26,9 +26,7 @@ msgstr "Otro cliente ya está siendo ejecutado, intentando despertarlo." #: ../src/Gui/ABRTExceptions.py:13 msgid "Got unexpected data from daemon (is the database properly updated?)." -msgstr "" -"Se obtienen datos inesperados desde el demonio (¿está la Base de Datos " -"correctamente actualizada?)" +msgstr "Se obtienen datos inesperados desde el demonio (¿está la Base de Datos correctamente actualizada?)" #: ../src/Gui/ABRTPlugin.py:56 msgid "Not loaded plugins" @@ -50,11 +48,13 @@ msgstr "Complementos de informes" msgid "Database plugins" msgstr "Complementos de Bases de Datos" -#: ../src/Gui/CCDBusBackend.py:74 ../src/Gui/CCDBusBackend.py:97 +#: ../src/Gui/CCDBusBackend.py:74 +#: ../src/Gui/CCDBusBackend.py:97 msgid "Can't connect to system dbus" msgstr "No es posible conectarse con system dbus" -#: ../src/Gui/CCDBusBackend.py:104 ../src/Gui/CCDBusBackend.py:107 +#: ../src/Gui/CCDBusBackend.py:104 +#: ../src/Gui/CCDBusBackend.py:107 msgid "Please check if abrt daemon is running" msgstr "Por favor compruebe si el demonio ABRT se está ejecutando." @@ -74,8 +74,10 @@ msgstr "(C) 2009 Red Hat, Inc." msgid "About ABRT" msgstr "Acerca de ABRT" -#: ../src/Gui/ccgui.glade.h:3 ../src/Gui/CCMainWindow.py:9 -#: ../src/Gui/report.glade.h:15 ../src/Gui/abrt.desktop.in.h:1 +#: ../src/Gui/ccgui.glade.h:3 +#: ../src/Gui/CCMainWindow.py:9 +#: ../src/Gui/report.glade.h:15 +#: ../src/Gui/abrt.desktop.in.h:1 msgid "Automatic Bug Reporting Tool" msgstr "Herramienta de Informe de Errores Automática" @@ -105,32 +107,18 @@ msgstr "Informe" #: ../src/Gui/ccgui.glade.h:10 msgid "" -"This program is free software; you can redistribute it and/or modify it " -"under the terms of the GNU General Public License as published by the Free " -"Software Foundation; either version 2 of the License, or (at your option) " -"any later version.\n" +"This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\n" "\n" -"This program is distributed in the hope that it will be useful, but WITHOUT " -"ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or " -"FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for " -"more details.\n" +"This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n" "\n" -"You should have received a copy of the GNU General Public License along with " -"this program. If not, see <http://www.gnu.org/licenses/>." +"You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>." msgstr "" -"Este programa es software libre; puede redistribuirlo y/o modificarlo bajo " -"los términos de la Licencia Pública General de Bibliotecas de GNU, como " -"fueron publicadas por la Fundación de Software Libre; ya sea la versión 2 o " -"(a su elección) alguna posterior.\n" +"Este programa es software libre; puede redistribuirlo y/o modificarlo bajo los términos de la Licencia Pública General de Bibliotecas de GNU, como fueron publicadas por la Fundación de Software Libre; ya sea la versión 2 o (a su elección) alguna posterior.\n" "\n" "\n" -"Este programa se distribuye con la esperanza de que será útil, pero SIN " -"NINGUNA GARANTÍA; sin siquiera la garantía implícita de MERCANTIBILIDAD o " -"AJUSTE A UN PROPÓSITO PARTICULAR. Vea la Licencia Pública General de " -"Bibliotecas de GNU para más detalles.\n" +"Este programa se distribuye con la esperanza de que será útil, pero SIN NINGUNA GARANTÍA; sin siquiera la garantía implícita de MERCANTIBILIDAD o AJUSTE A UN PROPÓSITO PARTICULAR. Vea la Licencia Pública General de Bibliotecas de GNU para más detalles.\n" "\n" -"Debe haber recibido una copia de la Licencia Pública General de Bibliotecas " -"de GNU junto con este programa; sino, see <http://www.gnu.org/licenses/>." +"Debe haber recibido una copia de la Licencia Pública General de Bibliotecas de GNU junto con este programa; sino, see <http://www.gnu.org/licenses/>." #: ../src/Gui/ccgui.glade.h:15 msgid "_Edit" @@ -228,21 +216,26 @@ msgstr "" "¡El informe falló!\n" "%s" -#: ../src/Gui/CCMainWindow.py:342 ../src/Gui/CCMainWindow.py:369 +#: ../src/Gui/CCMainWindow.py:342 +#: ../src/Gui/CCMainWindow.py:369 #, python-format msgid "Error getting the report: %s" msgstr "Error al obtener el informe: %s" -#: ../src/Gui/CCReporterDialog.py:90 +#. default texts +#: ../src/Gui/CCReporterDialog.py:24 +msgid "Brief description how to reproduce this or what you did..." +msgstr "Breve descripción de cómo reproducir esto o lo que hizo..." + +#: ../src/Gui/CCReporterDialog.py:94 msgid "You must agree with submitting the backtrace." msgstr "Usted debe estar de acuerdo con rendir informe del trazado" -#: ../src/Gui/CCReporterDialog.py:101 +#: ../src/Gui/CCReporterDialog.py:105 #, python-format msgid "" "Reporting disabled because the backtrace is unusable.\n" -"Please try to install debuginfo manually using command: <b>debuginfo-install " -"%s</b> \n" +"Please try to install debuginfo manually using command: <b>debuginfo-install %s</b> \n" "then use Refresh button to regenerate the backtrace." msgstr "" "El informe está deshabilitado porque el trazado no es útil.\n" @@ -250,19 +243,15 @@ msgstr "" "usando el comando <b> debuginfo-install %s </b>\n" "y luego use el botón Actualizar para regenerar el trazado." -#: ../src/Gui/CCReporterDialog.py:103 +#: ../src/Gui/CCReporterDialog.py:107 msgid "The backtrace is unusable, you can't report this!" msgstr "¡El trazado es inútil, no se puede informar esto!" -#: ../src/Gui/CCReporterDialog.py:106 -msgid "" -"The backtrace is incomplete, please make sure you provide good steps to " -"reproduce." -msgstr "" -"El trazado está incompleto, por favor, asegúrese de proveer bien los pasos " -"para reproducir el error." +#: ../src/Gui/CCReporterDialog.py:110 +msgid "The backtrace is incomplete, please make sure you provide good steps to reproduce." +msgstr "El trazado está incompleto, por favor, asegúrese de proveer bien los pasos para reproducir el error." -#: ../src/Gui/CCReporterDialog.py:148 +#: ../src/Gui/CCReporterDialog.py:152 #, python-format msgid "" "Can't save plugin settings:\n" @@ -271,11 +260,8 @@ msgstr "" "No se pudo guardar la configuración del complemento:\n" "%s" -#: ../src/Gui/CCReporterDialog.py:266 -msgid "Brief description how to reproduce this or what you did..." -msgstr "Breve descripción de cómo reproducir esto o lo que hizo..." - -#: ../src/Gui/dialogs.glade.h:1 ../src/Gui/report.glade.h:17 +#: ../src/Gui/dialogs.glade.h:1 +#: ../src/Gui/report.glade.h:17 msgid "Log" msgstr "Registro" @@ -285,9 +271,7 @@ msgstr "Informe terminado" #: ../src/Gui/PluginSettingsUI.py:18 msgid "Can't find PluginDialog widget in UI description!" -msgstr "" -"No se encuentra el control visual de PluginDialog en la descripción de la " -"interfaz del usuario." +msgstr "No se encuentra el control visual de PluginDialog en la descripción de la interfaz del usuario." #. we shouldn't get here, but just to be safe #: ../src/Gui/PluginSettingsUI.py:24 @@ -295,7 +279,8 @@ msgstr "" msgid "No UI for plugin %s" msgstr "No hay interfase del usuario para el complemento %s" -#: ../src/Gui/PluginSettingsUI.py:55 ../src/Gui/PluginSettingsUI.py:81 +#: ../src/Gui/PluginSettingsUI.py:55 +#: ../src/Gui/PluginSettingsUI.py:81 msgid "combo box is not implemented" msgstr "el combo box no está implementado" @@ -361,9 +346,7 @@ msgstr "<span color=\"white\">Release</span>" #: ../src/Gui/report.glade.h:16 msgid "I agree to submit this backtrace, which could contain sensitive data" -msgstr "" -"Estoy de acuerdo en rendir el siguiente trazado, el cual podría contene " -"datos sensibles" +msgstr "Estoy de acuerdo en rendir el siguiente trazado, el cual podría contene datos sensibles" #: ../src/Gui/report.glade.h:18 msgid "N/A" @@ -373,7 +356,8 @@ msgstr "N/A" msgid "Send" msgstr "Enviar" -#: ../src/Gui/SettingsDialog.py:33 ../src/Gui/SettingsDialog.py:50 +#: ../src/Gui/SettingsDialog.py:33 +#: ../src/Gui/SettingsDialog.py:50 msgid "<b>Select plugin</b>" msgstr "<b>Seleccione un complemento</b>" @@ -505,14 +489,11 @@ msgid "Warning" msgstr "Aviso" #: ../src/Daemon/Daemon.cpp:473 -msgid "" -"Report size exceeded the quota. Please check system's MaxCrashReportsSize " -"value in abrt.conf." -msgstr "" -"El tamaño del informe excede la cuota. Por favor, verifique el valor de " -"MaxCrashReportsSize del sistema en abrt.conf." +msgid "Report size exceeded the quota. Please check system's MaxCrashReportsSize value in abrt.conf." +msgstr "El tamaño del informe excede la cuota. Por favor, verifique el valor de MaxCrashReportsSize del sistema en abrt.conf." -#: ../lib/Plugins/Bugzilla.cpp:132 ../lib/Plugins/Bugzilla.cpp:300 +#: ../lib/Plugins/Bugzilla.cpp:132 +#: ../lib/Plugins/Bugzilla.cpp:300 msgid "Missing member 'bugs'" msgstr "Faltante de miembro 'bugs'" @@ -534,28 +515,27 @@ msgstr "Faltante de miembro 'bug_id'" msgid "New bug id: %i" msgstr "Nuevo id del error: %i" -#: ../lib/Plugins/Bugzilla.cpp:468 +#: ../lib/Plugins/Bugzilla.cpp:469 msgid "Checking for duplicates..." msgstr "Chequeando si hay duplicados..." -#: ../lib/Plugins/Bugzilla.cpp:474 +#: ../lib/Plugins/Bugzilla.cpp:475 msgid "Empty login and password. Please check Bugzilla.conf" -msgstr "" -"Usuario y contraseña vacios. Por favor compruebe el archivo Bugzilla.conf" +msgstr "Usuario y contraseña vacios. Por favor compruebe el archivo Bugzilla.conf" -#: ../lib/Plugins/Bugzilla.cpp:477 +#: ../lib/Plugins/Bugzilla.cpp:478 msgid "Logging into bugzilla..." msgstr "Ingresando a bugzilla..." -#: ../lib/Plugins/Bugzilla.cpp:482 +#: ../lib/Plugins/Bugzilla.cpp:483 msgid "Checking CC..." msgstr "Chequeando CC..." -#: ../lib/Plugins/Bugzilla.cpp:493 +#: ../lib/Plugins/Bugzilla.cpp:494 msgid "Creating new bug..." msgstr "Creando un nuevo informe..." -#: ../lib/Plugins/Bugzilla.cpp:497 +#: ../lib/Plugins/Bugzilla.cpp:498 msgid "Logging out..." msgstr "Saliendo..." @@ -623,19 +603,17 @@ msgstr "Creando un informe de cuelgue de kernel oops..." msgid "Sending an email..." msgstr "Enviando un correo..." -#: ../lib/Plugins/SOSreport.cpp:69 -msgid "Executing SOSreport plugin..." -msgstr "Ejecutando complemento SOSreport..." - -#: ../lib/Plugins/SOSreport.cpp:91 +#: ../lib/Plugins/SOSreport.cpp:102 #, c-format -msgid "running sosreport: %s" -msgstr "ejecutando sosreport: %s" +msgid "Running sosreport: %s" +msgstr "Corriendo sosreport: %s" -#: ../lib/Plugins/SOSreport.cpp:97 -msgid "done running sosreport" -msgstr "Sosreport corriendo" +#: ../lib/Plugins/SOSreport.cpp:108 +msgid "Done running sosreport" +msgstr "Sosreport ya esta corriendo" +#~ msgid "Executing SOSreport plugin..." +#~ msgstr "Ejecutando complemento SOSreport..." #~ msgid "" #~ "<b>WARNING</b>, you're about to send data which might contain sensitive " #~ "information.\n" @@ -644,37 +622,27 @@ msgstr "Sosreport corriendo" #~ "<b>ADVERTENCIA</b>, ¡está por enviar datos que pueden contener " #~ "información sensible!\n" #~ "¿Realmente quiere enviar <b>%s</b>?\n" - #~ msgid "<b>Following items will be sent</b>" #~ msgstr "<b>Serán enviados los siguientes elementos</b>" - #~ msgid "Plugin name is not set, can't load its settings" #~ msgstr "" #~ "No se puso el nombre del complemento, no se puede cargar su configuración" - #~ msgid "Searching for debug-info packages..." #~ msgstr "Buscando paquetes de información del depurador..." - #~ msgid "Downloading and installing debug-info packages..." #~ msgstr "Descargando e instalando paquetes de información del depurador..." - #~ msgid "Creating a report..." #~ msgstr "Creando un informe..." - #~ msgid "Starting report creation..." #~ msgstr "Iniciando la creación del informe..." - #~ msgid "Working..." #~ msgstr "Trabajando..." - #~ msgid "Can't get username for uid %s" #~ msgstr "No se pudo obtener nombre de usuario para el uid %s" - #~ msgid "Edit blacklisted packages" #~ msgstr "Edite los paquetes de la Blacklist" - #~ msgid "Nothing selected" #~ msgstr "Nada seleccionado" - #~ msgid "This function is not implemented yet!" #~ msgstr "¡Esta función no está implementada todavía! :-(" + @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: pl\n" "Report-Msgid-Bugs-To: jmoskovc@redhat.com\n" -"POT-Creation-Date: 2010-01-22 10:02+0000\n" -"PO-Revision-Date: 2010-01-22 17:41+0100\n" +"POT-Creation-Date: 2010-01-27 13:02+0000\n" +"PO-Revision-Date: 2010-01-27 14:12+0100\n" "Last-Translator: Piotr Drąg <piotrdrag@gmail.com>\n" "Language-Team: Polish <trans-pl@lists.fedoraproject.org>\n" "MIME-Version: 1.0\n" @@ -34,7 +34,7 @@ msgstr "Wtyczki analizy" #: ../src/Gui/ABRTPlugin.py:58 msgid "Action plugins" -msgstr "Wtyczki działań" +msgstr "Wtyczki czynności" #: ../src/Gui/ABRTPlugin.py:59 msgid "Reporter plugins" @@ -66,7 +66,7 @@ msgstr "(C) 2009 Red Hat, Inc." #: ../src/Gui/ccgui.glade.h:2 msgid "About ABRT" -msgstr "Informacje o ABRT" +msgstr "O programie ABRT" #: ../src/Gui/ccgui.glade.h:3 ../src/Gui/CCMainWindow.py:9 #: ../src/Gui/report.glade.h:15 ../src/Gui/abrt.desktop.in.h:1 @@ -226,11 +226,18 @@ msgstr "" msgid "Error getting the report: %s" msgstr "Błąd podczas uzyskiwania raportu: %s" -#: ../src/Gui/CCReporterDialog.py:90 +#. default texts +#: ../src/Gui/CCReporterDialog.py:24 +msgid "Brief description how to reproduce this or what you did..." +msgstr "" +"Krótki opis, jak ponownie wywołać tę awarię lub co robił użytkownik (w " +"języku angielskim)..." + +#: ../src/Gui/CCReporterDialog.py:94 msgid "You must agree with submitting the backtrace." msgstr "Należy wyrazić zgodę na wysłanie wyjątku." -#: ../src/Gui/CCReporterDialog.py:101 +#: ../src/Gui/CCReporterDialog.py:105 #, python-format msgid "" "Reporting disabled because the backtrace is unusable.\n" @@ -243,11 +250,11 @@ msgstr "" "<b>debuginfo-install %s</b>, \n" "a następnie nacisnąć przycisk Odśwież, aby ponownie utworzyć wyjątek." -#: ../src/Gui/CCReporterDialog.py:103 +#: ../src/Gui/CCReporterDialog.py:107 msgid "The backtrace is unusable, you can't report this!" msgstr "Nie można użyć tego wyjątku, więc nie można tego zgłosić." -#: ../src/Gui/CCReporterDialog.py:106 +#: ../src/Gui/CCReporterDialog.py:110 msgid "" "The backtrace is incomplete, please make sure you provide good steps to " "reproduce." @@ -255,7 +262,7 @@ msgstr "" "Wyjątek jest niepełny. Proszę upewnić się, że podano właściwe kroki " "ponownego wywołania awarii." -#: ../src/Gui/CCReporterDialog.py:148 +#: ../src/Gui/CCReporterDialog.py:152 #, python-format msgid "" "Can't save plugin settings:\n" @@ -264,12 +271,6 @@ msgstr "" "Nie można zapisać ustawień wtyczki:\n" " %s" -#: ../src/Gui/CCReporterDialog.py:266 -msgid "Brief description how to reproduce this or what you did..." -msgstr "" -"Krótki opis, jak ponownie wywołać tę awarię lub co robił użytkownik (w " -"języku angielskim)..." - #: ../src/Gui/dialogs.glade.h:1 ../src/Gui/report.glade.h:17 msgid "Log" msgstr "Dziennik" @@ -390,7 +391,7 @@ msgstr "<b>Wtyczka analizy</b>" #: ../src/Gui/settings.glade.h:2 msgid "<b>Associated action</b>" -msgstr "<b>Powiązane działanie</b>" +msgstr "<b>Powiązana czynność</b>" #: ../src/Gui/settings.glade.h:3 msgid "<b>Plugin details</b>" @@ -406,7 +407,7 @@ msgstr "<b>Czas (lub okres czasu)</b>" #: ../src/Gui/settings.glade.h:6 msgid "Analyzers, Actions, Reporters" -msgstr "Analizy, działania, zgłaszający" +msgstr "Analizy, czynności, zgłaszający" #: ../src/Gui/settings.glade.h:7 msgid "Author:" @@ -414,7 +415,7 @@ msgstr "Autor:" #: ../src/Gui/settings.glade.h:8 msgid "Blacklisted packages: " -msgstr "Czarna lista pakietów: " +msgstr "Wykluczone pakiety: " #: ../src/Gui/settings.glade.h:9 msgid "C_onfigure plugin" @@ -446,7 +447,7 @@ msgstr "Klucze GPG" #: ../src/Gui/settings.glade.h:16 msgid "GPG keys: " -msgstr "klucze GPG: " +msgstr "Klucze GPG: " #: ../src/Gui/settings.glade.h:17 msgid "Global Settings" @@ -503,7 +504,7 @@ msgid "" "value in abrt.conf." msgstr "" "Wielkość raportu przekroczyła dozwolone ograniczenie. Proszę sprawdzić " -"wartość zmiennej MaxCrashReportsSize w pliku abrt.conf" +"wartość zmiennej MaxCrashReportsSize w pliku abrt.conf." #: ../lib/Plugins/Bugzilla.cpp:132 ../lib/Plugins/Bugzilla.cpp:300 msgid "Missing member 'bugs'" @@ -553,7 +554,7 @@ msgstr "Wylogowywanie..." #: ../lib/Plugins/Kerneloops.cpp:35 msgid "Getting local universal unique identification" -msgstr "Uzyskiwanie lokalnego uniwersalnego, unikalnego identyfikatora" +msgstr "Uzyskiwanie lokalnego UUID" #: ../lib/Plugins/CCpp.cpp:253 msgid "Generating backtrace" @@ -565,11 +566,11 @@ msgstr "Uruchamianie instalacji pakietów debuginfo" #: ../lib/Plugins/CCpp.cpp:524 msgid "Getting local universal unique identification..." -msgstr "Uzyskiwanie lokalnego uniwersalnego, unikalnego identyfikatora..." +msgstr "Uzyskiwanie lokalnego UUID..." #: ../lib/Plugins/CCpp.cpp:543 msgid "Getting global universal unique identification..." -msgstr "Uzyskiwanie globalnego uniwersalnego, unikalnego identyfikatora..." +msgstr "Uzyskiwanie globalnego UUID..." #: ../lib/Plugins/CCpp.cpp:721 msgid "Skipping debuginfo installation" @@ -609,21 +610,17 @@ msgstr "Nie można utworzyć i wysłać archiwum %s" #: ../lib/Plugins/KerneloopsScanner.cpp:79 msgid "Creating kernel oops crash reports..." -msgstr "Tworzenie raportów awarii \"kernel oops\"" +msgstr "Tworzenie raportów awarii jądra typu \"oops\"..." #: ../lib/Plugins/Mailx.cpp:137 msgid "Sending an email..." msgstr "Wysłanie wiadomości e-mail..." -#: ../lib/Plugins/SOSreport.cpp:69 -msgid "Executing SOSreport plugin..." -msgstr "Wykonywanie wtyczki SOSreport..." - -#: ../lib/Plugins/SOSreport.cpp:91 +#: ../lib/Plugins/SOSreport.cpp:102 #, c-format -msgid "running sosreport: %s" -msgstr "wykonywanie sosreport: %s" +msgid "Running sosreport: %s" +msgstr "Wykonywanie sosreport: %s" -#: ../lib/Plugins/SOSreport.cpp:97 -msgid "done running sosreport" -msgstr "ukończono wykonywanie sosreport" +#: ../lib/Plugins/SOSreport.cpp:108 +msgid "Done running sosreport" +msgstr "Ukończono wykonywanie sosreport" diff --git a/src/Gui/CCDBusBackend.py b/src/Gui/CCDBusBackend.py index f4ef104..b99e6f8 100644 --- a/src/Gui/CCDBusBackend.py +++ b/src/Gui/CCDBusBackend.py @@ -1,16 +1,17 @@ # -*- coding: utf-8 -*- +import time # for sleep() +import gobject import dbus import dbus.service -import gobject from dbus.mainloop.glib import DBusGMainLoop import gtk from dbus.exceptions import * import ABRTExceptions from abrt_utils import _, log, log1, log2 -CC_NAME = 'com.redhat.abrt' -CC_IFACE = 'com.redhat.abrt' -CC_PATH = '/com/redhat/abrt' +ABRTD_DBUS_NAME = 'com.redhat.abrt' +ABRTD_DBUS_PATH = '/com/redhat/abrt' +ABRTD_DBUS_IFACE = 'com.redhat.abrt' APP_NAME = 'com.redhat.abrt.gui' APP_PATH = '/com/redhat/abrt/gui' @@ -74,16 +75,16 @@ class DBusManager(gobject.GObject): raise Exception(_("Can't connect to system dbus")) self.bus.add_signal_receiver(self.owner_changed_cb, "NameOwnerChanged", dbus_interface="org.freedesktop.DBus") # new crash notification - self.bus.add_signal_receiver(self.crash_cb, "Crash", dbus_interface=CC_IFACE) + self.bus.add_signal_receiver(self.crash_cb, "Crash", dbus_interface=ABRTD_DBUS_IFACE) # watch for updates - self.bus.add_signal_receiver(self.update_cb, "Update", dbus_interface=CC_IFACE) + self.bus.add_signal_receiver(self.update_cb, "Update", dbus_interface=ABRTD_DBUS_IFACE) # watch for warnings - self.bus.add_signal_receiver(self.warning_cb, "Warning", dbus_interface=CC_IFACE) + self.bus.add_signal_receiver(self.warning_cb, "Warning", dbus_interface=ABRTD_DBUS_IFACE) # watch for job-done signals - self.bus.add_signal_receiver(self.jobdone_cb, "JobDone", dbus_interface=CC_IFACE) + self.bus.add_signal_receiver(self.jobdone_cb, "JobDone", dbus_interface=ABRTD_DBUS_IFACE) # We use this function instead of caching and reusing of - # dbus.Interface(proxy, dbus_interface=CC_IFACE) because we want + # dbus.Interface(proxy, dbus_interface=ABRTD_DBUS_IFACE) because we want # to restart abrtd in this scenario: # (1) abrt-gui was run # (2) user generated the report, then left for coffee break @@ -93,16 +94,34 @@ class DBusManager(gobject.GObject): def daemon(self): if not self.bus: self.bus = dbus.SystemBus() - if not self.bus: - raise Exception(_("Can't connect to system dbus")) + if not self.bus: + raise Exception(_("Can't connect to system dbus")) + # Autostart hack + # Theoretically, this is not needed, the first dbus call + # should autostart daemon if needed. In practice, + # without this code autostart is not reliable. Apparently + # dbus fails to check that the first call after autostart + # does not fail because daemon did not finish its initialization yet. + # (strace says abrt-gui -> dbus_daemon transfer is ok, + # I suspect dbus_daemon -> freshly_started_abrtd isn't) + try: + (always_true, rc) = self.bus.start_service_by_name(ABRTD_DBUS_NAME, flags=0) + # rc is either self.bus.START_REPLY_SUCCESS or self.bus.START_REPLY_ALREADY_RUNNING + if rc == self.bus.START_REPLY_SUCCESS: + # Better solution may be to have daemon emit a signal and wait for it + log1("dbus auto-started abrt daemon, giving it 1 sec to initialize"); + time.sleep(1) + except DBusException: + raise Exception("abrt daemon is not running, and DBus can't start it") + # End of autostart hack try: - proxy = self.bus.get_object(CC_IFACE, CC_PATH, introspect=False) + # follow_name_owner_changes=True: switch to new daemon if daemon is restarted + proxy = self.bus.get_object(ABRTD_DBUS_NAME, ABRTD_DBUS_PATH, introspect=False, follow_name_owner_changes=True) except DBusException: - proxy = None - raise Exception("Can't connect to abrt daemon.") + raise Exception("Can't connect to abrt daemon") if not proxy: raise Exception(_("Please check if abrt daemon is running")) - daemon = dbus.Interface(proxy, dbus_interface=CC_IFACE) + daemon = dbus.Interface(proxy, dbus_interface=ABRTD_DBUS_IFACE) if not daemon: raise Exception(_("Please check if abrt daemon is running")) return daemon @@ -141,8 +160,8 @@ class DBusManager(gobject.GObject): log1("Warning:%s", message) self.emit("warning", message) - def owner_changed_cb(self,name, old_owner, new_owner): - if name == CC_NAME: + def owner_changed_cb(self, name, old_owner, new_owner): + if name == ABRTD_DBUS_NAME: if new_owner: self.emit("daemon-state-changed", "up") else: |
