Paste #rWxn5Up2EdlsaA7hmssP

diff -Nru exo-0.11.0/debian/changelog exo-0.11.0/debian/changelog
exo-0.11.0/debian/changelog [2016-08-12 21:17:15.000000000 -0400]
exo-0.11.0/debian/changelog [2016-08-16 21:52:15.000000000 -0400]
1 exo (0.11.0-0ubuntu1~ppa16.04.1) xenial; urgency=medium
1 exo (0.11.0-0ubuntu1.0) devel; urgency=medium
2
3 * d/p/0001-Correctly_import_user_env.patch: Fix breaking the env.
4
5 -- Unit 193 <unit193@ubuntu.com> Tue, 16 Aug 2016 21:52:00 -0400
6
7 exo (0.11.0-0ubuntu1) devel; urgency=medium
2 8
3 9 * New upstream development release.
4 10 * debian/libexo-2*:
diff -Nru exo-0.11.0/debian/patches/0001-Correctly_import_user_env.patch exo-0.11.0/debian/patches/0001-Correctly_import_user_env.patch
exo-0.11.0/debian/patches/0001-Correctly_import_user_env.patch [1969-12-31 19:00:00.000000000 -0500]
exo-0.11.0/debian/patches/0001-Correctly_import_user_env.patch [2016-08-16 21:50:46.000000000 -0400]
1 From f016e39ba009e3cfa66c82af9394cae7951e6916 Mon Sep 17 00:00:00 2001
2 From: Sean Davis <smd.seandavis@gmail.com>
3 Date: Tue, 16 Aug 2016 21:33:15 -0400
4 Subject: Correctly import user env
5
6
7 diff --git a/exo-helper/exo-helper.c b/exo-helper/exo-helper.c
8 index ce5ef9e..14c941d 100644
9 --- a/exo-helper/exo-helper.c
10 +++ b/exo-helper/exo-helper.c
11 @@ -325,7 +325,12 @@ exo_helper_get_command (const ExoHelper *helper)
12 return *helper->commands_with_parameter;
13 }
14
15 -
16 +/* Set the DISPLAY variable, to be use by g_spawn_async. */
17 +static void
18 +set_environment (gchar *display)
19 +{
20 + g_setenv ("DISPLAY", display, TRUE);
21 +}
22
23 /**
24 * exo_helper_execute:
25 @@ -352,7 +357,6 @@ exo_helper_execute (ExoHelper *helper,
26 GError *err = NULL;
27 gchar **commands;
28 gchar **argv;
29 - gchar **envp;
30 gchar *command;
31 gchar *display;
32 guint n;
33 @@ -401,16 +405,20 @@ exo_helper_execute (ExoHelper *helper,
34 continue;
35
36 /* set the display variable */
37 - envp = g_get_environ ();
38 display = gdk_screen_make_display_name (screen);
39 - envp = g_environ_setenv (envp, "DISPLAY", display, TRUE);
40
41 /* try to run the command */
42 - succeed = g_spawn_async (NULL, argv, envp, G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_SEARCH_PATH, NULL, NULL, &pid, &err);
43 + succeed = g_spawn_async (NULL,
44 + argv,
45 + NULL,
46 + G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_SEARCH_PATH,
47 + (GSpawnChildSetupFunc) set_environment,
48 + display,
49 + &pid,
50 + &err);
51
52 /* cleanup */
53 g_strfreev (argv);
54 - g_strfreev (envp);
55 g_free (display);
56
57 /* check if the execution was successful */
58 diff --git a/exo/exo-execute.c b/exo/exo-execute.c
59 index 1fabf57..c7a756c 100644
60 --- a/exo/exo-execute.c
61 +++ b/exo/exo-execute.c
62 @@ -82,7 +82,12 @@ exo_execute_preferred_application (const gchar *category,
63 return exo_execute_preferred_application_on_screen (category, parameter, working_directory, envp, gdk_screen_get_default (), error);
64 }
65
66 -
67 +/* Set the DISPLAY variable, to be use by g_spawn_async. */
68 +static void
69 +set_environment (gchar *display)
70 +{
71 + g_setenv ("DISPLAY", display, TRUE);
72 +}
73
74 /**
75 * exo_execute_preferred_application_on_screen:
76 @@ -119,13 +124,12 @@ gboolean
77 exo_execute_preferred_application_on_screen (const gchar *category,
78 const gchar *parameter,
79 const gchar *working_directory,
80 - gchar **envp_in,
81 + gchar **envp,
82 GdkScreen *screen,
83 GError **error)
84 {
85 gchar *argv[5];
86 gchar *display;
87 - gchar **envp = g_strdupv (envp_in);
88 gint argc = 0;
89 gboolean success;
90
91 @@ -147,13 +151,18 @@ exo_execute_preferred_application_on_screen (const gchar *category,
92
93 /* set the display environment variable */
94 display = gdk_screen_make_display_name (screen);
95 - envp = g_environ_setenv (envp, "DISPLAY", display, TRUE);
96
97 /* launch the command */
98 - success = g_spawn_async (working_directory, argv, envp, 0, NULL, NULL, NULL, error);
99 + success = g_spawn_async (working_directory,
100 + argv,
101 + envp,
102 + 0,
103 + (GSpawnChildSetupFunc) set_environment,
104 + display,
105 + NULL,
106 + error);
107
108 g_free (display);
109 - g_strfreev (envp);
110 return success;
111 }
112
113 --
114 cgit v0.10.1
115
diff -Nru exo-0.11.0/debian/patches/series exo-0.11.0/debian/patches/series
exo-0.11.0/debian/patches/series [1969-12-31 19:00:00.000000000 -0500]
exo-0.11.0/debian/patches/series [2016-08-16 21:50:56.000000000 -0400]
1 0001-Correctly_import_user_env.patch