r26156 - in /desktop/experimental/glib2.0/debian: changelog control patches/62_dont_crash_without_desktop_filename.patch patches/series

sjoerd at users.alioth.debian.org sjoerd at users.alioth.debian.org
Fri Jan 7 10:47:01 UTC 2011


Author: sjoerd
Date: Fri Jan  7 10:47:00 2011
New Revision: 26156

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=26156
Log:
* debian/patches/62_dont_crash_without_desktop_filename.patch
  * Added. Fix crash when launching application without a desktop file (From
    upstream git)

Added:
    desktop/experimental/glib2.0/debian/patches/62_dont_crash_without_desktop_filename.patch
Modified:
    desktop/experimental/glib2.0/debian/changelog
    desktop/experimental/glib2.0/debian/control
    desktop/experimental/glib2.0/debian/patches/series

Modified: desktop/experimental/glib2.0/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/glib2.0/debian/changelog?rev=26156&op=diff
==============================================================================
--- desktop/experimental/glib2.0/debian/changelog [utf-8] (original)
+++ desktop/experimental/glib2.0/debian/changelog [utf-8] Fri Jan  7 10:47:00 2011
@@ -1,3 +1,11 @@
+glib2.0 (2.27.90-2) UNRELEASED; urgency=low
+
+  * debian/patches/62_dont_crash_without_desktop_filename.patch
+    * Added. Fix crash when launching application without a desktop file (From
+      upstream git)
+
+ -- Sjoerd Simons <sjoerd at debian.org>  Fri, 07 Jan 2011 10:45:59 +0000
+
 glib2.0 (2.27.90-1) experimental; urgency=low
 
   * Switch to CDBS' flavors system.

Modified: desktop/experimental/glib2.0/debian/control
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/glib2.0/debian/control?rev=26156&op=diff
==============================================================================
--- desktop/experimental/glib2.0/debian/control [utf-8] (original)
+++ desktop/experimental/glib2.0/debian/control [utf-8] Fri Jan  7 10:47:00 2011
@@ -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>, Emilio Pozuelo Monfort <pochu 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>, Sebastian Dröge <slomo at debian.org>, Sjoerd Simons <sjoerd at debian.org>
 Build-Depends: debhelper (>> 5.0.22),
                cdbs (>= 0.4.90),
                pkg-config (>= 0.16.0),

Added: desktop/experimental/glib2.0/debian/patches/62_dont_crash_without_desktop_filename.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/glib2.0/debian/patches/62_dont_crash_without_desktop_filename.patch?rev=26156&op=file
==============================================================================
--- desktop/experimental/glib2.0/debian/patches/62_dont_crash_without_desktop_filename.patch (added)
+++ desktop/experimental/glib2.0/debian/patches/62_dont_crash_without_desktop_filename.patch [utf-8] Fri Jan  7 10:47:00 2011
@@ -1,0 +1,75 @@
+From e738a8dd8ca3d3dd327bc5a3bbfd151858738609 Mon Sep 17 00:00:00 2001
+From: Colin Walters <walters at verbum.org>
+Date: Thu, 6 Jan 2011 11:47:58 -0500
+Subject: [PATCH] gdesktopappinfo: Don't crash if we don't have a desktop filename
+
+If code creates a GDesktopAppInfo via g_desktop_app_info_new_from_keyfile(),
+we'd try to send a NULL pointer down into GVariant.
+
+Since in this case we don't have a filename, just send the empty
+string.  In the future we should either:
+
+1) Change panel to use g_desktop_app_info_new_from_filename(), and
+   take the hit of parsing the file twice.
+2) Add a g_key_file_get_origin_filename()
+3) Add g_desktop_app_info_new_from_keyfile_and_name()
+
+https://bugzilla.gnome.org/show_bug.cgi?id=638838
+---
+ gio/gdesktopappinfo.c |   14 +++++++++++---
+ 1 files changed, 11 insertions(+), 3 deletions(-)
+
+diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
+index c808796..f557538 100644
+--- a/gio/gdesktopappinfo.c
++++ b/gio/gdesktopappinfo.c
+@@ -932,7 +932,7 @@ child_setup (gpointer user_data)
+ 
+ static void
+ notify_desktop_launch (GDBusConnection  *session_bus,
+-		       const char       *desktop_file, /* filename */
++		       GDesktopAppInfo  *info,
+ 		       long              pid,
+ 		       const char       *display,
+ 		       const char       *sn_id,
+@@ -942,6 +942,7 @@ notify_desktop_launch (GDBusConnection  *session_bus,
+   GVariantBuilder uri_variant;
+   GVariantBuilder extras_variant;
+   GList *iter;
++  const char *desktop_file_id;
+ 
+   if (session_bus == NULL)
+     return;
+@@ -956,12 +957,19 @@ notify_desktop_launch (GDBusConnection  *session_bus,
+ 			   "startup-id",
+ 			   g_variant_new ("s",
+ 					  sn_id));
++
++  if (info->filename)
++    desktop_file_id = info->filename;
++  else if (info->desktop_id)
++    desktop_file_id = info->desktop_id;
++  else
++    desktop_file_id = "";
+   
+   msg = g_dbus_message_new_signal ("/org/gtk/gio/DesktopAppInfo",
+ 				   "org.gtk.gio.DesktopAppInfo",
+ 				   "Launched");
+   g_dbus_message_set_body (msg, g_variant_new ("(@aysxasa{sv})",
+-					       g_variant_new_bytestring (desktop_file),
++					       g_variant_new_bytestring (desktop_file_id),
+ 					       display ? display : "",
+ 					       (gint64)pid,
+ 					       &uri_variant,
+@@ -1069,7 +1077,7 @@ _g_desktop_app_info_launch_uris_internal (GAppInfo                   *appinfo,
+ 	pid_callback (info, pid, pid_callback_data);
+ 
+       notify_desktop_launch (session_bus,
+-			     info->filename,
++			     info,
+ 			     pid,
+ 			     data.display,
+ 			     data.sn_id,
+-- 
+1.7.2.3
+

Modified: desktop/experimental/glib2.0/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/glib2.0/debian/patches/series?rev=26156&op=diff
==============================================================================
--- desktop/experimental/glib2.0/debian/patches/series [utf-8] (original)
+++ desktop/experimental/glib2.0/debian/patches/series [utf-8] Fri Jan  7 10:47:00 2011
@@ -4,3 +4,4 @@
 04_homedir_env.patch
 60_wait-longer-for-threads-to-die.patch
 61_glib-compile-schemas-path.patch
+62_dont_crash_without_desktop_filename.patch




More information about the pkg-gnome-commits mailing list