Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12:Update
virt-manager
535ff0b7-fix-install-when-one-package-is-alread...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 535ff0b7-fix-install-when-one-package-is-already-installed.patch of Package virt-manager
Subject: packageutils: Fix install when one package is already installed (bz 1090181) From: Cole Robinson crobinso@redhat.com Tue Apr 29 14:34:31 2014 -0400 Date: Tue Apr 29 14:34:31 2014 -0400: Git: 15449eb12601ec1b88aa6d8ee52986ef5ab41ae2 Index: virt-manager-1.0.1/virtManager/packageutils.py =================================================================== --- virt-manager-1.0.1.orig/virtManager/packageutils.py +++ virt-manager-1.0.1/virtManager/packageutils.py @@ -53,7 +53,12 @@ def check_packagekit(parent, errbox, pac return try: - packagekit_install(parent, packages) + for package in packages[:]: + if packagekit_isinstalled(package): + packages.remove(package) + + if packages: + packagekit_install(parent, packages) except Exception, e: # PackageKit frontend should report an error for us, so just log # the actual error @@ -63,6 +68,16 @@ def check_packagekit(parent, errbox, pac return True +def packagekit_isinstalled(package): + bus = Gio.bus_get_sync(Gio.BusType.SESSION, None) + pk_control = Gio.DBusProxy.new_sync(bus, 0, None, + "org.freedesktop.PackageKit", + "/org/freedesktop/PackageKit", + "org.freedesktop.PackageKit.Query", None) + + return pk_control.IsInstalled("(ss)", package, "") + + def packagekit_install(parent, package_list): bus = Gio.bus_get_sync(Gio.BusType.SESSION, None) pk_control = Gio.DBusProxy.new_sync(bus, 0, None,
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor