Package: galeon Version: 2.0.7-1.2+b1 Severity: grave Tags: upstream patch Justification: Causes data loss
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 gnome-session since version 2.26.1 invokes galeon with the --load-session command line option. This causes ~/.galeon/session_crashed.xml to be ignored and the specified session to be restored instead. This means that any session changes since the last clean exit of galeon are lost. I reported this with a patch upstream at https://bugzilla.gnome.org/show_bug.cgi?id=589115 almost exactly eight months ago but nothing's happened since. It would be great if the patch could be included in the Debian package. I'm including it here as well. - -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'stable'), (102, 'experimental') Architecture: powerpc (ppc) Kernel: Linux 2.6.33 Locale: LANG=de_CH.UTF-8, LC_CTYPE=de_CH.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages galeon depends on: ii galeon-common 2.0.7-1.1 data for the galeon web browser ii gconf2 2.28.0-1 GNOME configuration database syste ii libbonobo2-0 2.24.2-1 Bonobo CORBA interfaces library ii libbonoboui2-0 2.24.2-1 The Bonobo UI library ii libc6 2.10.2-6 Embedded GNU C Library: Shared lib ii libgcc1 1:4.4.3-3 GCC support library ii libgconf2-4 2.28.0-1 GNOME configuration database syste ii libglade2-0 1:2.6.4-1 library to load .glade files at ru ii libglib2.0-0 2.22.4-1 The GLib library of C routines ii libgnome-desktop-2-11 2.28.2-1 Utility library for loading .deskt ii libgnome2-0 2.28.0-1 The GNOME library - runtime files ii libgnomeui-0 2.24.2-1 The GNOME libraries (User Interfac ii libgnomevfs2-0 1:2.24.2-2 GNOME Virtual File System (runtime ii libgtk2.0-0 2.18.7-1 The GTK+ graphical user interface ii libnspr4-0d 4.8.4-1 NetScape Portable Runtime Library ii liborbit2 1:2.14.17-2 libraries for ORBit2 - a CORBA ORB ii libpango1.0-0 1.26.2-1 Layout and rendering of internatio ii libpopt0 1.15-1 lib for parsing cmdline parameters ii libstdc++6 4.4.3-3 The GNU Standard C++ Library v3 ii libx11-6 2:1.3.3-2 X11 client-side library ii libxml2 2.7.6.dfsg-2+b1 GNOME XML library ii procps 1:3.2.8-8 /proc file system utilities ii xulrunner-1.9.1 1.9.1.8-5 XUL + XPCOM application runner Versions of packages galeon recommends: ii gnome-control-center 1:2.28.1-2 utilities to configure the GNOME d ii gnome-icon-theme 2.28.0-1 GNOME Desktop icon theme ii iso-codes 3.14-1 ISO language, territory, currency, ii rarian-compat [scrollkee 0.8.1-4.1 Documentation meta-data library (c ii yelp 2.28.0+webkit-2 Help browser for GNOME Versions of packages galeon suggests: pn mozplugger <none> (no description available) - -- debconf information: * galeon/old_config_warning: -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFLoyMHWoGvjmrbsgARAkhOAJwKVT4OTomWijIFm1JbkOgxoW5e0gCfZhn1 OY6etVgBnmhKyNJsgop2Ax8= =IduC -----END PGP SIGNATURE-----
diff -up -ru galeon-2.0.7.orig//src/galeon-main.c galeon-2.0.7/src/galeon-main.c --- galeon-2.0.7.orig//src/galeon-main.c 2009-07-09 16:07:47.000000000 +0200 +++ galeon-2.0.7/src/galeon-main.c 2009-07-11 18:34:59.000000000 +0200 @@ -31,6 +31,7 @@ #include "gul-x11.h" #include "hig-alert.h" #include "GaleonAutomation.h" +#include "session.h" #include <libbonoboui.h> #include <libgnome/gnome-program.h> @@ -379,8 +380,17 @@ galeon_main_start (guint32 user_time) /* load the session if requested */ if (session_filename) { - GNOME_GaleonAutomation_loadSessionWithStartupId - (gaserver, session_filename, user_time, &corba_env); + if (user_time) + { + GNOME_GaleonAutomation_loadSessionWithStartupId + (gaserver, session_filename, user_time, &corba_env); + } + else + { + /* No factory, let session_autoresume() handle it */ + set_gnome_session_filename(session_filename); + } + } /* if found and we're given a bookmark to add... */ else if (bookmark_url != NULL) diff -up -ru galeon-2.0.7.orig//src/session.c galeon-2.0.7/src/session.c --- galeon-2.0.7.orig//src/session.c 2008-07-04 18:30:50.000000000 +0200 +++ galeon-2.0.7/src/session.c 2009-07-11 18:40:35.000000000 +0200 @@ -66,6 +66,7 @@ static void session_dispose (GObject *ob static void session_create_bookmarks (Session *session, const char *filename); static GObjectClass *parent_class = NULL; +static gchar *gnome_session_filename = NULL; /* the GNOME session filename */ #define SESSION_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), \ TYPE_SESSION, SessionPrivate)) @@ -163,6 +164,17 @@ session_class_init (SessionClass *klass) g_type_class_add_private (klass, sizeof (SessionPrivate)); } +void +set_gnome_session_filename (const char *filename) +{ + if (gnome_session_filename) + { + g_free (gnome_session_filename); + } + + gnome_session_filename = g_strdup (filename); +} + static char * get_session_filename (const char *filename) { @@ -186,15 +198,7 @@ get_session_filename (const char *filena } else if (strcmp (filename, SESSION_GNOME) == 0) { - char *tmp; - - save_to = g_build_filename (g_get_home_dir (), - GALEON_DIR, - "session_gnome-XXXXXX", - NULL); - tmp = gul_general_tmp_filename (save_to, "xml"); - g_free (save_to); - save_to = tmp; + save_to = g_strdup (gnome_session_filename); } else { @@ -290,16 +294,34 @@ session_autoresume (Session *session) g_free (saved_session); - saved_session = get_session_filename (SESSION_SAVED); - - if (g_file_test (saved_session, G_FILE_TEST_EXISTS) - && !loaded - && eel_gconf_get_boolean (CONF_GENERAL_ALWAYS_SAVE_SESSION)) + if (!loaded) { - session_load (session, saved_session, 0u); + saved_session = get_session_filename (SESSION_GNOME); + + if (saved_session) + { + if (g_file_test (saved_session, G_FILE_TEST_EXISTS)) + { + session_load (session, saved_session, 0u); + loaded = TRUE; + } + + g_free (saved_session); + } } + + if (!loaded) + { + saved_session = get_session_filename (SESSION_SAVED); + + if (g_file_test (saved_session, G_FILE_TEST_EXISTS) + && eel_gconf_get_boolean (CONF_GENERAL_ALWAYS_SAVE_SESSION)) + { + session_load (session, saved_session, 0u); + } - g_free (saved_session); + g_free (saved_session); + } /* return SESSION_RESUMED, if a window was opened, else SESSION_OK */ return (session->priv->windows != NULL) ? SESSION_RESUMED : SESSION_OK; @@ -327,6 +349,21 @@ save_yourself_cb (GnomeClient *client, if (session_get_windows (session)) { session_file = get_session_filename (SESSION_GNOME); + + if (!session_file) + { + char *tmp; + + session_file = g_build_filename (g_get_home_dir (), + GALEON_DIR, + "session_gnome-XXXXXX", + NULL); + tmp = gul_general_tmp_filename (session_file, "xml"); + g_free (session_file); + session_file = tmp; + set_gnome_session_filename (session_file); + } + discard_argv[2] = session_file; gnome_client_set_discard_command (client, 3, discard_argv); diff -up -ru galeon-2.0.7.orig//src/session.h galeon-2.0.7/src/session.h --- galeon-2.0.7.orig//src/session.h 2008-07-04 18:30:50.000000000 +0200 +++ galeon-2.0.7/src/session.h 2009-07-11 18:40:58.000000000 +0200 @@ -77,6 +77,8 @@ void session_load (Session * void session_save (Session *session, const char *filename); +void set_gnome_session_filename (const char *filename); + SessionResumeType session_autoresume (Session *session); GList *session_get_windows (Session *session);