From c57bf16d372cc820fc306faad923cd2f04766e22 Mon Sep 17 00:00:00 2001 From: guinux Date: Sat, 2 Feb 2013 14:02:18 +0100 Subject: [PATCH] hot fixes --- data/dbus/org.manjaro.pamac.service | 2 +- data/systemd/pamac.service | 2 +- pamac-manager | 2 +- pamac-tray | 3 +++ pamac-updater | 2 +- pamac/transaction.py | 24 ++++++++++++------------ pamac/tray.py | 10 +++++++++- start-pamac-daemon | 2 +- tray | 3 --- 9 files changed, 29 insertions(+), 21 deletions(-) create mode 100755 pamac-tray delete mode 100755 tray diff --git a/data/dbus/org.manjaro.pamac.service b/data/dbus/org.manjaro.pamac.service index ee94d6c..66c27a6 100644 --- a/data/dbus/org.manjaro.pamac.service +++ b/data/dbus/org.manjaro.pamac.service @@ -1,5 +1,5 @@ [D-BUS Service] Name=org.manjaro.pamac -Exec=/usr/lib/python3.3/site-packages/pamac/pamac-daemon.py +Exec=/usr/bin/python /usr/lib/python3.3/site-packages/pamac/pamac-daemon.py User=root SystemdService=pamac.service diff --git a/data/systemd/pamac.service b/data/systemd/pamac.service index aad42e2..b93f9be 100644 --- a/data/systemd/pamac.service +++ b/data/systemd/pamac.service @@ -4,4 +4,4 @@ Description=Pamac [Service] Type=dbus BusName=org.manjaro.pamac -ExecStart=/usr/lib/python3.3/site-packages/pamac/pamac-daemon.py +ExecStart=/usr/bin/python /usr/lib/python3.3/site-packages/pamac/pamac-daemon.py diff --git a/pamac-manager b/pamac-manager index ed71d1b..53d79f0 100755 --- a/pamac-manager +++ b/pamac-manager @@ -1,3 +1,3 @@ #! /bin/sh -/usr/lib/python3.3/site-packages/pamac/manager.py +/usr/bin/python /usr/lib/python3.3/site-packages/pamac/manager.py diff --git a/pamac-tray b/pamac-tray new file mode 100755 index 0000000..5a05f36 --- /dev/null +++ b/pamac-tray @@ -0,0 +1,3 @@ +#! /bin/sh + +/usr/bin/python /usr/lib/python3.3/site-packages/pamac/tray.py diff --git a/pamac-updater b/pamac-updater index 8835e6f..7503aad 100755 --- a/pamac-updater +++ b/pamac-updater @@ -1,3 +1,3 @@ #! /bin/sh -/usr/lib/python3.3/site-packages/pamac/updater.py +/usr/bin/python /usr/lib/python3.3/site-packages/pamac/updater.py diff --git a/pamac/transaction.py b/pamac/transaction.py index 9406970..7fca769 100755 --- a/pamac/transaction.py +++ b/pamac/transaction.py @@ -105,9 +105,9 @@ def check_conflicts(): installed_pkg_name.append(installed_pkg.name) for target in to_check: for name in target.replaces: - if common.format_pkg_name(name) in installed_pkg_name: - if not common.format_pkg_name(name) in to_remove: - to_remove.append(common.format_pkg_name(name)) + if name in installed_pkg_name: + if not name in to_remove: + to_remove.append(name) if warning: warning = warning+'\n' warning = warning+name+' will be replaced by '+target.name @@ -120,16 +120,16 @@ def check_conflicts(): if warning: warning = warning+'\n' warning = warning+name+' conflicts with '+target.name+'\nNone of them will be installed' - if common.format_pkg_name(name) in installed_pkg_name: - if not common.format_pkg_name(name) in to_remove: - to_remove.append(common.format_pkg_name(name)) + if name in installed_pkg_name: + if not name in to_remove: + to_remove.append(name) if warning: warning = warning+'\n' warning = warning+name+' conflicts with '+target.name for installed_pkg in handle.get_localdb().pkgcache: for name in installed_pkg.conflicts: - if common.format_pkg_name(name) == target.name: - if not common.format_pkg_name(name) in to_remove: + if name == target.name: + if not name in to_remove: to_remove.append(installed_pkg.name) if warning: warning = warning+'\n' @@ -137,12 +137,12 @@ def check_conflicts(): for repo in handle.get_syncdbs(): for pkg in repo.pkgcache: for name in pkg.replaces: - if common.format_pkg_name(name) in installed_pkg_name: - if not common.format_pkg_name(name) in to_remove: - to_remove.append(common.format_pkg_name(name)) + if name in installed_pkg_name: + if not name in to_remove: + to_remove.append(name) if warning: warning = warning+'\n' - warning = warning+common.format_pkg_name(name)+' will be replaced by '+pkg.name + warning = warning+name+' will be replaced by '+pkg.name if not pkg.name in to_add: to_add.append(pkg.name) if warning: diff --git a/pamac/tray.py b/pamac/tray.py index db94835..edef79b 100755 --- a/pamac/tray.py +++ b/pamac/tray.py @@ -5,6 +5,8 @@ from gi.repository import Gtk from pamac import transaction, updater, manager +already_manager = False + class Tray: def __init__(self, icon, info): self.icon = icon @@ -32,7 +34,13 @@ class Tray: updater.main() def execute_manager(self, widget, event, data = None): - manager.main() + global already_manager + if already_manager: + manager.MainWindow.show_all() + print('show') + else: + manager.main() + already_manager = True def quit_tray(self, widget, data = None): Gtk.main_quit() diff --git a/start-pamac-daemon b/start-pamac-daemon index 375ea78..5b835e1 100755 --- a/start-pamac-daemon +++ b/start-pamac-daemon @@ -1,3 +1,3 @@ #! /bin/sh -/usr/lib/python3.3/site-packages/pamac/pamac-daemon.py & +/usr/bin/python /usr/lib/python3.3/site-packages/pamac/pamac-daemon.py & diff --git a/tray b/tray deleted file mode 100755 index 260c2f2..0000000 --- a/tray +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -/usr/lib/python3.3/site-packages/pamac/tray.py