[accountsservice/f16] Fix resetting user icons

Matthias Clasen mclasen at fedoraproject.org
Wed Nov 30 04:16:16 UTC 2011


commit 73c361cbdde5db0f5333fe4d834ea4f90bc04a44
Author: Matthias Clasen <mclasen at redhat.com>
Date:   Tue Nov 29 23:15:53 2011 -0500

    Fix resetting user icons

 ...re-careful-when-resetting-the-users-icons.patch |   29 ++++++++++++++++++++
 accountsservice.spec                               |    8 +++++-
 2 files changed, 36 insertions(+), 1 deletions(-)
---
diff --git a/0001-Be-more-careful-when-resetting-the-users-icons.patch b/0001-Be-more-careful-when-resetting-the-users-icons.patch
new file mode 100644
index 0000000..a080010
--- /dev/null
+++ b/0001-Be-more-careful-when-resetting-the-users-icons.patch
@@ -0,0 +1,29 @@
+From 726343c9b597256c523c920b39a83b66f5b5f86a Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen at redhat.com>
+Date: Tue, 29 Nov 2011 23:07:38 -0500
+Subject: [PATCH] Be more careful when resetting the users icons
+
+When the current icon is in /usr/share, and we reset the
+icon, we try to delete a nonexisting icon file in
+/var/lib/AccountsService/icons. Deal with this eventuality.
+---
+ src/user.c |    3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/src/user.c b/src/user.c
+index e0e9445..fbc91be 100644
+--- a/src/user.c
++++ b/src/user.c
+@@ -1397,7 +1397,8 @@ user_change_icon_file_authorized_cb (Daemon                *daemon,
+                 g_free (dest_path);
+ 
+                 error = NULL;
+-                if (!g_file_delete (dest, NULL, &error)) {
++                if (!g_file_delete (dest, NULL, &error) &&
++                    !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND)) {
+                         g_object_unref (dest);
+                         throw_error (context, ERROR_FAILED, "failed to remove user icon, %s", error->message);
+                         g_error_free (error);
+-- 
+1.7.7.3
+
diff --git a/accountsservice.spec b/accountsservice.spec
index 8a452b7..daecf54 100644
--- a/accountsservice.spec
+++ b/accountsservice.spec
@@ -1,7 +1,7 @@
 
 Name:           accountsservice
 Version:        0.6.15
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        D-Bus interfaces for querying and manipulating user account information
 
 Group:          System Environment/Daemons
@@ -20,6 +20,8 @@ BuildRequires:  gobject-introspection-devel
 Requires:       polkit
 Requires:       shadow-utils
 
+Patch0: 0001-Be-more-careful-when-resetting-the-users-icons.patch
+
 %package libs
 Summary: Client-side library to talk to accountservice
 Group: Development/Libraries
@@ -49,6 +51,7 @@ of these interfaces, based on the useradd, usermod and userdel commands.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %configure
@@ -87,6 +90,9 @@ rm $RPM_BUILD_ROOT%{_libdir}/*.a
 %{_datadir}/gir-1.0/AccountsService-1.0.gir
 
 %changelog
+* Tue Nov 29 2011 Matthias Clasen <mclasen at redhat.com> 0.6.15-2
+- Make resetting user icons work
+
 * Tue Nov 15 2011 Ray Strode <rstrode at redhat.com> 0.6.15-1
 - Update to 0.6.15
 - Fixes session chooser at login screen when logged into vt


More information about the scm-commits mailing list