fix version comparison
This commit is contained in:
parent
7ff8f5a683
commit
a44a356188
@ -111,7 +111,6 @@ def set_icon(updates):
|
|||||||
bus.add_signal_receiver(set_icon, dbus_interface = "org.manjaro.pamac", signal_name = "EmitAvailableUpdates")
|
bus.add_signal_receiver(set_icon, dbus_interface = "org.manjaro.pamac", signal_name = "EmitAvailableUpdates")
|
||||||
|
|
||||||
tray = Tray()
|
tray = Tray()
|
||||||
#set_icon()
|
|
||||||
t = PeriodicTask()
|
t = PeriodicTask()
|
||||||
t.start()
|
t.start()
|
||||||
Gtk.main()
|
Gtk.main()
|
||||||
|
@ -330,11 +330,12 @@ def get_transaction_sum():
|
|||||||
others = sorted(transaction.To_Add())
|
others = sorted(transaction.To_Add())
|
||||||
for name, version, dsize in others:
|
for name, version, dsize in others:
|
||||||
if name in transaction.localpkgs.keys():
|
if name in transaction.localpkgs.keys():
|
||||||
if version > transaction.localpkgs[name].version:
|
comp = pyalpm.vercmp(version, transaction.localpkgs[name].version)
|
||||||
|
if comp == 1:
|
||||||
transaction_dict['to_update'].append((name+' '+version, dsize))
|
transaction_dict['to_update'].append((name+' '+version, dsize))
|
||||||
elif version == transaction.localpkgs[name].version:
|
elif comp == 0:
|
||||||
transaction_dict['to_reinstall'].append((name+' '+version, dsize))
|
transaction_dict['to_reinstall'].append((name+' '+version, dsize))
|
||||||
elif version < transaction.localpkgs[name].version:
|
elif comp == -1:
|
||||||
transaction_dict['to_downgrade'].append((name+' '+version, dsize))
|
transaction_dict['to_downgrade'].append((name+' '+version, dsize))
|
||||||
else:
|
else:
|
||||||
transaction_dict['to_install'].append((name+' '+version, dsize))
|
transaction_dict['to_install'].append((name+' '+version, dsize))
|
||||||
|
Loading…
Reference in New Issue
Block a user