rpms/gnome-disk-utility/devel 0001-for-now-prepend-the-D-Bus-error-name-to-the-error-s.patch, NONE, 1.1 gnome-disk-utility.spec, 1.7, 1.8

David Zeuthen davidz at fedoraproject.org
Wed Apr 8 16:12:08 UTC 2009


Author: davidz

Update of /cvs/pkgs/rpms/gnome-disk-utility/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11702

Modified Files:
	gnome-disk-utility.spec 
Added Files:
	0001-for-now-prepend-the-D-Bus-error-name-to-the-error-s.patch 
Log Message:
* Wed Apr 08 2009 David Zeuthen <davidz at redhat.com> - 0.3-0.2.20090406git%{?dist}
- Fix bug in detecting when a PolicyKit error is returned (#494787)



0001-for-now-prepend-the-D-Bus-error-name-to-the-error-s.patch:

--- NEW FILE 0001-for-now-prepend-the-D-Bus-error-name-to-the-error-s.patch ---
>From 53cf4a6635586e68c7a45030b381bc98d4f9eb1c Mon Sep 17 00:00:00 2001
From: David Zeuthen <davidz at redhat.com>
Date: Wed, 8 Apr 2009 12:04:17 -0400
Subject: [PATCH] for now, prepend the D-Bus error name to the error string from the daemon

This is hidden behind a GtkExpander so it's not exactly a big deal. As
noted we can removed this once we port to PolicyKit 1.0.
---
 src/gdu/gdu-error.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/gdu/gdu-error.c b/src/gdu/gdu-error.c
index 956c61c..992c4d8 100644
--- a/src/gdu/gdu-error.c
+++ b/src/gdu/gdu-error.c
@@ -57,6 +57,7 @@ _gdu_error_fixup (GError *error)
 {
         const char *name;
         gboolean matched;
+        gchar *s;
 
         if (error == NULL)
                 return;
@@ -89,6 +90,14 @@ _gdu_error_fixup (GError *error)
 
         if (matched)
                 error->domain = GDU_ERROR;
+
+        /* Always prepend the D-Bus exception name to the message; we need this in
+         * gdu_error_check_polkit_not_authorized() to determine if it's a PolicyKit
+         * exception... when we port to polkit 1.0 this can go away.
+         */
+        s = g_strdup_printf ("%s: %s", name, error->message);
+        g_free (error->message);
+        error->message = s;
 }
 
 /**
-- 
1.6.2.2



Index: gnome-disk-utility.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gnome-disk-utility/devel/gnome-disk-utility.spec,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- gnome-disk-utility.spec	7 Apr 2009 00:30:46 -0000	1.7
+++ gnome-disk-utility.spec	8 Apr 2009 16:11:38 -0000	1.8
@@ -12,7 +12,7 @@
 Summary: Disk management application
 Name: gnome-disk-utility
 Version: 0.3
-Release: 0.1.20090406git%{?dist}
+Release: 0.2.20090406git%{?dist}
 License: LGPLv2+
 Group: System Environment/Libraries
 URL: http://git.gnome.org/cgit/gnome-disk-utility
@@ -36,6 +36,8 @@
 Requires(post): scrollkeeper
 Requires(postun): scrollkeeper
 
+Patch0: 0001-for-now-prepend-the-D-Bus-error-name-to-the-error-s.patch
+
 %description
 This package contains the Palimpsest disk management application.
 Palimpsest supports partitioning, file system creation, encryption,
@@ -89,6 +91,7 @@
 
 %prep
 %setup -q
+%patch0 -p1 -b .gdu-polkit-authz
 
 %build
 %configure
@@ -196,6 +199,9 @@
 %{_includedir}/gnome-disk-utility/gdu-gtk/*
 
 %changelog
+* Wed Apr 08 2009 David Zeuthen <davidz at redhat.com> - 0.3-0.2.20090406git%{?dist}
+- Fix bug in detecting when a PolicyKit error is returned (#494787)
+
 * Mon Apr 06 2009 David Zeuthen <davidz at redhat.com> - 0.3-0.1.20090406git%{?dist}
 - New snapshot
 




More information about the scm-commits mailing list