SHA256
1
0
forked from pool/gdm

Accepting request 535347 from home:xiaoguang_wang:branches:GNOME:Factory

- Add gdm-ignore-duplicate-session.patch: Fix gdm session entries
  duplicate (bsc#1060627).

OBS-URL: https://build.opensuse.org/request/show/535347
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gdm?expand=0&rev=358
This commit is contained in:
Dominique Leuenberger 2017-10-20 14:36:35 +00:00 committed by Git OBS Bridge
parent 0619995565
commit 0cc57efb47
3 changed files with 53 additions and 0 deletions

View File

@ -0,0 +1,44 @@
diff --git a/libgdm/gdm-sessions.c b/libgdm/gdm-sessions.c
index 4a5434ed..08829f6f 100644
--- a/libgdm/gdm-sessions.c
+++ b/libgdm/gdm-sessions.c
@@ -184,9 +184,22 @@ collect_sessions_from_directory (const char *dirname)
g_dir_close (dir);
}
+static gboolean
+find_translated_name (const char *id,
+ GdmSessionFile *session,
+ char *translated_name)
+{
+ if (g_str_equal (id, "default"))
+ return FALSE;
+
+ return g_str_equal (session->translated_name, translated_name) ? TRUE : FALSE;
+}
+
static void
collect_sessions (void)
{
+ GdmSessionFile *session;
+ char *translated_name = NULL;
int i;
const char *xorg_search_dirs[] = {
"/etc/X11/sessions/",
@@ -223,6 +236,16 @@ collect_sessions (void)
collect_sessions_from_directory (wayland_search_dirs [i]);
}
#endif
+
+ session = g_hash_table_lookup (gdm_available_sessions_map, "default");
+ if (session)
+ translated_name = session->translated_name;
+
+ if (translated_name) {
+ session = g_hash_table_find (gdm_available_sessions_map, (GHRFunc)find_translated_name, translated_name);
+ if (session)
+ g_hash_table_remove (gdm_available_sessions_map, session->id);
+ }
}
/**

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Oct 18 06:37:37 UTC 2017 - xwang@suse.com
- Add gdm-ignore-duplicate-session.patch: Fix gdm session entries
duplicate (bsc#1060627).
-------------------------------------------------------------------
Thu Oct 12 08:55:56 UTC 2017 - dimstar@opensuse.org

View File

@ -56,6 +56,8 @@ Patch9: gdm-passwordless-login.patch
Patch34: gdm-default-wm.patch
# PATCH-FIX-OPENSUSE gdm-xauthlocalhostname.patch bnc#538064 vuntz@novell.com -- Set XAUTHLOCALHOSTNAME to current hostname when we authenticate, for local logins, to avoid issues in the session in case the hostname changes later one. See comment 24 in the bug.
Patch35: gdm-xauthlocalhostname.patch
# PATCH-FIX-OPENSUSE gdm-ignore-duplicate-session.patch xwang@suse.com -- gdm sessions entries duplicate
Patch36: gdm-ignore-duplicate-session.patch
# PATCH-FIX-UPSTREAM gdm-plymouth-vt1.patch bnc#881676 fcrozat@suse.com -- switch to VT1 when quitting if gdm was starting with plymouth running
Patch41: gdm-plymouth-vt1.patch
# PATCH-FIX-UPSTREAM gdm-fails-to-restart-gnome-shell.patch bsc#981976 bgo#769969 tyang@suse.com -- Gdm should stop after a few times fails
@ -199,6 +201,7 @@ translation-update-upstream
%patch9 -p1
%patch34 -p1
%patch35 -p1
%patch36 -p1
%patch41 -p1
%patch42 -p1
%if !0%{?is_opensuse}