1 |
commit: 60ef078452baefdcd4df087ced1ecac9965e4dc6 |
2 |
Author: Yuri Konotopov <ykonotopov <AT> gnome <DOT> org> |
3 |
AuthorDate: Thu Jan 26 14:38:56 2017 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 26 22:45:55 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=60ef0784 |
7 |
|
8 |
gnome-extra/chrome-gnome-shell: added patches to fix various issues. |
9 |
|
10 |
Closes: https://github.com/gentoo/gentoo/pull/3660 |
11 |
|
12 |
...ell-8.ebuild => chrome-gnome-shell-8-r1.ebuild} | 8 +- |
13 |
...me-gnome-shell-8-enabled-extensions-array.patch | 32 ++++++++ |
14 |
.../chrome-gnome-shell-8-get_dbus_connection.patch | 91 ++++++++++++++++++++++ |
15 |
.../chrome-gnome-shell-8-metadata-version.patch | 28 +++++++ |
16 |
4 files changed, 158 insertions(+), 1 deletion(-) |
17 |
|
18 |
diff --git a/gnome-extra/chrome-gnome-shell/chrome-gnome-shell-8.ebuild b/gnome-extra/chrome-gnome-shell/chrome-gnome-shell-8-r1.ebuild |
19 |
similarity index 92% |
20 |
rename from gnome-extra/chrome-gnome-shell/chrome-gnome-shell-8.ebuild |
21 |
rename to gnome-extra/chrome-gnome-shell/chrome-gnome-shell-8-r1.ebuild |
22 |
index 5eed8d8..495e02e 100644 |
23 |
--- a/gnome-extra/chrome-gnome-shell/chrome-gnome-shell-8.ebuild |
24 |
+++ b/gnome-extra/chrome-gnome-shell/chrome-gnome-shell-8-r1.ebuild |
25 |
@@ -24,11 +24,17 @@ DEPEND="${PYTHON_DEPS} |
26 |
sys-apps/coreutils |
27 |
" |
28 |
RDEPEND="${PYTHON_DEPS} |
29 |
- dev-python/requests[${PYTHON_USEDEP}] |
30 |
dev-python/pygobject:3[${PYTHON_USEDEP}] |
31 |
+ dev-python/requests[${PYTHON_USEDEP}] |
32 |
gnome-base/gnome-shell |
33 |
" |
34 |
|
35 |
+PATCHES=( |
36 |
+ "${FILESDIR}/${P}"-enabled-extensions-array.patch |
37 |
+ "${FILESDIR}/${P}"-metadata-version.patch |
38 |
+ "${FILESDIR}/${P}"-get_dbus_connection.patch |
39 |
+) |
40 |
+ |
41 |
src_configure() { |
42 |
local mycmakeargs=( -DBUILD_EXTENSION=OFF ) |
43 |
cmake-utils_src_configure |
44 |
|
45 |
diff --git a/gnome-extra/chrome-gnome-shell/files/chrome-gnome-shell-8-enabled-extensions-array.patch b/gnome-extra/chrome-gnome-shell/files/chrome-gnome-shell-8-enabled-extensions-array.patch |
46 |
new file mode 100644 |
47 |
index 00000000..7a56ca0 |
48 |
--- /dev/null |
49 |
+++ b/gnome-extra/chrome-gnome-shell/files/chrome-gnome-shell-8-enabled-extensions-array.patch |
50 |
@@ -0,0 +1,32 @@ |
51 |
+From 1de3c56c636adfdb74970bf9d7a5424af3830d92 Mon Sep 17 00:00:00 2001 |
52 |
+From: Yuri Konotopov <ykonotopov@×××××.org> |
53 |
+Date: Mon, 23 Jan 2017 19:43:30 +0400 |
54 |
+Subject: [PATCH 3/6] connector: assume that "enabled-extensions" array can |
55 |
+ contains duplicates |
56 |
+ |
57 |
+See-Also: https://bugzilla.gnome.org/show_bug.cgi?id=777650 |
58 |
+Fixes: https://github.com/nE0sIghT/chrome-gnome-shell-mirror/issues/26 |
59 |
+--- |
60 |
+ connector/chrome-gnome-shell.py | 5 +++-- |
61 |
+ 1 file changed, 3 insertions(+), 2 deletions(-) |
62 |
+ |
63 |
+diff --git a/connector/chrome-gnome-shell.py b/connector/chrome-gnome-shell.py |
64 |
+index 719a347..0b92d83 100755 |
65 |
+--- a/connector/chrome-gnome-shell.py |
66 |
++++ b/connector/chrome-gnome-shell.py |
67 |
+@@ -424,9 +424,10 @@ class ChromeGNOMEShell(Gio.Application): |
68 |
+ continue |
69 |
+ |
70 |
+ if extension['enable']: |
71 |
+- uuids.append(extension['uuid']) |
72 |
++ if not extension['uuid'] in uuids: |
73 |
++ uuids.append(extension['uuid']) |
74 |
+ elif extension['uuid'] in uuids: |
75 |
+- uuids.remove(extension['uuid']) |
76 |
++ uuids = [value for value in uuids if value != extension['uuid']] |
77 |
+ |
78 |
+ settings.set_strv(ENABLED_EXTENSIONS_KEY, uuids) |
79 |
+ |
80 |
+-- |
81 |
+2.10.2 |
82 |
+ |
83 |
|
84 |
diff --git a/gnome-extra/chrome-gnome-shell/files/chrome-gnome-shell-8-get_dbus_connection.patch b/gnome-extra/chrome-gnome-shell/files/chrome-gnome-shell-8-get_dbus_connection.patch |
85 |
new file mode 100644 |
86 |
index 00000000..be5f6c4 |
87 |
--- /dev/null |
88 |
+++ b/gnome-extra/chrome-gnome-shell/files/chrome-gnome-shell-8-get_dbus_connection.patch |
89 |
@@ -0,0 +1,91 @@ |
90 |
+From dca4a3538f86d8e2e957945a691430573192716d Mon Sep 17 00:00:00 2001 |
91 |
+From: Yuri Konotopov <ykonotopov@×××××.org> |
92 |
+Date: Tue, 24 Jan 2017 19:42:19 +0400 |
93 |
+Subject: [PATCH 6/6] connector: do not use get_dbus_connection after |
94 |
+ GApplication was released. |
95 |
+ |
96 |
+Fixes: https://github.com/nE0sIghT/chrome-gnome-shell-mirror/issues/27 |
97 |
+--- |
98 |
+ connector/chrome-gnome-shell.py | 22 +++++++++++++--------- |
99 |
+ 1 file changed, 13 insertions(+), 9 deletions(-) |
100 |
+ |
101 |
+diff --git a/connector/chrome-gnome-shell.py b/connector/chrome-gnome-shell.py |
102 |
+index 0f6e5f1..ac6740a 100755 |
103 |
+--- a/connector/chrome-gnome-shell.py |
104 |
++++ b/connector/chrome-gnome-shell.py |
105 |
+@@ -106,21 +106,26 @@ class ChromeGNOMEShell(Gio.Application): |
106 |
+ self.hold() |
107 |
+ |
108 |
+ # Is there any way to hook this to shutdown? |
109 |
+- def cleanup(self): |
110 |
+- debug('Cleanup') |
111 |
++ def clean_release(self): |
112 |
++ debug('Release') |
113 |
+ |
114 |
+ if self.shellAppearedId: |
115 |
+ Gio.bus_unwatch_name(self.shellAppearedId) |
116 |
+ |
117 |
+ if self.shellSignalId: |
118 |
+- self.get_dbus_connection().signal_unsubscribe(self.shellSignalId) |
119 |
++ dbus_connection = self.get_dbus_connection() |
120 |
++ |
121 |
++ if dbus_connection is not None: |
122 |
++ dbus_connection.signal_unsubscribe(self.shellSignalId) |
123 |
++ |
124 |
++ self.release() |
125 |
+ |
126 |
+ def default_exception_hook(self, exception_type, value, tb): |
127 |
+ log_error("Uncaught exception of type %s occured" % exception_type) |
128 |
+ traceback.print_tb(tb) |
129 |
+ log_error("Exception: %s" % value) |
130 |
+ |
131 |
+- self.release() |
132 |
++ self.clean_release() |
133 |
+ |
134 |
+ def add_simple_action(self, name, callback, parameter_type): |
135 |
+ action = Gio.SimpleAction.new( |
136 |
+@@ -191,7 +196,7 @@ class ChromeGNOMEShell(Gio.Application): |
137 |
+ # noinspection PyUnusedLocal |
138 |
+ def on_service_timeout(self, data): |
139 |
+ debug('On service timeout') |
140 |
+- self.release() |
141 |
++ self.clean_release() |
142 |
+ |
143 |
+ return False |
144 |
+ |
145 |
+@@ -203,7 +208,7 @@ class ChromeGNOMEShell(Gio.Application): |
146 |
+ |
147 |
+ if len(text_length_bytes) == 0: |
148 |
+ debug('Release condition: %s' % str(condition)) |
149 |
+- self.release() |
150 |
++ self.clean_release() |
151 |
+ return |
152 |
+ |
153 |
+ # Unpack message length as 4 byte integer. |
154 |
+@@ -255,14 +260,14 @@ class ChromeGNOMEShell(Gio.Application): |
155 |
+ # noinspection PyUnusedLocal |
156 |
+ def on_hup(self, source, condition, data): |
157 |
+ debug('On hup: %s' % str(condition)) |
158 |
+- self.release() |
159 |
++ self.clean_release() |
160 |
+ |
161 |
+ return False |
162 |
+ |
163 |
+ # noinspection PyUnusedLocal |
164 |
+ def on_sigint(self, data): |
165 |
+ debug('On sigint') |
166 |
+- self.release() |
167 |
++ self.clean_release() |
168 |
+ |
169 |
+ return False |
170 |
+ |
171 |
+@@ -545,6 +550,5 @@ if __name__ == '__main__': |
172 |
+ app = ChromeGNOMEShell('--gapplication-service' in sys.argv) |
173 |
+ |
174 |
+ app.run(sys.argv) |
175 |
+- app.cleanup() |
176 |
+ |
177 |
+ debug('Quit') |
178 |
+-- |
179 |
+2.10.2 |
180 |
+ |
181 |
|
182 |
diff --git a/gnome-extra/chrome-gnome-shell/files/chrome-gnome-shell-8-metadata-version.patch b/gnome-extra/chrome-gnome-shell/files/chrome-gnome-shell-8-metadata-version.patch |
183 |
new file mode 100644 |
184 |
index 00000000..238d1fc |
185 |
--- /dev/null |
186 |
+++ b/gnome-extra/chrome-gnome-shell/files/chrome-gnome-shell-8-metadata-version.patch |
187 |
@@ -0,0 +1,28 @@ |
188 |
+From 48ded6911e60fb8415190b252ca420b994e6c525 Mon Sep 17 00:00:00 2001 |
189 |
+From: Yuri Konotopov <ykonotopov@×××××.org> |
190 |
+Date: Mon, 23 Jan 2017 22:29:12 +0400 |
191 |
+Subject: [PATCH 4/6] connector: assume version 1 for extensions without |
192 |
+ version in metadata |
193 |
+ |
194 |
+Bug: https://github.com/nE0sIghT/chrome-gnome-shell-mirror/issues/27 |
195 |
+See-Also: https://git.gnome.org/browse/extensions-web/commit/?id=214f03ee90f0f391d3d4fdec23feedf45e3d0507 |
196 |
+--- |
197 |
+ connector/chrome-gnome-shell.py | 2 +- |
198 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
199 |
+ |
200 |
+diff --git a/connector/chrome-gnome-shell.py b/connector/chrome-gnome-shell.py |
201 |
+index 0b92d83..0f6e5f1 100755 |
202 |
+--- a/connector/chrome-gnome-shell.py |
203 |
++++ b/connector/chrome-gnome-shell.py |
204 |
+@@ -506,7 +506,7 @@ class ChromeGNOMEShell(Gio.Application): |
205 |
+ http_request['installed'][uuid] = { |
206 |
+ 'version': int(extensions[uuid]['version']) |
207 |
+ } |
208 |
+- except ValueError: |
209 |
++ except (ValueError, KeyError): |
210 |
+ http_request['installed'][uuid] = { |
211 |
+ 'version': 1 |
212 |
+ } |
213 |
+-- |
214 |
+2.10.2 |
215 |
+ |