r22685 - in /desktop/unstable/glib2.0/debian: changelog control patches/05_timeval_initialize_variable.patch patches/06_revert_g_set_prgname_change.patch patches/series

pochu at users.alioth.debian.org pochu at users.alioth.debian.org
Wed Dec 23 20:18:26 UTC 2009


Author: pochu
Date: Wed Dec 23 20:18:26 2009
New Revision: 22685

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=22685
Log:
* debian/patches/05_timeval_initialize_variable.patch:
  - Patch from upstream git, initialize a variable in
    g_time_val_from_iso8601() to stop returning wrong results.
    Thanks to Ryan Niebur. Closes: #558099.
* debian/patches/06_revert_g_set_prgname_change.patch:
  - Patch from upstream git, revert a change in g_set_prgname() that
    made it spit warnings if called more than once. Closes: #559407.

Added:
    desktop/unstable/glib2.0/debian/patches/05_timeval_initialize_variable.patch
    desktop/unstable/glib2.0/debian/patches/06_revert_g_set_prgname_change.patch
Modified:
    desktop/unstable/glib2.0/debian/changelog
    desktop/unstable/glib2.0/debian/control
    desktop/unstable/glib2.0/debian/patches/series

Modified: desktop/unstable/glib2.0/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/glib2.0/debian/changelog?rev=22685&op=diff
==============================================================================
--- desktop/unstable/glib2.0/debian/changelog [utf-8] (original)
+++ desktop/unstable/glib2.0/debian/changelog [utf-8] Wed Dec 23 20:18:26 2009
@@ -1,3 +1,15 @@
+glib2.0 (2.22.3-2) UNRELEASED; urgency=low
+
+  * debian/patches/05_timeval_initialize_variable.patch:
+    - Patch from upstream git, initialize a variable in
+      g_time_val_from_iso8601() to stop returning wrong results.
+      Thanks to Ryan Niebur. Closes: #558099.
+  * debian/patches/06_revert_g_set_prgname_change.patch:
+    - Patch from upstream git, revert a change in g_set_prgname() that
+      made it spit warnings if called more than once. Closes: #559407.
+
+ -- Emilio Pozuelo Monfort <pochu at debian.org>  Wed, 23 Dec 2009 20:47:49 +0100
+
 glib2.0 (2.22.3-1) unstable; urgency=low
 
   [ Loïc Minier ]

Modified: desktop/unstable/glib2.0/debian/control
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/glib2.0/debian/control?rev=22685&op=diff
==============================================================================
--- desktop/unstable/glib2.0/debian/control [utf-8] (original)
+++ desktop/unstable/glib2.0/debian/control [utf-8] Wed Dec 23 20:18:26 2009
@@ -2,7 +2,7 @@
 Section: libs
 Priority: optional
 Maintainer: Loic Minier <lool at dooz.org>
-Uploaders: Debian GNOME Maintainers <pkg-gnome-maintainers at lists.alioth.debian.org>, Josselin Mouette <joss at debian.org>, Sebastian Dröge <slomo at debian.org>
+Uploaders: Debian GNOME Maintainers <pkg-gnome-maintainers at lists.alioth.debian.org>, Emilio Pozuelo Monfort <pochu at debian.org>, Josselin Mouette <joss at debian.org>, Sebastian Dröge <slomo at debian.org>
 Build-Depends: debhelper (>> 5.0.22),
                pkg-config (>= 0.14.0),
                gettext,

Added: desktop/unstable/glib2.0/debian/patches/05_timeval_initialize_variable.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/glib2.0/debian/patches/05_timeval_initialize_variable.patch?rev=22685&op=file
==============================================================================
--- desktop/unstable/glib2.0/debian/patches/05_timeval_initialize_variable.patch (added)
+++ desktop/unstable/glib2.0/debian/patches/05_timeval_initialize_variable.patch [utf-8] Wed Dec 23 20:18:26 2009
@@ -1,0 +1,53 @@
+From 3a7a950b2b912d0c22ce1208b883128077319d1e Mon Sep 17 00:00:00 2001
+From: Matthew W. S. Bell <matthew at bells23.org.uk>
+Date: Wed, 02 Dec 2009 00:48:30 +0000
+Subject: Initialise variable in g_time_val_from_iso8601()
+
+The function does not initialise the struct tm,
+giving it improper values of tm_isdst making the result
+an hour out.
+
+Fixes https://bugzilla.gnome.org/show_bug.cgi?id=603540
+(cherry picked from commit 2321e5aed07154761223bb124770beba56700e41)
+---
+diff --git a/glib/gtimer.c b/glib/gtimer.c
+index 407ce85..cd6a082 100644
+--- a/glib/gtimer.c
++++ b/glib/gtimer.c
+@@ -301,7 +301,7 @@ gboolean
+ g_time_val_from_iso8601 (const gchar *iso_date,
+ 			 GTimeVal    *time_)
+ {
+-  struct tm tm;
++  struct tm tm = {0};
+   long val;
+ 
+   g_return_val_if_fail (iso_date != NULL, FALSE);
+@@ -328,7 +328,7 @@ g_time_val_from_iso8601 (const gchar *iso_date,
+       tm.tm_mon = strtoul (iso_date, (char **)&iso_date, 10) - 1;
+       
+       if (*iso_date++ != '-')
+-       	return FALSE;
++        return FALSE;
+       
+       tm.tm_mday = strtoul (iso_date, (char **)&iso_date, 10);
+     }
+@@ -390,7 +390,7 @@ g_time_val_from_iso8601 (const gchar *iso_date,
+       val = strtoul (iso_date + 1, (char **)&iso_date, 10);
+       
+       if (*iso_date == ':')
+-	val = 60 * val + strtoul (iso_date + 1, (char **)&iso_date, 10);
++        val = 60 * val + strtoul (iso_date + 1, (char **)&iso_date, 10);
+       else
+         val = 60 * (val / 100) + (val % 100);
+ 
+@@ -399,6 +399,7 @@ g_time_val_from_iso8601 (const gchar *iso_date,
+   else
+     {
+       /* No "Z" or offset, so local time */
++      tm.tm_isdst = -1; /* locale selects DST */
+       time_->tv_sec = mktime (&tm);
+     }
+ 
+--
+cgit v0.8.3.1

Added: desktop/unstable/glib2.0/debian/patches/06_revert_g_set_prgname_change.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/glib2.0/debian/patches/06_revert_g_set_prgname_change.patch?rev=22685&op=file
==============================================================================
--- desktop/unstable/glib2.0/debian/patches/06_revert_g_set_prgname_change.patch (added)
+++ desktop/unstable/glib2.0/debian/patches/06_revert_g_set_prgname_change.patch [utf-8] Wed Dec 23 20:18:26 2009
@@ -1,0 +1,51 @@
+From 84e791e580c3a16d628c8161a92a0652aa94b294 Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen at redhat.com>
+Date: Mon, 21 Dec 2009 14:11:23 +0000
+Subject: Revert the g_set_prgname change
+
+This change breaks our API and causes warnings from essentially all applications.
+See bug 563627.
+---
+diff --git a/glib/gutils.c b/glib/gutils.c
+index b5e9c19..744663e 100644
+--- a/glib/gutils.c
++++ b/glib/gutils.c
+@@ -1968,17 +1968,10 @@ g_get_prgname (void)
+ void
+ g_set_prgname (const gchar *prgname)
+ {
+-  gboolean already_set = FALSE;
+-
+   G_LOCK (g_prgname);
+-  if (g_prgname)
+-    already_set = TRUE;
+-  else
+-    g_prgname = g_strdup (prgname);
++  g_free (g_prgname);
++  g_prgname = g_strdup (prgname);
+   G_UNLOCK (g_prgname);
+-
+-  if (already_set)
+-    g_warning ("g_set_prgname() called multiple times");
+ }
+ 
+ G_LOCK_DEFINE_STATIC (g_application_name);
+diff --git a/glib/tests/option-context.c b/glib/tests/option-context.c
+index ac1df67..913ad5c 100644
+--- a/glib/tests/option-context.c
++++ b/glib/tests/option-context.c
+@@ -1770,12 +1770,7 @@ main (int   argc,
+   g_test_add_func ("/context/add", add_test1);
+ 
+   /* Test parsing empty args */
+-#if 0
+-  /* This test relies on being able to call g_set_prgname() more
+-   * than once.
+-   */
+   g_test_add_func ("/context/empty1", empty_test1);
+-#endif
+   g_test_add_func ("/context/empty2", empty_test2);
+   g_test_add_func ("/context/empty3", empty_test3);
+ 
+--
+cgit v0.8.3.1

Modified: desktop/unstable/glib2.0/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/glib2.0/debian/patches/series?rev=22685&op=diff
==============================================================================
--- desktop/unstable/glib2.0/debian/patches/series [utf-8] (original)
+++ desktop/unstable/glib2.0/debian/patches/series [utf-8] Wed Dec 23 20:18:26 2009
@@ -2,4 +2,6 @@
 02_gettext-desktopfiles-ubuntu.patch
 03_blacklist-directories.patch
 04_homedir_env.patch
+05_timeval_initialize_variable.patch
+06_revert_g_set_prgname_change.patch
 60_wait-longer-for-threads-to-die.patch




More information about the pkg-gnome-commits mailing list