From 3750486576d56a1b89022525cb9b0f3217d0e3d1 Mon Sep 17 00:00:00 2001 From: guinux Date: Wed, 5 Mar 2014 15:00:39 +0100 Subject: [PATCH] add downgrade support --- pamac-daemon.py | 6 +++--- pamac/transaction.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pamac-daemon.py b/pamac-daemon.py index 3a4fb0b..1c89e0f 100755 --- a/pamac-daemon.py +++ b/pamac-daemon.py @@ -521,11 +521,11 @@ class PamacDBusService(dbus.service.Object): finally: return error - @dbus.service.method('org.manjaro.pamac', '', 's') - def Sysupgrade(self): + @dbus.service.method('org.manjaro.pamac', 'b', 's') + def Sysupgrade(self, downgrade): error = '' try: - self.t.sysupgrade(downgrade=False) + self.t.sysupgrade(downgrade = bool(downgrade)) except pyalpm.error as e: error = format_error(e.args) self.t.release() diff --git a/pamac/transaction.py b/pamac/transaction.py index e6900b5..5e513ed 100644 --- a/pamac/transaction.py +++ b/pamac/transaction.py @@ -786,7 +786,7 @@ def set_transaction_sum(show_updates = True): else: sum_bottom_label.set_markup('{} {}'.format(_('Total download size:'), common.format_size(dsize))) -def sysupgrade(show_updates = True): +def sysupgrade(show_updates = True, downgrade = False): syncfirst, updates = available_updates if updates: global to_update @@ -834,7 +834,7 @@ def sysupgrade(show_updates = True): error += init_transaction() if not error: if to_update: - error += Sysupgrade() + error += Sysupgrade(downgrade) _error = '' for name in to_add: _error += Add(name)