fixes
This commit is contained in:
parent
c50d0e8c7f
commit
bf79643b44
@ -160,10 +160,9 @@ class PamacDBusService(dbus.service.Object):
|
||||
if not (level & _logmask):
|
||||
return
|
||||
if level & pyalpm.LOG_ERROR:
|
||||
self.error += "ERROR: "+line
|
||||
#self.error += "ERROR: "+line
|
||||
#self.EmitLogError(line)
|
||||
print(self.error)
|
||||
#self.t.release()
|
||||
print(line)
|
||||
elif level & pyalpm.LOG_WARNING:
|
||||
self.warning += "WARNING: "+line
|
||||
#self.EmitLogWarning(line)
|
||||
@ -379,7 +378,6 @@ class PamacDBusService(dbus.service.Object):
|
||||
try:
|
||||
self.t.prepare()
|
||||
except pyalpm.error as e:
|
||||
print(e)
|
||||
self.error += ' --> '+str(e)+'\n'
|
||||
finally:
|
||||
return self.error
|
||||
@ -426,7 +424,6 @@ class PamacDBusService(dbus.service.Object):
|
||||
try:
|
||||
self.t.commit()
|
||||
except pyalpm.error as e:
|
||||
#error = traceback.format_exc()
|
||||
self.error += ' --> '+str(e)+'\n'
|
||||
#except dbus.exceptions.DBusException:
|
||||
#pass
|
||||
|
@ -5,7 +5,7 @@ from gi.repository import GObject
|
||||
from sys import argv
|
||||
import dbus
|
||||
from os.path import abspath
|
||||
from pamac import common, main
|
||||
from pamac import common
|
||||
|
||||
# i18n
|
||||
import gettext
|
||||
@ -35,7 +35,6 @@ def get_pkgs(pkgs):
|
||||
for pkg in pkgs:
|
||||
if '.pkg.tar.' in pkg:
|
||||
full_path = abspath(pkg)
|
||||
print('path',full_path)
|
||||
transaction.to_load.add(full_path)
|
||||
elif pkg in transaction.syncpkgs.keys():
|
||||
transaction.to_add.add(pkg)
|
||||
@ -84,12 +83,13 @@ def install(pkgs):
|
||||
exiting('')
|
||||
|
||||
if common.pid_file_exists():
|
||||
main.ErrorDialog.format_secondary_text(_('Pamac is already running'))
|
||||
response = main.ErrorDialog.run()
|
||||
from pamac.main import ErrorDialog
|
||||
ErrorDialog.format_secondary_text(_('Pamac is already running'))
|
||||
response = ErrorDialog.run()
|
||||
if response:
|
||||
main.ErrorDialog.hide()
|
||||
ErrorDialog.hide()
|
||||
else:
|
||||
from pamac import transaction
|
||||
from pamac import transaction, main
|
||||
transaction.get_handle()
|
||||
transaction.update_db()
|
||||
do_syncfirst, updates = transaction.get_updates()
|
||||
|
@ -43,6 +43,8 @@ progress_label = interface.get_object('progresslabel2')
|
||||
action_icon = interface.get_object('action_icon')
|
||||
ProgressCancelButton = interface.get_object('ProgressCancelButton')
|
||||
|
||||
mode = None
|
||||
|
||||
def action_signal_handler(action):
|
||||
if action:
|
||||
progress_label.set_text(action)
|
||||
@ -361,7 +363,7 @@ def handle_error(error):
|
||||
# Gtk.main_iteration()
|
||||
if error:
|
||||
if not 'DBus.Error.NoReply' in str(error):
|
||||
print('error:', error)
|
||||
print(error)
|
||||
ErrorDialog.format_secondary_text(error)
|
||||
response = ErrorDialog.run()
|
||||
if response:
|
||||
@ -510,6 +512,7 @@ def check_conflicts():
|
||||
warning = ''
|
||||
error = ''
|
||||
print('checking...')
|
||||
if mode:
|
||||
Window.get_window().set_cursor(Gdk.Cursor(Gdk.CursorType.WATCH))
|
||||
while Gtk.events_pending():
|
||||
Gtk.main_iteration()
|
||||
@ -821,6 +824,7 @@ def check_conflicts():
|
||||
for pkg in pkg_list:
|
||||
wont_be_removed.add(pkg.name)
|
||||
|
||||
if mode:
|
||||
Window.get_window().set_cursor(None)
|
||||
print('check done')
|
||||
if warning:
|
||||
|
Loading…
Reference in New Issue
Block a user