|
|
|
@ -33,11 +33,15 @@ ProgressCancelButton = interface.get_object('ProgressCancelButton')
|
|
|
|
|
|
|
|
|
|
|
|
def get_handle():
|
|
|
|
def get_handle():
|
|
|
|
global handle
|
|
|
|
global handle
|
|
|
|
|
|
|
|
handle = config.pacman_conf.initialize_alpm()
|
|
|
|
|
|
|
|
print('get handle')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def update_db():
|
|
|
|
|
|
|
|
get_handle()
|
|
|
|
global syncpkgs
|
|
|
|
global syncpkgs
|
|
|
|
global localpkgs
|
|
|
|
global localpkgs
|
|
|
|
syncpkgs = OrderedDict()
|
|
|
|
syncpkgs = OrderedDict()
|
|
|
|
localpkgs = OrderedDict()
|
|
|
|
localpkgs = OrderedDict()
|
|
|
|
handle = config.pacman_conf.initialize_alpm()
|
|
|
|
|
|
|
|
for repo in handle.get_syncdbs():
|
|
|
|
for repo in handle.get_syncdbs():
|
|
|
|
for pkg in repo.pkgcache:
|
|
|
|
for pkg in repo.pkgcache:
|
|
|
|
if not pkg.name in syncpkgs.keys():
|
|
|
|
if not pkg.name in syncpkgs.keys():
|
|
|
|
@ -45,13 +49,11 @@ def get_handle():
|
|
|
|
for pkg in handle.get_localdb().pkgcache:
|
|
|
|
for pkg in handle.get_localdb().pkgcache:
|
|
|
|
if not pkg.name in localpkgs.keys():
|
|
|
|
if not pkg.name in localpkgs.keys():
|
|
|
|
localpkgs[pkg.name] = pkg
|
|
|
|
localpkgs[pkg.name] = pkg
|
|
|
|
print('get handle')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DBusGMainLoop(set_as_default=True)
|
|
|
|
DBusGMainLoop(set_as_default=True)
|
|
|
|
bus = dbus.SystemBus()
|
|
|
|
bus = dbus.SystemBus()
|
|
|
|
proxy = bus.get_object('org.manjaro.pamac','/org/manjaro/pamac', introspect=False)
|
|
|
|
proxy = bus.get_object('org.manjaro.pamac','/org/manjaro/pamac', introspect=False)
|
|
|
|
Refresh = proxy.get_dbus_method('Refresh','org.manjaro.pamac')
|
|
|
|
Refresh = proxy.get_dbus_method('Refresh','org.manjaro.pamac')
|
|
|
|
CheckUpdates = proxy.get_dbus_method('CheckUpdates','org.manjaro.pamac')
|
|
|
|
|
|
|
|
Init = proxy.get_dbus_method('Init','org.manjaro.pamac')
|
|
|
|
Init = proxy.get_dbus_method('Init','org.manjaro.pamac')
|
|
|
|
Sysupgrade = proxy.get_dbus_method('Sysupgrade','org.manjaro.pamac')
|
|
|
|
Sysupgrade = proxy.get_dbus_method('Sysupgrade','org.manjaro.pamac')
|
|
|
|
Remove = proxy.get_dbus_method('Remove','org.manjaro.pamac')
|
|
|
|
Remove = proxy.get_dbus_method('Remove','org.manjaro.pamac')
|
|
|
|
@ -61,6 +63,7 @@ To_Remove = proxy.get_dbus_method('To_Remove','org.manjaro.pamac')
|
|
|
|
To_Add = proxy.get_dbus_method('To_Add','org.manjaro.pamac')
|
|
|
|
To_Add = proxy.get_dbus_method('To_Add','org.manjaro.pamac')
|
|
|
|
Commit = proxy.get_dbus_method('Commit','org.manjaro.pamac')
|
|
|
|
Commit = proxy.get_dbus_method('Commit','org.manjaro.pamac')
|
|
|
|
Release = proxy.get_dbus_method('Release','org.manjaro.pamac')
|
|
|
|
Release = proxy.get_dbus_method('Release','org.manjaro.pamac')
|
|
|
|
|
|
|
|
TransactionDone = proxy.get_dbus_method('TransactionDone','org.manjaro.pamac')
|
|
|
|
StopDaemon = proxy.get_dbus_method('StopDaemon','org.manjaro.pamac')
|
|
|
|
StopDaemon = proxy.get_dbus_method('StopDaemon','org.manjaro.pamac')
|
|
|
|
|
|
|
|
|
|
|
|
def action_signal_handler(action):
|
|
|
|
def action_signal_handler(action):
|
|
|
|
@ -115,12 +118,11 @@ def get_updates():
|
|
|
|
"""Return a list of package objects in local db which can be updated"""
|
|
|
|
"""Return a list of package objects in local db which can be updated"""
|
|
|
|
do_syncfirst = False
|
|
|
|
do_syncfirst = False
|
|
|
|
list_first = []
|
|
|
|
list_first = []
|
|
|
|
#get_handle()
|
|
|
|
#update_db()
|
|
|
|
if config.syncfirst:
|
|
|
|
if config.syncfirst:
|
|
|
|
for name in config.syncfirst:
|
|
|
|
for name in config.syncfirst:
|
|
|
|
pkg = handle.get_localdb().get_pkg(name)
|
|
|
|
if name in localpkgs.keys():
|
|
|
|
if pkg:
|
|
|
|
candidate = pyalpm.sync_newversion(localpkgs[name], handle.get_syncdbs())
|
|
|
|
candidate = pyalpm.sync_newversion(pkg, handle.get_syncdbs())
|
|
|
|
|
|
|
|
if candidate:
|
|
|
|
if candidate:
|
|
|
|
for repo in handle.get_syncdbs():
|
|
|
|
for repo in handle.get_syncdbs():
|
|
|
|
pkg = repo.get_pkg(candidate.name)
|
|
|
|
pkg = repo.get_pkg(candidate.name)
|
|
|
|
|