Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 566903 Details for
Bug 799074
Use package-kit to install dependencies
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh92 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch which uses package-kit to install dependencies
authconfig-package-kit.patch (text/plain), 3.05 KB, created by
Stef Walter
on 2012-03-01 18:04:20 UTC
(
hide
)
Description:
Patch which uses package-kit to install dependencies
Filename:
MIME Type:
Creator:
Stef Walter
Created:
2012-03-01 18:04:20 UTC
Size:
3.05 KB
patch
obsolete
>diff -r f8cc17c94fb6 authconfig-gtk.py >--- a/authconfig-gtk.py Sat Feb 18 12:05:46 2012 +0100 >+++ b/authconfig-gtk.py Thu Mar 01 19:02:13 2012 +0100 >@@ -27,6 +27,7 @@ > import gettext, os, signal, sys > _ = gettext.lgettext > import locale >+import dbus > > locale.setlocale(locale.LC_ALL, '') > >@@ -67,6 +68,9 @@ > > import msgarea > >+from dbus.mainloop.glib import DBusGMainLoop >+DBusGMainLoop(set_as_default=True) >+ > class Authconfig: > def __init__(self): > self.runPriority = 45 >@@ -471,14 +475,28 @@ > return bool(ldaptls.get_active() or > 'ldaps:' in ldapserver.get_text()) > >- def display_msgctrl(self, text): >+ # >+ # if a 'fix' button is desired, use button_label and button_action >+ # button_action is a function object. >+ # >+ def display_msgctrl(self, text, button_label=None, button_action=None): > apply = self.xml.get_widget('apply') > apply.set_sensitive(False) > if self.msgctrl == None: > self.msgctrl = msgarea.MsgAreaController() > self.xml.get_widget('idauthpage').pack_start(self.msgctrl) > self.xml.get_widget('idauthpage').reorder_child(self.msgctrl, 0) >- self.msgctrl.new_from_text_and_icon(gtk.STOCK_DIALOG_ERROR, text) >+ area = self.msgctrl.new_from_text_and_icon(gtk.STOCK_DIALOG_ERROR, text) >+ >+ # Create a "fix this" action button for the message >+ if button_label: >+ button = None >+ def on_area_response(self, respid): >+ if respid == gtk.RESPONSE_YES: >+ button_action() >+ button = area.add_button(button_label, gtk.RESPONSE_YES) >+ area.connect("response", on_area_response) >+ > self.xml.get_widget('idauthpage').show_all() > apply.set_tooltip_markup("<span color='dark red'>%s</span>" % text) > >@@ -510,6 +528,25 @@ > text = _("Use the \"Join Domain\" button to join the IPAv2 domain.") > self.display_msgctrl(text) > >+ def install_package(self, package): >+ parent=self.xml.get_widget('authconfig') >+ >+ def error_handler(exception): >+ pass >+ def reply_handler(): >+ self.clear_msgctrl() >+ >+ try: >+ bus = dbus.SessionBus() >+ proxy = bus.get_object('org.freedesktop.PackageKit', '/org/freedesktop/PackageKit') >+ iface = dbus.Interface(proxy, 'org.freedesktop.PackageKit.Modify') >+ iface.InstallPackageNames(dbus.UInt32(parent.window.xid), [package], >+ "show-confirm-search, show-confirm-deps, hide-finished", >+ error_handler=error_handler, >+ reply_handler=reply_handler) >+ except dbus.DBusException, e: >+ self.display_msgctl("Failure using package kit: %s" % str(e)) >+ > def missing_package(self, path, service, package): > if type(path) == tuple: > if self.info.sssdSupported(): >@@ -524,7 +561,9 @@ > self.clear_msgctrl() > except: > text = _("The %s file was not found, but it is required for %s support to work properly.\nInstall the %s package, which provides this file.") >- self.display_msgctrl(text % (path, service, package)) >+ self.display_msgctrl(text % (path, service, package), >+ button_label="Install", >+ button_action=lambda:self.install_package(package)) > return True > return False >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 799074
: 566903