From be6686229c0a16aebe7121a64caea960b0506f7a Mon Sep 17 00:00:00 2001 From: guinux Date: Wed, 23 Jan 2013 16:51:27 +0100 Subject: [PATCH] some adjustements --- pamac/transaction.py | 16 ++++++++++++++++ pamac/updater.py | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/pamac/transaction.py b/pamac/transaction.py index 52a8498..bc416bc 100755 --- a/pamac/transaction.py +++ b/pamac/transaction.py @@ -121,12 +121,28 @@ def check_conflicts(): if name == target.name: if not name in to_remove: to_remove.append(installed_pkg.name) + for repo in handle.get_syncdbs(): + for pkg in repo.pkgcache: + if pkg.replaces: + for name in pkg.replaces: + for installed_pkg in handle.get_localdb().pkgcache: + if name == installed_pkg.name: + if not name in to_remove: + to_remove.append(installed_pkg.name) + if warning: + warning = warning+'\n' + warning = warning+installed_pkg.name+' will be replaced by '+pkg.name + print(name) + if not pkg.name in to_add: + to_add.append(pkg.name) if warning: WarningDialog.format_secondary_text(warning) response = WarningDialog.run() if response: WarningDialog.hide() + + def get_to_remove(): global to_remove to_remove = To_Remove() diff --git a/pamac/updater.py b/pamac/updater.py index d43f5e2..ee14112 100755 --- a/pamac/updater.py +++ b/pamac/updater.py @@ -187,7 +187,7 @@ class Handler: have_updates() def main(): - #transaction.do_refresh() + transaction.do_refresh() have_updates() interface.connect_signals(Handler()) UpdateWindow.show_all()