]> git.pld-linux.org Git - packages/gnome-settings-daemon.git/blob - use-etc-sysconfig-timezone.patch
Fix -updates deps. Release 2
[packages/gnome-settings-daemon.git] / use-etc-sysconfig-timezone.patch
1 diff -urN gnome-settings-daemon-2.91.91/plugins/datetime/system-timezone.c gnome-settings-daemon-2.91.91.new//plugins/datetime/system-timezone.c
2 --- gnome-settings-daemon-2.91.91/plugins/datetime/system-timezone.c    2011-03-02 18:13:27.000000000 +0000
3 +++ gnome-settings-daemon-2.91.91.new//plugins/datetime/system-timezone.c       2011-03-16 21:20:28.720003184 +0000
4 @@ -55,12 +55,13 @@
5  #include "system-timezone.h"
6  
7  /* Files that we look at */
8 -#define ETC_TIMEZONE        "/etc/timezone"
9 -#define ETC_TIMEZONE_MAJ    "/etc/TIMEZONE"
10 -#define ETC_RC_CONF         "/etc/rc.conf"
11 -#define ETC_SYSCONFIG_CLOCK "/etc/sysconfig/clock"
12 -#define ETC_CONF_D_CLOCK    "/etc/conf.d/clock"
13 -#define ETC_LOCALTIME       "/etc/localtime"
14 +#define ETC_TIMEZONE           "/etc/timezone"
15 +#define ETC_TIMEZONE_MAJ       "/etc/TIMEZONE"
16 +#define ETC_RC_CONF            "/etc/rc.conf"
17 +#define ETC_SYSCONFIG_CLOCK    "/etc/sysconfig/clock"
18 +#define ETC_SYSCONFIG_TIMEZONE "/etc/sysconfig/timezone"
19 +#define ETC_CONF_D_CLOCK       "/etc/conf.d/clock"
20 +#define ETC_LOCALTIME          "/etc/localtime"
21  
22  /* The first 4 characters in a timezone file, from tzfile.h */
23  #define TZ_MAGIC "TZif"
24 @@ -198,6 +199,7 @@
25   *    openSUSE: the TIMEZONE key in /etc/sysconfig/clock
26   *    Solaris/OpenSolaris: the TZ key in /etc/TIMEZONE
27   *    Arch Linux: the TIMEZONE key in /etc/rc.conf
28 + *    PLD Linux: the TIMEZONE key in /etc/sysconfig/timezone
29   *    Gentoo (old): the ZONE key in /etc/conf.d/clock
30   *
31   *    FIXME: reading the system-tools-backends, it seems there's this too:
32 @@ -472,6 +474,22 @@
33                                                 "TIMEZONE", tz, error);
34  }
35  
36 +/* This works for PLD Linux */
37 +static char *
38 +system_timezone_read_etc_sysconfig_timezone (void)
39 +{
40 +       return system_timezone_read_key_file (ETC_SYSCONFIG_TIMEZONE,
41 +                                             "TIMEZONE");
42 +}
43 +
44 +static gboolean
45 +system_timezone_write_etc_sysconfig_timezone (const char *tz,
46 +                                              GError **error)
47 +{
48 +       return system_timezone_write_key_file (ETC_SYSCONFIG_TIMEZONE,
49 +                                              "TIMEZONE", tz, error);
50 +}
51 +
52  /* This works for Arch Linux */
53  static char *
54  system_timezone_read_etc_rc_conf (void)
55 @@ -696,6 +713,7 @@
56          system_timezone_read_etc_timezone,
57          system_timezone_read_etc_sysconfig_clock,
58          system_timezone_read_etc_sysconfig_clock_alt,
59 +        system_timezone_read_etc_sysconfig_timezone,
60          system_timezone_read_etc_TIMEZONE,
61          system_timezone_read_etc_rc_conf,
62          /* reading deprecated config files */
63 @@ -866,6 +884,7 @@
64          system_timezone_write_etc_timezone,
65          system_timezone_write_etc_sysconfig_clock,
66          system_timezone_write_etc_sysconfig_clock_alt,
67 +        system_timezone_write_etc_sysconfig_timezone,
68          system_timezone_write_etc_TIMEZONE,
69          system_timezone_write_etc_rc_conf,
70          /* writing deprecated config files if they exist and have the
This page took 0.02649 seconds and 3 git commands to generate.