hot fixes

This commit is contained in:
guinux 2013-02-02 14:02:18 +01:00
parent 1909911197
commit c57bf16d37
9 changed files with 29 additions and 21 deletions

View File

@ -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

View File

@ -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

View File

@ -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

3
pamac-tray Executable file
View File

@ -0,0 +1,3 @@
#! /bin/sh
/usr/bin/python /usr/lib/python3.3/site-packages/pamac/tray.py

View File

@ -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

View File

@ -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:

View File

@ -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()

View File

@ -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 &

3
tray
View File

@ -1,3 +0,0 @@
#! /bin/sh
/usr/lib/python3.3/site-packages/pamac/tray.py