- apply upstream patch from Brady Anderson <brady.anderson@gmail.com> to

fix writing out .dmrc file when setting default language (upstream bug
    453916)
This commit is contained in:
Ray Strode 2007-10-01 16:54:31 +00:00
parent 73864c50be
commit c4ad52b0da
2 changed files with 35 additions and 1 deletions

View File

@ -0,0 +1,25 @@
--- gdm-2.20.0/daemon/gdm-daemon-config.c 2007-09-19 16:40:33.000000000 -0600
+++ gdm-2.20.0/daemon/gdm-daemon-config.c 2007-09-19 16:17:30.000000000 -0600
@@ -2846,10 +2846,20 @@
gchar *cfgstr;
cfgstr = g_build_filename (home_dir, ".dmrc", NULL);
-
dmrc = gdm_common_config_load (cfgstr, NULL);
if (dmrc == NULL) {
- return;
+ gint fd = -1;
+ gdm_debug ("file: %s does not exist - creating it", cfgstr);
+ VE_IGNORE_EINTR (fd = g_open (cfgstr, O_CREAT | O_TRUNC | O_RDWR, 0644));
+ if (fd < 0) return;
+ write (fd, "\n", 2);
+ close (fd);
+ dmrc = gdm_common_config_load (cfgstr, NULL);
+ if (dmrc == NULL) {
+ gdm_debug ("failed to open %s after creating it", cfgstr);
+ return;
+ }
+
}
if (savesess) {

View File

@ -16,7 +16,7 @@
Summary: The GNOME Display Manager
Name: gdm
Version: 2.20.0
Release: 9%{?dist}
Release: 10%{?dist}
Epoch: 1
License: GPLv2+
Group: User Interface/X
@ -61,6 +61,9 @@ Patch38: hang.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=473480
Patch39: gdm-2.20.0-fix-savedie.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=453916
Patch40: gdm-2.20.0-fix-default-language.patch
Patch100: gdm-2.20.0-change-defaults.patch
Patch101: stupid-bullets.patch
@ -148,6 +151,7 @@ Extra icons / faces for the GNOME Display Manager.
%patch37 -p1 -b .selinux
%patch38 -p1 -b .hang
%patch39 -p1 -b .fix-savedie
%patch40 -p1 -b .fix-default-language
%patch100 -p1 -b .change-defaults
%patch101 -p1 -b .stupid-bullets
@ -361,6 +365,11 @@ fi
%{_datadir}/pixmaps/faces/extras/*.jpg
%changelog
* Mon Oct 1 2007 Ray Strode <rstrode@redhat.com> - 1:2.20.0-10
- apply upstream patch from Brady Anderson <brady.anderson@gmail.com>
to fix writing out .dmrc file when setting default language
(upstream bug 453916)
* Fri Sep 28 2007 Ray Strode <rstrode@redhat.com> - 1:2.20.0-9
- drop redhat-artwork dep, add fedorainfinity-gdm-theme dep