Merge ~3v1n0/ubuntu/+source/gnome-software:ubuntu/bionic into ~ubuntu-desktop/ubuntu/+source/gnome-software:ubuntu/master
- Git
- lp:~3v1n0/ubuntu/+source/gnome-software
- ubuntu/bionic
- Merge into ubuntu/master
Status: | Superseded | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Proposed branch: | ~3v1n0/ubuntu/+source/gnome-software:ubuntu/bionic | ||||||||||||||||||||||||
Merge into: | ~ubuntu-desktop/ubuntu/+source/gnome-software:ubuntu/master | ||||||||||||||||||||||||
Diff against target: |
1805 lines (+1274/-5) (has conflicts) 19 files modified
debian/changelog (+65/-5) debian/control (+13/-0) debian/control.in (+8/-0) debian/gbp.conf (+7/-0) debian/patches/0001-Set-reboot-notifications-as-urgent-to-avoid-them-tim.patch (+27/-0) debian/patches/0001-lib-Allow-opening-CAB-files-that-resolve-more-than-o.patch (+11/-0) debian/patches/0001-snap-plugin-segfault.patch (+32/-0) debian/patches/0003-Sort-snaps-before-other-apps.patch (+14/-0) debian/patches/0006-packagekit-Disable-updates.patch (+31/-0) debian/patches/0011-Support-snap-channels.patch (+158/-0) debian/patches/0014-Add-a-basic-permissions-system.patch (+53/-0) debian/patches/0020-Show-verified-developers.patch (+217/-0) debian/patches/0021-snap-Use-wide-scope-when-searching.patch (+70/-0) debian/patches/0022-Delay-startup-of-GNOME-Software-to-allow-the-Shell-t.patch (+25/-0) debian/patches/0023-Revert-Revert-flatpak-Use-list-of-related-apps-for-i.patch (+114/-0) debian/patches/0024-flatpak-Check-if-a-related-app-is-installed-even-whe.patch (+37/-0) debian/patches/0025-flatpak-Include-related-refs-to-the-app-s-runtime-on.patch (+192/-0) debian/patches/0026-shell-search-provider-implement-XUbuntuCancel.patch (+176/-0) debian/patches/series (+24/-0) Conflict in debian/changelog Conflict in debian/control Conflict in debian/control.in Conflict in debian/gbp.conf Conflict in debian/patches/0001-lib-Allow-opening-CAB-files-that-resolve-more-than-o.patch Conflict in debian/patches/0003-Sort-snaps-before-other-apps.patch Conflict in debian/patches/0006-packagekit-Disable-updates.patch Conflict in debian/patches/0011-Support-snap-channels.patch Conflict in debian/patches/0014-Add-a-basic-permissions-system.patch Conflict in debian/patches/series |
||||||||||||||||||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Desktop | Pending | ||
Review via email: mp+358488@code.launchpad.net |
This proposal has been superseded by a proposal from 2018-11-08.
Commit message
Description of the change
Unmerged commits
- 8d4ed87... by Marco Trevisan (Treviño)
-
Finalise changelog
- dd9e986... by Robert Ancell
-
Implement XUbuntuCancel to request pending search cancellation from gnome-shell
Fixes LP: #1756826
- 098277f... by Robert Ancell
-
releasing package gnome-software version 3.28.1-
0ubuntu4. 18.04.5 - 7897bab... by Robert Ancell
-
* debian/
patches/ 0001-lib- Allow-opening- CAB-files- that-resolve- more-than- o.patch:
- Support composite CAB files (LP: #1798470) - ea77b8b... by Robert Ancell
-
* debian/
patches/ 0001-Set- reboot- notifications- as-urgent- to-avoid- them-tim. patch:
- Stop reboot notification from timing out (LP: #1719797) - 1c0a67e... by Robert Ancell
-
* debian/
patches/ 0003-Sort- snaps-before- other-apps. patch:
- Fix snap search result ordering (LP: #1798228) - 49fd993... by Robert Ancell
-
* debian/
patches/ 0023-Revert- Revert- flatpak- Use-list- of-related- apps-for- i.patch:
* debian/patches/ 0024-flatpak- Check-if- a-related- app-is- installed- even-whe. patch:
* debian/patches/ 0025-flatpak- Include- related- refs-to- the-app- s-runtime- on.patch:
- Pull related flatpak refs (LP: #1754864) - 09a666a... by Robert Ancell
-
3.28.1-
0ubuntu4. 18.04.4 was released - 1c69575... by Robert Ancell
-
* debian/control:
- Bump build-dependency on libsnapd-glib-dev - 98388e8... by Robert Ancell
-
* debian/
patches/ 0022-Delay- startup- of-GNOME- Software- to-allow- the-Shell- t.patch:
- Delay startup of service to allow the shell to load first (LP: #1756379)
Preview Diff
1 | diff --git a/debian/changelog b/debian/changelog | |||
2 | index 3a663a4..8dcdc3a 100644 | |||
3 | --- a/debian/changelog | |||
4 | +++ b/debian/changelog | |||
5 | @@ -1,3 +1,4 @@ | |||
6 | 1 | <<<<<<< debian/changelog | ||
7 | 1 | gnome-software (3.30.2-0ubuntu8) cosmic; urgency=medium | 2 | gnome-software (3.30.2-0ubuntu8) cosmic; urgency=medium |
8 | 2 | 3 | ||
9 | 3 | * debian/patches/0001-Revert-ef15f51d.patch: | 4 | * debian/patches/0001-Revert-ef15f51d.patch: |
10 | @@ -147,20 +148,79 @@ gnome-software (3.29.1-0ubuntu1) cosmic; urgency=medium | |||
11 | 147 | -- Robert Ancell <robert.ancell@canonical.com> Wed, 23 May 2018 11:55:28 +1200 | 148 | -- Robert Ancell <robert.ancell@canonical.com> Wed, 23 May 2018 11:55:28 +1200 |
12 | 148 | 149 | ||
13 | 149 | gnome-software (3.28.1-0ubuntu6) cosmic; urgency=medium | 150 | gnome-software (3.28.1-0ubuntu6) cosmic; urgency=medium |
14 | 151 | ======= | ||
15 | 152 | gnome-software (3.28.1-0ubuntu4.18.04.6) bionic; urgency=medium | ||
16 | 153 | >>>>>>> debian/changelog | ||
17 | 150 | 154 | ||
18 | 155 | * debian/patches/0026-shell-search-provider-implement-XUbuntuCancel.patch | ||
19 | 156 | - implement XUbuntuCancel to request pending search cancellation from | ||
20 | 157 | gnome-shell (LP: #1756826) | ||
21 | 158 | |||
22 | 159 | -- Marco Trevisan (Treviño) <marco@ubuntu.com> Thu, 08 Nov 2018 03:32:00 -0600 | ||
23 | 160 | |||
24 | 161 | gnome-software (3.28.1-0ubuntu4.18.04.5) bionic; urgency=medium | ||
25 | 162 | |||
26 | 163 | * debian/patches/0023-Revert-Revert-flatpak-Use-list-of-related-apps-for-i.patch: | ||
27 | 164 | * debian/patches/0024-flatpak-Check-if-a-related-app-is-installed-even-whe.patch: | ||
28 | 165 | * debian/patches/0025-flatpak-Include-related-refs-to-the-app-s-runtime-on.patch: | ||
29 | 166 | - Pull related flatpak refs (LP: #1754864) | ||
30 | 167 | * debian/patches/0003-Sort-snaps-before-other-apps.patch: | ||
31 | 168 | - Fix snap search result ordering (LP: #1798228) | ||
32 | 169 | * debian/patches/0001-Set-reboot-notifications-as-urgent-to-avoid-them-tim.patch: | ||
33 | 170 | - Stop reboot notification from timing out (LP: #1719797) | ||
34 | 171 | * debian/patches/0001-lib-Allow-opening-CAB-files-that-resolve-more-than-o.patch: | ||
35 | 172 | - Support composite CAB files (LP: #1798470) | ||
36 | 173 | |||
37 | 174 | -- Robert Ancell <robert.ancell@canonical.com> Mon, 29 Oct 2018 16:06:34 +1300 | ||
38 | 175 | |||
39 | 176 | gnome-software (3.28.1-0ubuntu4.18.04.4) bionic; urgency=medium | ||
40 | 177 | |||
41 | 178 | * debian/control: | ||
42 | 179 | - Bump build-dependency on libsnapd-glib-dev | ||
43 | 180 | * debian/patches/0020-Show-verified-developers.patch: | ||
44 | 181 | - Show verified developers (LP: #1789336) | ||
45 | 151 | * debian/patches/0011-Support-snap-channels.patch: | 182 | * debian/patches/0011-Support-snap-channels.patch: |
49 | 152 | - Make snap channel selection list scrollable (LP: #1768779) | 183 | * debian/patches/0021-snap-Use-wide-scope-when-searching.patch: |
50 | 153 | - Fix channel branches all showing the same name (LP: #1768794) | 184 | - Use wide scope searching (LP: #1789338) |
51 | 154 | - Alphabetically sort channel branch names (LP: #1769556) | 185 | * debian/patches/0022-Delay-startup-of-GNOME-Software-to-allow-the-Shell-t.patch: |
52 | 186 | - Delay startup of service to allow the shell to load first (LP: #1756379) | ||
53 | 155 | 187 | ||
54 | 188 | -- Robert Ancell <robert.ancell@canonical.com> Wed, 19 Sep 2018 16:27:38 +0200 | ||
55 | 189 | |||
56 | 190 | gnome-software (3.28.1-0ubuntu4.18.04.3) bionic; urgency=medium | ||
57 | 191 | |||
58 | 192 | <<<<<<< debian/changelog | ||
59 | 156 | -- Robert Ancell <robert.ancell@canonical.com> Mon, 07 May 2018 16:31:46 +1200 | 193 | -- Robert Ancell <robert.ancell@canonical.com> Mon, 07 May 2018 16:31:46 +1200 |
60 | 194 | ======= | ||
61 | 195 | * debian/patches/0006-packagekit-Disable-updates.patch: | ||
62 | 196 | - also disable offline updates in refresh plugin (LP: #1775226) | ||
63 | 197 | >>>>>>> debian/changelog | ||
64 | 198 | |||
65 | 199 | -- Olivier Tilloy <olivier.tilloy@canonical.com> Thu, 02 Aug 2018 12:25:36 +0200 | ||
66 | 157 | 200 | ||
68 | 158 | gnome-software (3.28.1-0ubuntu5) cosmic; urgency=medium | 201 | gnome-software (3.28.1-0ubuntu4.18.04.2) bionic; urgency=medium |
69 | 202 | |||
70 | 203 | [ Robert Ancell ] | ||
71 | 204 | * debian/patches/0014-Add-a-basic-permissions-system.patch: | ||
72 | 205 | - Fix crash when have plugs with multiple slots available (LP: #1778160) | ||
73 | 206 | |||
74 | 207 | [ Andrea Azzarone ] | ||
75 | 208 | * debian/patches/0001-snap-plugin-segfault.patch: | ||
76 | 209 | - don't segfault on null snap installation date (lp: #1781996) | ||
77 | 210 | |||
78 | 211 | -- Sebastien Bacher <seb128@ubuntu.com> Thu, 19 Jul 2018 17:10:17 +0200 | ||
79 | 212 | |||
80 | 213 | gnome-software (3.28.1-0ubuntu4.18.04.1) bionic; urgency=medium | ||
81 | 159 | 214 | ||
82 | 160 | * debian/patches/0011-Support-snap-channels.patch: | 215 | * debian/patches/0011-Support-snap-channels.patch: |
83 | 161 | - Fix incorrect default install version being shown (LP: #1767445) | 216 | - Fix incorrect default install version being shown (LP: #1767445) |
84 | 217 | - Make snap channel selection list scrollable (LP: #1768779) | ||
85 | 218 | - Fix channel branches all showing the same name (LP: #1768794) | ||
86 | 219 | - Alphabetically sort channel branch names (LP: #1769556) | ||
87 | 220 | * debian/control: | ||
88 | 221 | - Use bionic Vcs link | ||
89 | 162 | 222 | ||
91 | 163 | -- Robert Ancell <robert.ancell@canonical.com> Thu, 03 May 2018 12:33:30 +1200 | 223 | -- Robert Ancell <robert.ancell@canonical.com> Mon, 07 May 2018 16:32:37 +1200 |
92 | 164 | 224 | ||
93 | 165 | gnome-software (3.28.1-0ubuntu4) bionic; urgency=medium | 225 | gnome-software (3.28.1-0ubuntu4) bionic; urgency=medium |
94 | 166 | 226 | ||
95 | diff --git a/debian/control b/debian/control | |||
96 | index 02b40b2..56cce3f 100644 | |||
97 | --- a/debian/control | |||
98 | +++ b/debian/control | |||
99 | @@ -29,7 +29,11 @@ Build-Depends: appstream, | |||
100 | 29 | libpackagekit-glib2-dev (>= 1.1.4), | 29 | libpackagekit-glib2-dev (>= 1.1.4), |
101 | 30 | libpolkit-gobject-1-dev, | 30 | libpolkit-gobject-1-dev, |
102 | 31 | libsecret-1-dev, | 31 | libsecret-1-dev, |
103 | 32 | <<<<<<< debian/control | ||
104 | 32 | libsnapd-glib-dev (>= 1.43) [amd64 arm64 armel armhf i386 ppc64 ppc64el s390x], | 33 | libsnapd-glib-dev (>= 1.43) [amd64 arm64 armel armhf i386 ppc64 ppc64el s390x], |
105 | 34 | ======= | ||
106 | 35 | libsnapd-glib-dev (>= 1.42) [amd64 arm64 armel armhf i386 ppc64 ppc64el s390x], | ||
107 | 36 | >>>>>>> debian/control | ||
108 | 33 | libsoup2.4-dev (>= 2.52), | 37 | libsoup2.4-dev (>= 2.52), |
109 | 34 | libsqlite3-dev, | 38 | libsqlite3-dev, |
110 | 35 | libxml2-utils, | 39 | libxml2-utils, |
111 | @@ -42,7 +46,11 @@ Homepage: https://wiki.gnome.org/Apps/Software | |||
112 | 42 | XS-Debian-Vcs-Browser: https://salsa.debian.org/gnome-team/gnome-software | 46 | XS-Debian-Vcs-Browser: https://salsa.debian.org/gnome-team/gnome-software |
113 | 43 | XS-Debian-Vcs-Git: https://salsa.debian.org/gnome-team/gnome-software.git | 47 | XS-Debian-Vcs-Git: https://salsa.debian.org/gnome-team/gnome-software.git |
114 | 44 | Vcs-Browser: https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/gnome-software | 48 | Vcs-Browser: https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/gnome-software |
115 | 49 | <<<<<<< debian/control | ||
116 | 45 | Vcs-Git: https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/gnome-software | 50 | Vcs-Git: https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/gnome-software |
117 | 51 | ======= | ||
118 | 52 | Vcs-Git: https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/gnome-software -b ubuntu/bionic | ||
119 | 53 | >>>>>>> debian/control | ||
120 | 46 | 54 | ||
121 | 47 | Package: gnome-software | 55 | Package: gnome-software |
122 | 48 | Architecture: any | 56 | Architecture: any |
123 | @@ -60,7 +68,12 @@ Conflicts: sessioninstaller | |||
124 | 60 | Recommends: gnome-software-plugin-snap [linux-any], | 68 | Recommends: gnome-software-plugin-snap [linux-any], |
125 | 61 | Suggests: apt-config-icons-hidpi, | 69 | Suggests: apt-config-icons-hidpi, |
126 | 62 | fwupd [amd64 arm64 armhf i386], | 70 | fwupd [amd64 arm64 armhf i386], |
127 | 71 | <<<<<<< debian/control | ||
128 | 63 | gnome-software-plugin-flatpak [linux-any] | 72 | gnome-software-plugin-flatpak [linux-any] |
129 | 73 | ======= | ||
130 | 74 | gnome-software-plugin-flatpak [linux-any], | ||
131 | 75 | gnome-software-plugin-limba [linux-any] | ||
132 | 76 | >>>>>>> debian/control | ||
133 | 64 | Description: Software Center for GNOME | 77 | Description: Software Center for GNOME |
134 | 65 | Software lets you install and update applications and system extensions. | 78 | Software lets you install and update applications and system extensions. |
135 | 66 | . | 79 | . |
136 | diff --git a/debian/control.in b/debian/control.in | |||
137 | index e0e8726..6b1c6df 100644 | |||
138 | --- a/debian/control.in | |||
139 | +++ b/debian/control.in | |||
140 | @@ -25,7 +25,11 @@ Build-Depends: appstream, | |||
141 | 25 | libpackagekit-glib2-dev (>= 1.1.4), | 25 | libpackagekit-glib2-dev (>= 1.1.4), |
142 | 26 | libpolkit-gobject-1-dev, | 26 | libpolkit-gobject-1-dev, |
143 | 27 | libsecret-1-dev, | 27 | libsecret-1-dev, |
144 | 28 | <<<<<<< debian/control.in | ||
145 | 28 | libsnapd-glib-dev (>= 1.43) [amd64 arm64 armel armhf i386 ppc64 ppc64el s390x], | 29 | libsnapd-glib-dev (>= 1.43) [amd64 arm64 armel armhf i386 ppc64 ppc64el s390x], |
146 | 30 | ======= | ||
147 | 31 | libsnapd-glib-dev (>= 1.42) [amd64 arm64 armel armhf i386 ppc64 ppc64el s390x], | ||
148 | 32 | >>>>>>> debian/control.in | ||
149 | 29 | libsoup2.4-dev (>= 2.52), | 33 | libsoup2.4-dev (>= 2.52), |
150 | 30 | libsqlite3-dev, | 34 | libsqlite3-dev, |
151 | 31 | libxml2-utils, | 35 | libxml2-utils, |
152 | @@ -38,7 +42,11 @@ Homepage: https://wiki.gnome.org/Apps/Software | |||
153 | 38 | XS-Debian-Vcs-Browser: https://salsa.debian.org/gnome-team/gnome-software | 42 | XS-Debian-Vcs-Browser: https://salsa.debian.org/gnome-team/gnome-software |
154 | 39 | XS-Debian-Vcs-Git: https://salsa.debian.org/gnome-team/gnome-software.git | 43 | XS-Debian-Vcs-Git: https://salsa.debian.org/gnome-team/gnome-software.git |
155 | 40 | Vcs-Browser: https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/gnome-software | 44 | Vcs-Browser: https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/gnome-software |
156 | 45 | <<<<<<< debian/control.in | ||
157 | 41 | Vcs-Git: https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/gnome-software | 46 | Vcs-Git: https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/gnome-software |
158 | 47 | ======= | ||
159 | 48 | Vcs-Git: https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/gnome-software -b ubuntu/bionic | ||
160 | 49 | >>>>>>> debian/control.in | ||
161 | 42 | 50 | ||
162 | 43 | Package: gnome-software | 51 | Package: gnome-software |
163 | 44 | Architecture: any | 52 | Architecture: any |
164 | diff --git a/debian/gbp.conf b/debian/gbp.conf | |||
165 | index 34a17e9..16658ad 100644 | |||
166 | --- a/debian/gbp.conf | |||
167 | +++ b/debian/gbp.conf | |||
168 | @@ -1,5 +1,6 @@ | |||
169 | 1 | [DEFAULT] | 1 | [DEFAULT] |
170 | 2 | debian-branch=ubuntu/master | 2 | debian-branch=ubuntu/master |
171 | 3 | <<<<<<< debian/gbp.conf | ||
172 | 3 | upstream-branch=upstream/latest | 4 | upstream-branch=upstream/latest |
173 | 4 | debian-tag=ubuntu/%(version)s | 5 | debian-tag=ubuntu/%(version)s |
174 | 5 | upstream-vcs-tag=%(version)s | 6 | upstream-vcs-tag=%(version)s |
175 | @@ -17,3 +18,9 @@ postimport = dch -v%(version)s New upstream release; git add debian/changelog; d | |||
176 | 17 | [pq] | 18 | [pq] |
177 | 18 | patch-numbers = False | 19 | patch-numbers = False |
178 | 19 | 20 | ||
179 | 21 | ======= | ||
180 | 22 | upstream-branch=upstream/3.28.x | ||
181 | 23 | debian-tag=ubuntu/%(version)s | ||
182 | 24 | upstream-vcs-tag=%(version)s | ||
183 | 25 | pristine-tar=True | ||
184 | 26 | >>>>>>> debian/gbp.conf | ||
185 | diff --git a/debian/patches/0001-Set-reboot-notifications-as-urgent-to-avoid-them-tim.patch b/debian/patches/0001-Set-reboot-notifications-as-urgent-to-avoid-them-tim.patch | |||
186 | 20 | new file mode 100644 | 27 | new file mode 100644 |
187 | index 0000000..3d37c58 | |||
188 | --- /dev/null | |||
189 | +++ b/debian/patches/0001-Set-reboot-notifications-as-urgent-to-avoid-them-tim.patch | |||
190 | @@ -0,0 +1,27 @@ | |||
191 | 1 | From 057eea7cc03d647544b5819ff37951f7bfffb77e Mon Sep 17 00:00:00 2001 | ||
192 | 2 | From: Mario Limonciello <mario.limonciello@dell.com> | ||
193 | 3 | Date: Thu, 13 Sep 2018 12:28:58 -0500 | ||
194 | 4 | Subject: [PATCH] Set reboot notifications as urgent to avoid them timing out | ||
195 | 5 | (Fixes: #341) | ||
196 | 6 | |||
197 | 7 | It was confirmed in https://bugzilla.gnome.org/show_bug.cgi?id=783719 | ||
198 | 8 | that this field will influence the timeout | ||
199 | 9 | --- | ||
200 | 10 | src/gs-updates-page.c | 1 + | ||
201 | 11 | 1 file changed, 1 insertion(+) | ||
202 | 12 | |||
203 | 13 | diff --git a/src/gs-updates-page.c b/src/gs-updates-page.c | ||
204 | 14 | index fa77dbd9..cd9db05d 100644 | ||
205 | 15 | --- a/src/gs-updates-page.c | ||
206 | 16 | +++ b/src/gs-updates-page.c | ||
207 | 17 | @@ -751,6 +751,7 @@ _perform_update_cb (GsPluginLoader *plugin_loader, GAsyncResult *res, gpointer u | ||
208 | 18 | /* TRANSLATORS: button text */ | ||
209 | 19 | g_notification_add_button_with_target (n, _("Restart"), "app.reboot", NULL); | ||
210 | 20 | g_notification_set_default_action_and_target (n, "app.set-mode", "s", "updates"); | ||
211 | 21 | + g_notification_set_priority (n, G_NOTIFICATION_PRIORITY_URGENT); | ||
212 | 22 | g_application_send_notification (g_application_get_default (), "restart-required", n); | ||
213 | 23 | } | ||
214 | 24 | } | ||
215 | 25 | -- | ||
216 | 26 | 2.19.1 | ||
217 | 27 | |||
218 | diff --git a/debian/patches/0001-lib-Allow-opening-CAB-files-that-resolve-more-than-o.patch b/debian/patches/0001-lib-Allow-opening-CAB-files-that-resolve-more-than-o.patch | |||
219 | index 931e0db..f6bb205 100644 | |||
220 | --- a/debian/patches/0001-lib-Allow-opening-CAB-files-that-resolve-more-than-o.patch | |||
221 | +++ b/debian/patches/0001-lib-Allow-opening-CAB-files-that-resolve-more-than-o.patch | |||
222 | @@ -1,4 +1,8 @@ | |||
223 | 1 | <<<<<<< debian/patches/0001-lib-Allow-opening-CAB-files-that-resolve-more-than-o.patch | ||
224 | 1 | From 8e8887f890489959daa3400f531e7febf9e9f8b6 Mon Sep 17 00:00:00 2001 | 2 | From 8e8887f890489959daa3400f531e7febf9e9f8b6 Mon Sep 17 00:00:00 2001 |
225 | 3 | ======= | ||
226 | 4 | From 3c5e8905fb72437f7ce62fcc7fcd2fa0988e31d0 Mon Sep 17 00:00:00 2001 | ||
227 | 5 | >>>>>>> debian/patches/0001-lib-Allow-opening-CAB-files-that-resolve-more-than-o.patch | ||
228 | 2 | From: Mario Limonciello <mario.limonciello@dell.com> | 6 | From: Mario Limonciello <mario.limonciello@dell.com> |
229 | 3 | Date: Tue, 16 Oct 2018 11:21:47 -0500 | 7 | Date: Tue, 16 Oct 2018 11:21:47 -0500 |
230 | 4 | Subject: [PATCH] lib: Allow opening CAB files that resolve more than one GsApp | 8 | Subject: [PATCH] lib: Allow opening CAB files that resolve more than one GsApp |
231 | @@ -16,10 +20,17 @@ This was verified using a Dell USB-C dock and fwupd 1.1.3. | |||
232 | 16 | 1 file changed, 1 insertion(+), 6 deletions(-) | 20 | 1 file changed, 1 insertion(+), 6 deletions(-) |
233 | 17 | 21 | ||
234 | 18 | diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c | 22 | diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c |
235 | 23 | <<<<<<< debian/patches/0001-lib-Allow-opening-CAB-files-that-resolve-more-than-o.patch | ||
236 | 19 | index 55afa8bb..630d0c6c 100644 | 24 | index 55afa8bb..630d0c6c 100644 |
237 | 20 | --- a/lib/gs-plugin-loader.c | 25 | --- a/lib/gs-plugin-loader.c |
238 | 21 | +++ b/lib/gs-plugin-loader.c | 26 | +++ b/lib/gs-plugin-loader.c |
239 | 22 | @@ -3385,12 +3385,7 @@ gs_plugin_loader_process_thread_cb (GTask *task, | 27 | @@ -3385,12 +3385,7 @@ gs_plugin_loader_process_thread_cb (GTask *task, |
240 | 28 | ======= | ||
241 | 29 | index 2fb02e3c..f52d1d27 100644 | ||
242 | 30 | --- a/lib/gs-plugin-loader.c | ||
243 | 31 | +++ b/lib/gs-plugin-loader.c | ||
244 | 32 | @@ -3449,12 +3449,7 @@ gs_plugin_loader_process_thread_cb (GTask *task, | ||
245 | 33 | >>>>>>> debian/patches/0001-lib-Allow-opening-CAB-files-that-resolve-more-than-o.patch | ||
246 | 23 | } | 34 | } |
247 | 24 | if (gs_app_list_length (list) > 1) { | 35 | if (gs_app_list_length (list) > 1) { |
248 | 25 | g_autofree gchar *str = gs_plugin_job_to_string (helper->plugin_job); | 36 | g_autofree gchar *str = gs_plugin_job_to_string (helper->plugin_job); |
249 | diff --git a/debian/patches/0001-snap-plugin-segfault.patch b/debian/patches/0001-snap-plugin-segfault.patch | |||
250 | 26 | new file mode 100644 | 37 | new file mode 100644 |
251 | index 0000000..6d1bbfd | |||
252 | --- /dev/null | |||
253 | +++ b/debian/patches/0001-snap-plugin-segfault.patch | |||
254 | @@ -0,0 +1,32 @@ | |||
255 | 1 | From e766ac5bd36295a851bf08296734f7df45208dd9 Mon Sep 17 00:00:00 2001 | ||
256 | 2 | From: Andrea Azzarone <azzaronea@gmail.com> | ||
257 | 3 | Date: Mon, 16 Jul 2018 21:44:45 +0200 | ||
258 | 4 | Subject: [PATCH] snap: Don't pass NULL to g_date_time_to_unix | ||
259 | 5 | |||
260 | 6 | As per API documentation, snapd_snap_get_install_date can return NULL. Passing | ||
261 | 7 | NULL to g_date_time_to_unix results in a crash. When this happens we should pass | ||
262 | 8 | GS_APP_INSTALL_DATE_UNKNOWN to gs_app_set_install_date. | ||
263 | 9 | |||
264 | 10 | Fixes: https://bugs.launchpad.net/bugs/1781996 | ||
265 | 11 | --- | ||
266 | 12 | plugins/snap/gs-plugin-snap.c | 4 +++- | ||
267 | 13 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
268 | 14 | |||
269 | 15 | diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c | ||
270 | 16 | index 14571efe..6323f6ca 100644 | ||
271 | 17 | --- a/plugins/snap/gs-plugin-snap.c | ||
272 | 18 | +++ b/plugins/snap/gs-plugin-snap.c | ||
273 | 19 | @@ -823,9 +823,11 @@ gs_plugin_refine_app (GsPlugin *plugin, | ||
274 | 20 | /* add information specific to installed snaps */ | ||
275 | 21 | if (local_snap != NULL) { | ||
276 | 22 | SnapdApp *snap_app; | ||
277 | 23 | + GDateTime *install_date; | ||
278 | 24 | |||
279 | 25 | + install_date = snapd_snap_get_install_date (local_snap); | ||
280 | 26 | gs_app_set_size_installed (app, snapd_snap_get_installed_size (local_snap)); | ||
281 | 27 | - gs_app_set_install_date (app, g_date_time_to_unix (snapd_snap_get_install_date (local_snap))); | ||
282 | 28 | + gs_app_set_install_date (app, install_date != NULL ? g_date_time_to_unix (install_date) : GS_APP_INSTALL_DATE_UNKNOWN); | ||
283 | 29 | |||
284 | 30 | snap_app = get_primary_app (local_snap); | ||
285 | 31 | if (snap_app != NULL) { | ||
286 | 32 | |||
287 | diff --git a/debian/patches/0003-Sort-snaps-before-other-apps.patch b/debian/patches/0003-Sort-snaps-before-other-apps.patch | |||
288 | index 85e799e..31693e9 100644 | |||
289 | --- a/debian/patches/0003-Sort-snaps-before-other-apps.patch | |||
290 | +++ b/debian/patches/0003-Sort-snaps-before-other-apps.patch | |||
291 | @@ -1,7 +1,14 @@ | |||
292 | 1 | <<<<<<< debian/patches/0003-Sort-snaps-before-other-apps.patch | ||
293 | 1 | From 93554bae8d7de73ad56532abc0b4d28a8bc8290b Mon Sep 17 00:00:00 2001 | 2 | From 93554bae8d7de73ad56532abc0b4d28a8bc8290b Mon Sep 17 00:00:00 2001 |
294 | 2 | From: Robert Ancell <robert.ancell@canonical.com> | 3 | From: Robert Ancell <robert.ancell@canonical.com> |
295 | 3 | Date: Wed, 30 Mar 2016 15:55:47 +1300 | 4 | Date: Wed, 30 Mar 2016 15:55:47 +1300 |
296 | 4 | Subject: [PATCH 03/26] Sort snaps before other apps | 5 | Subject: [PATCH 03/26] Sort snaps before other apps |
297 | 6 | ======= | ||
298 | 7 | From d11180688c730f3f27edbb6f374858b33144ee42 Mon Sep 17 00:00:00 2001 | ||
299 | 8 | From: Robert Ancell <robert.ancell@canonical.com> | ||
300 | 9 | Date: Wed, 30 Mar 2016 15:55:47 +1300 | ||
301 | 10 | Subject: [PATCH 03/28] Sort snaps before other apps | ||
302 | 11 | >>>>>>> debian/patches/0003-Sort-snaps-before-other-apps.patch | ||
303 | 5 | 12 | ||
304 | 6 | --- | 13 | --- |
305 | 7 | plugins/snap/gs-plugin-snap.c | 1 + | 14 | plugins/snap/gs-plugin-snap.c | 1 + |
306 | @@ -9,10 +16,17 @@ Subject: [PATCH 03/26] Sort snaps before other apps | |||
307 | 9 | 2 files changed, 7 insertions(+) | 16 | 2 files changed, 7 insertions(+) |
308 | 10 | 17 | ||
309 | 11 | diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c | 18 | diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c |
310 | 19 | <<<<<<< debian/patches/0003-Sort-snaps-before-other-apps.patch | ||
311 | 12 | index d34948fe..f9c6a347 100644 | 20 | index d34948fe..f9c6a347 100644 |
312 | 13 | --- a/plugins/snap/gs-plugin-snap.c | 21 | --- a/plugins/snap/gs-plugin-snap.c |
313 | 14 | +++ b/plugins/snap/gs-plugin-snap.c | 22 | +++ b/plugins/snap/gs-plugin-snap.c |
314 | 15 | @@ -585,6 +585,7 @@ gs_plugin_add_search (GsPlugin *plugin, | 23 | @@ -585,6 +585,7 @@ gs_plugin_add_search (GsPlugin *plugin, |
315 | 24 | ======= | ||
316 | 25 | index 510a02a7..45f65bda 100644 | ||
317 | 26 | --- a/plugins/snap/gs-plugin-snap.c | ||
318 | 27 | +++ b/plugins/snap/gs-plugin-snap.c | ||
319 | 28 | @@ -590,6 +590,7 @@ gs_plugin_add_search (GsPlugin *plugin, | ||
320 | 29 | >>>>>>> debian/patches/0003-Sort-snaps-before-other-apps.patch | ||
321 | 16 | 30 | ||
322 | 17 | for (i = 0; i < snaps->len; i++) { | 31 | for (i = 0; i < snaps->len; i++) { |
323 | 18 | g_autoptr(GsApp) app = snap_to_app (plugin, g_ptr_array_index (snaps, i)); | 32 | g_autoptr(GsApp) app = snap_to_app (plugin, g_ptr_array_index (snaps, i)); |
324 | diff --git a/debian/patches/0006-packagekit-Disable-updates.patch b/debian/patches/0006-packagekit-Disable-updates.patch | |||
325 | index 7c3ea9f..5bd0a63 100644 | |||
326 | --- a/debian/patches/0006-packagekit-Disable-updates.patch | |||
327 | +++ b/debian/patches/0006-packagekit-Disable-updates.patch | |||
328 | @@ -1,15 +1,26 @@ | |||
329 | 1 | <<<<<<< debian/patches/0006-packagekit-Disable-updates.patch | ||
330 | 1 | From 5117239ec132fc976ae9cc74e8f40a310221e602 Mon Sep 17 00:00:00 2001 | 2 | From 5117239ec132fc976ae9cc74e8f40a310221e602 Mon Sep 17 00:00:00 2001 |
331 | 2 | From: Olivier Tilloy <olivier.tilloy@canonical.com> | 3 | From: Olivier Tilloy <olivier.tilloy@canonical.com> |
332 | 3 | Date: Tue, 7 Aug 2018 19:03:23 +0200 | 4 | Date: Tue, 7 Aug 2018 19:03:23 +0200 |
333 | 4 | Subject: [PATCH 06/26] packagekit: Disable updates | 5 | Subject: [PATCH 06/26] packagekit: Disable updates |
334 | 5 | 6 | ||
335 | 6 | In Ubuntu we use Update Manager for this currently. The long term plan is to use Software, but we're not there yet. | 7 | In Ubuntu we use Update Manager for this currently. The long term plan is to use Software, but we're not there yet. |
336 | 8 | ======= | ||
337 | 9 | Description: [PATCH 06/20] packagekit: Disable updates | ||
338 | 10 | In Ubuntu we use Update Manager for this currently. The long term plan | ||
339 | 11 | is to use Software, but we're not there yet. | ||
340 | 12 | Author: Iain Lane <iain@orangesquash.org.uk> | ||
341 | 13 | Author: Olivier Tilloy <olivier.tilloy@canonical.com> | ||
342 | 14 | Date: Thu, 20 Jul 2017 10:12:58 +0100 | ||
343 | 15 | Last-Update: 2018-08-01 | ||
344 | 16 | >>>>>>> debian/patches/0006-packagekit-Disable-updates.patch | ||
345 | 7 | --- | 17 | --- |
346 | 8 | plugins/packagekit/gs-plugin-packagekit-refresh.c | 3 +++ | 18 | plugins/packagekit/gs-plugin-packagekit-refresh.c | 3 +++ |
347 | 9 | plugins/packagekit/gs-plugin-packagekit.c | 3 +++ | 19 | plugins/packagekit/gs-plugin-packagekit.c | 3 +++ |
348 | 10 | plugins/packagekit/gs-plugin-systemd-updates.c | 3 +++ | 20 | plugins/packagekit/gs-plugin-systemd-updates.c | 3 +++ |
349 | 11 | 3 files changed, 9 insertions(+) | 21 | 3 files changed, 9 insertions(+) |
350 | 12 | 22 | ||
351 | 23 | <<<<<<< debian/patches/0006-packagekit-Disable-updates.patch | ||
352 | 13 | diff --git a/plugins/packagekit/gs-plugin-packagekit-refresh.c b/plugins/packagekit/gs-plugin-packagekit-refresh.c | 24 | diff --git a/plugins/packagekit/gs-plugin-packagekit-refresh.c b/plugins/packagekit/gs-plugin-packagekit-refresh.c |
353 | 14 | index 2b8ce27c..a6002d5d 100644 | 25 | index 2b8ce27c..a6002d5d 100644 |
354 | 15 | --- a/plugins/packagekit/gs-plugin-packagekit-refresh.c | 26 | --- a/plugins/packagekit/gs-plugin-packagekit-refresh.c |
355 | @@ -40,6 +51,8 @@ index 8d7eb551..db3cc49d 100644 | |||
356 | 40 | results = pk_client_get_updates (PK_CLIENT (priv->task), | 51 | results = pk_client_get_updates (PK_CLIENT (priv->task), |
357 | 41 | diff --git a/plugins/packagekit/gs-plugin-systemd-updates.c b/plugins/packagekit/gs-plugin-systemd-updates.c | 52 | diff --git a/plugins/packagekit/gs-plugin-systemd-updates.c b/plugins/packagekit/gs-plugin-systemd-updates.c |
358 | 42 | index 449a9726..320af255 100644 | 53 | index 449a9726..320af255 100644 |
359 | 54 | ======= | ||
360 | 55 | >>>>>>> debian/patches/0006-packagekit-Disable-updates.patch | ||
361 | 43 | --- a/plugins/packagekit/gs-plugin-systemd-updates.c | 56 | --- a/plugins/packagekit/gs-plugin-systemd-updates.c |
362 | 44 | +++ b/plugins/packagekit/gs-plugin-systemd-updates.c | 57 | +++ b/plugins/packagekit/gs-plugin-systemd-updates.c |
363 | 45 | @@ -253,6 +253,9 @@ gs_plugin_update (GsPlugin *plugin, | 58 | @@ -253,6 +253,9 @@ gs_plugin_update (GsPlugin *plugin, |
364 | @@ -49,9 +62,27 @@ index 449a9726..320af255 100644 | |||
365 | 49 | + /* In Ubuntu we're using Update Manager for this, for now. */ | 62 | + /* In Ubuntu we're using Update Manager for this, for now. */ |
366 | 50 | + return TRUE; | 63 | + return TRUE; |
367 | 51 | + | 64 | + |
368 | 65 | <<<<<<< debian/patches/0006-packagekit-Disable-updates.patch | ||
369 | 52 | /* any are us? */ | 66 | /* any are us? */ |
370 | 53 | for (guint i = 0; i < gs_app_list_length (list); i++) { | 67 | for (guint i = 0; i < gs_app_list_length (list); i++) { |
371 | 54 | GsApp *app = gs_app_list_index (list, i); | 68 | GsApp *app = gs_app_list_index (list, i); |
372 | 55 | -- | 69 | -- |
373 | 56 | 2.17.1 | 70 | 2.17.1 |
374 | 57 | 71 | ||
375 | 72 | ======= | ||
376 | 73 | /* get the id's if the file exists */ | ||
377 | 74 | package_ids = pk_offline_get_prepared_ids (&error_local); | ||
378 | 75 | if (package_ids == NULL) { | ||
379 | 76 | --- a/plugins/packagekit/gs-plugin-packagekit-refresh.c | ||
380 | 77 | +++ b/plugins/packagekit/gs-plugin-packagekit-refresh.c | ||
381 | 78 | @@ -97,6 +97,9 @@ gs_plugin_refresh (GsPlugin *plugin, | ||
382 | 79 | } | ||
383 | 80 | } | ||
384 | 81 | |||
385 | 82 | + /* In Ubuntu we're using Update Manager for this, for now (LP: #1775226) */ | ||
386 | 83 | + return TRUE; | ||
387 | 84 | + | ||
388 | 85 | /* download all the packages themselves */ | ||
389 | 86 | if (flags & GS_PLUGIN_REFRESH_FLAGS_PAYLOAD) { | ||
390 | 87 | g_auto(GStrv) package_ids = NULL; | ||
391 | 88 | >>>>>>> debian/patches/0006-packagekit-Disable-updates.patch | ||
392 | diff --git a/debian/patches/0011-Support-snap-channels.patch b/debian/patches/0011-Support-snap-channels.patch | |||
393 | index c02b5ec..949ab97 100644 | |||
394 | --- a/debian/patches/0011-Support-snap-channels.patch | |||
395 | +++ b/debian/patches/0011-Support-snap-channels.patch | |||
396 | @@ -1,12 +1,22 @@ | |||
397 | 1 | <<<<<<< debian/patches/0011-Support-snap-channels.patch | ||
398 | 1 | From ab6caf6eab44077952e18a88021bcba0b4867991 Mon Sep 17 00:00:00 2001 | 2 | From ab6caf6eab44077952e18a88021bcba0b4867991 Mon Sep 17 00:00:00 2001 |
399 | 3 | ======= | ||
400 | 4 | From c2a9016780d84fcf7978c25c84a244bf169b4a99 Mon Sep 17 00:00:00 2001 | ||
401 | 5 | >>>>>>> debian/patches/0011-Support-snap-channels.patch | ||
402 | 2 | From: Robert Ancell <robert.ancell@canonical.com> | 6 | From: Robert Ancell <robert.ancell@canonical.com> |
403 | 3 | Date: Thu, 23 Nov 2017 10:54:20 +1300 | 7 | Date: Thu, 23 Nov 2017 10:54:20 +1300 |
404 | 4 | Subject: [PATCH 11/24] Support snap channels | 8 | Subject: [PATCH 11/24] Support snap channels |
405 | 5 | 9 | ||
406 | 6 | --- | 10 | --- |
407 | 11 | <<<<<<< debian/patches/0011-Support-snap-channels.patch | ||
408 | 7 | lib/gs-app.c | 91 ++++++++++++ | 12 | lib/gs-app.c | 91 ++++++++++++ |
409 | 8 | lib/gs-app.h | 7 + | 13 | lib/gs-app.h | 7 + |
410 | 9 | lib/gs-channel.c | 116 +++++++++++++++ | 14 | lib/gs-channel.c | 116 +++++++++++++++ |
411 | 15 | ======= | ||
412 | 16 | lib/gs-app.c | 108 +++++++++++++ | ||
413 | 17 | lib/gs-app.h | 9 ++ | ||
414 | 18 | lib/gs-channel.c | 116 ++++++++++++++ | ||
415 | 19 | >>>>>>> debian/patches/0011-Support-snap-channels.patch | ||
416 | 10 | lib/gs-channel.h | 44 ++++++ | 20 | lib/gs-channel.h | 44 ++++++ |
417 | 11 | lib/gs-plugin-job-private.h | 1 + | 21 | lib/gs-plugin-job-private.h | 1 + |
418 | 12 | lib/gs-plugin-job.c | 31 ++++ | 22 | lib/gs-plugin-job.c | 31 ++++ |
419 | @@ -20,16 +30,28 @@ Subject: [PATCH 11/24] Support snap channels | |||
420 | 20 | lib/gs-utils.h | 2 + | 30 | lib/gs-utils.h | 2 + |
421 | 21 | lib/meson.build | 2 + | 31 | lib/meson.build | 2 + |
422 | 22 | plugins/dummy/gs-plugin-dummy.c | 11 ++ | 32 | plugins/dummy/gs-plugin-dummy.c | 11 ++ |
423 | 33 | <<<<<<< debian/patches/0011-Support-snap-channels.patch | ||
424 | 23 | plugins/snap/gs-plugin-snap.c | 254 +++++++++++++++++++++++++++++--- | 34 | plugins/snap/gs-plugin-snap.c | 254 +++++++++++++++++++++++++++++--- |
425 | 24 | src/gs-details-page.c | 199 ++++++++++++++++++++++++- | 35 | src/gs-details-page.c | 199 ++++++++++++++++++++++++- |
426 | 25 | src/gs-details-page.ui | 104 ++++++++++--- | 36 | src/gs-details-page.ui | 104 ++++++++++--- |
427 | 26 | src/gtk-style.css | 31 ++++ | 37 | src/gtk-style.css | 31 ++++ |
428 | 27 | 20 files changed, 944 insertions(+), 43 deletions(-) | 38 | 20 files changed, 944 insertions(+), 43 deletions(-) |
429 | 39 | ======= | ||
430 | 40 | plugins/snap/gs-plugin-snap.c | 264 +++++++++++++++++++++++++++++--- | ||
431 | 41 | src/gs-details-page.c | 200 +++++++++++++++++++++++- | ||
432 | 42 | src/gs-details-page.ui | 104 ++++++++++--- | ||
433 | 43 | src/gtk-style.css | 31 ++++ | ||
434 | 44 | 21 files changed, 968 insertions(+), 51 deletions(-) | ||
435 | 45 | >>>>>>> debian/patches/0011-Support-snap-channels.patch | ||
436 | 28 | create mode 100644 lib/gs-channel.c | 46 | create mode 100644 lib/gs-channel.c |
437 | 29 | create mode 100644 lib/gs-channel.h | 47 | create mode 100644 lib/gs-channel.h |
438 | 30 | 48 | ||
439 | 31 | diff --git a/lib/gs-app.c b/lib/gs-app.c | 49 | diff --git a/lib/gs-app.c b/lib/gs-app.c |
440 | 50 | <<<<<<< debian/patches/0011-Support-snap-channels.patch | ||
441 | 32 | index 805c6894..41fe8039 100644 | 51 | index 805c6894..41fe8039 100644 |
442 | 52 | ======= | ||
443 | 53 | index 3dde87c8..3967578e 100644 | ||
444 | 54 | >>>>>>> debian/patches/0011-Support-snap-channels.patch | ||
445 | 33 | --- a/lib/gs-app.c | 55 | --- a/lib/gs-app.c |
446 | 34 | +++ b/lib/gs-app.c | 56 | +++ b/lib/gs-app.c |
447 | 35 | @@ -126,6 +126,8 @@ typedef struct | 57 | @@ -126,6 +126,8 @@ typedef struct |
448 | @@ -60,7 +82,35 @@ index 805c6894..41fe8039 100644 | |||
449 | 60 | keys = g_hash_table_get_keys (priv->metadata); | 82 | keys = g_hash_table_get_keys (priv->metadata); |
450 | 61 | for (GList *l = keys; l != NULL; l = l->next) { | 83 | for (GList *l = keys; l != NULL; l = l->next) { |
451 | 62 | GVariant *val; | 84 | GVariant *val; |
452 | 85 | <<<<<<< debian/patches/0011-Support-snap-channels.patch | ||
453 | 63 | @@ -3985,6 +3999,80 @@ gs_app_get_priority (GsApp *app) | 86 | @@ -3985,6 +3999,80 @@ gs_app_get_priority (GsApp *app) |
454 | 87 | ======= | ||
455 | 88 | @@ -3765,6 +3779,23 @@ gs_app_add_kudo (GsApp *app, GsAppKudo kudo) | ||
456 | 89 | priv->kudos |= kudo; | ||
457 | 90 | } | ||
458 | 91 | |||
459 | 92 | +/** | ||
460 | 93 | + * gs_app_remove_kudo: | ||
461 | 94 | + * @app: a #GsApp | ||
462 | 95 | + * @kudo: a #GsAppKudo, e.g. %GS_APP_KUDO_MY_LANGUAGE | ||
463 | 96 | + * | ||
464 | 97 | + * Removes a kudo from an application. | ||
465 | 98 | + * | ||
466 | 99 | + * Since: 3.28 | ||
467 | 100 | + **/ | ||
468 | 101 | +void | ||
469 | 102 | +gs_app_remove_kudo (GsApp *app, GsAppKudo kudo) | ||
470 | 103 | +{ | ||
471 | 104 | + GsAppPrivate *priv = gs_app_get_instance_private (app); | ||
472 | 105 | + g_return_if_fail (GS_IS_APP (app)); | ||
473 | 106 | + priv->kudos &= ~kudo; | ||
474 | 107 | +} | ||
475 | 108 | + | ||
476 | 109 | /** | ||
477 | 110 | * gs_app_has_kudo: | ||
478 | 111 | * @app: a #GsApp | ||
479 | 112 | @@ -4040,6 +4071,80 @@ gs_app_get_priority (GsApp *app) | ||
480 | 113 | >>>>>>> debian/patches/0011-Support-snap-channels.patch | ||
481 | 64 | return priv->priority; | 114 | return priv->priority; |
482 | 65 | } | 115 | } |
483 | 66 | 116 | ||
484 | @@ -141,7 +191,11 @@ index 805c6894..41fe8039 100644 | |||
485 | 141 | /** | 191 | /** |
486 | 142 | * gs_app_get_cancellable: | 192 | * gs_app_get_cancellable: |
487 | 143 | * @app: a #GsApp | 193 | * @app: a #GsApp |
488 | 194 | <<<<<<< debian/patches/0011-Support-snap-channels.patch | ||
489 | 144 | @@ -4166,6 +4254,8 @@ gs_app_dispose (GObject *object) | 195 | @@ -4166,6 +4254,8 @@ gs_app_dispose (GObject *object) |
490 | 196 | ======= | ||
491 | 197 | @@ -4222,6 +4327,8 @@ gs_app_dispose (GObject *object) | ||
492 | 198 | >>>>>>> debian/patches/0011-Support-snap-channels.patch | ||
493 | 145 | g_clear_pointer (&priv->reviews, g_ptr_array_unref); | 199 | g_clear_pointer (&priv->reviews, g_ptr_array_unref); |
494 | 146 | g_clear_pointer (&priv->provides, g_ptr_array_unref); | 200 | g_clear_pointer (&priv->provides, g_ptr_array_unref); |
495 | 147 | g_clear_pointer (&priv->icons, g_ptr_array_unref); | 201 | g_clear_pointer (&priv->icons, g_ptr_array_unref); |
496 | @@ -150,7 +204,11 @@ index 805c6894..41fe8039 100644 | |||
497 | 150 | 204 | ||
498 | 151 | G_OBJECT_CLASS (gs_app_parent_class)->dispose (object); | 205 | G_OBJECT_CLASS (gs_app_parent_class)->dispose (object); |
499 | 152 | } | 206 | } |
500 | 207 | <<<<<<< debian/patches/0011-Support-snap-channels.patch | ||
501 | 153 | @@ -4353,6 +4443,7 @@ gs_app_init (GsApp *app) | 208 | @@ -4353,6 +4443,7 @@ gs_app_init (GsApp *app) |
502 | 209 | ======= | ||
503 | 210 | @@ -4411,6 +4518,7 @@ gs_app_init (GsApp *app) | ||
504 | 211 | >>>>>>> debian/patches/0011-Support-snap-channels.patch | ||
505 | 154 | priv->reviews = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref); | 212 | priv->reviews = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref); |
506 | 155 | priv->provides = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref); | 213 | priv->provides = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref); |
507 | 156 | priv->icons = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref); | 214 | priv->icons = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref); |
508 | @@ -472,7 +530,11 @@ index fdca6868..cfd9af78 100644 | |||
509 | 472 | #define gs_plugin_job_newv(a,...) GS_PLUGIN_JOB(g_object_new(GS_TYPE_PLUGIN_JOB, "action", a, __VA_ARGS__)) | 530 | #define gs_plugin_job_newv(a,...) GS_PLUGIN_JOB(g_object_new(GS_TYPE_PLUGIN_JOB, "action", a, __VA_ARGS__)) |
510 | 473 | 531 | ||
511 | 474 | diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c | 532 | diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c |
512 | 533 | <<<<<<< debian/patches/0011-Support-snap-channels.patch | ||
513 | 475 | index ca327cdb..f3a83016 100644 | 534 | index ca327cdb..f3a83016 100644 |
514 | 535 | ======= | ||
515 | 536 | index 2fb02e3c..989f3264 100644 | ||
516 | 537 | >>>>>>> debian/patches/0011-Support-snap-channels.patch | ||
517 | 476 | --- a/lib/gs-plugin-loader.c | 538 | --- a/lib/gs-plugin-loader.c |
518 | 477 | +++ b/lib/gs-plugin-loader.c | 539 | +++ b/lib/gs-plugin-loader.c |
519 | 478 | @@ -135,6 +135,11 @@ typedef gboolean (*GsPluginPurchaseFunc) (GsPlugin *plugin, | 540 | @@ -135,6 +135,11 @@ typedef gboolean (*GsPluginPurchaseFunc) (GsPlugin *plugin, |
520 | @@ -487,7 +549,11 @@ index ca327cdb..f3a83016 100644 | |||
521 | 487 | typedef gboolean (*GsPluginReviewFunc) (GsPlugin *plugin, | 549 | typedef gboolean (*GsPluginReviewFunc) (GsPlugin *plugin, |
522 | 488 | GsApp *app, | 550 | GsApp *app, |
523 | 489 | AsReview *review, | 551 | AsReview *review, |
524 | 552 | <<<<<<< debian/patches/0011-Support-snap-channels.patch | ||
525 | 490 | @@ -618,6 +623,14 @@ gs_plugin_loader_call_vfunc (GsPluginLoaderHelper *helper, | 553 | @@ -618,6 +623,14 @@ gs_plugin_loader_call_vfunc (GsPluginLoaderHelper *helper, |
526 | 554 | ======= | ||
527 | 555 | @@ -667,6 +672,14 @@ gs_plugin_loader_call_vfunc (GsPluginLoaderHelper *helper, | ||
528 | 556 | >>>>>>> debian/patches/0011-Support-snap-channels.patch | ||
529 | 491 | cancellable, &error_local); | 557 | cancellable, &error_local); |
530 | 492 | } | 558 | } |
531 | 493 | break; | 559 | break; |
532 | @@ -633,10 +699,17 @@ index 868d5a50..4a749182 100644 | |||
533 | 633 | 699 | ||
534 | 634 | static void | 700 | static void |
535 | 635 | diff --git a/lib/gs-utils.c b/lib/gs-utils.c | 701 | diff --git a/lib/gs-utils.c b/lib/gs-utils.c |
536 | 702 | <<<<<<< debian/patches/0011-Support-snap-channels.patch | ||
537 | 636 | index 23d24995..0db55d84 100644 | 703 | index 23d24995..0db55d84 100644 |
538 | 637 | --- a/lib/gs-utils.c | 704 | --- a/lib/gs-utils.c |
539 | 638 | +++ b/lib/gs-utils.c | 705 | +++ b/lib/gs-utils.c |
540 | 639 | @@ -982,6 +982,41 @@ gs_utils_get_url_path (const gchar *url) | 706 | @@ -982,6 +982,41 @@ gs_utils_get_url_path (const gchar *url) |
541 | 707 | ======= | ||
542 | 708 | index f59b8c9c..d648e240 100644 | ||
543 | 709 | --- a/lib/gs-utils.c | ||
544 | 710 | +++ b/lib/gs-utils.c | ||
545 | 711 | @@ -983,6 +983,41 @@ gs_utils_get_url_path (const gchar *url) | ||
546 | 712 | >>>>>>> debian/patches/0011-Support-snap-channels.patch | ||
547 | 640 | return g_strdup (path); | 713 | return g_strdup (path); |
548 | 641 | } | 714 | } |
549 | 642 | 715 | ||
550 | @@ -709,8 +782,26 @@ index 7b11e72c..ae5ad87b 100644 | |||
551 | 709 | 'gs-category.c', | 782 | 'gs-category.c', |
552 | 710 | + 'gs-channel.c', | 783 | + 'gs-channel.c', |
553 | 711 | 'gs-debug.c', | 784 | 'gs-debug.c', |
554 | 785 | <<<<<<< debian/patches/0011-Support-snap-channels.patch | ||
555 | 712 | 'gs-ioprio.c', | 786 | 'gs-ioprio.c', |
556 | 713 | 'gs-ioprio.h', | 787 | 'gs-ioprio.h', |
557 | 788 | ======= | ||
558 | 789 | 'gs-os-release.c', | ||
559 | 790 | 'gs-plugin.c', | ||
560 | 791 | diff --git a/meson.build b/meson.build | ||
561 | 792 | index 9ded0971..3b2f726e 100644 | ||
562 | 793 | --- a/meson.build | ||
563 | 794 | +++ b/meson.build | ||
564 | 795 | @@ -166,7 +166,7 @@ if get_option('enable-gudev') | ||
565 | 796 | endif | ||
566 | 797 | |||
567 | 798 | if get_option('enable-snap') | ||
568 | 799 | - snap = dependency('snapd-glib', version : '>= 1.19') | ||
569 | 800 | + snap = dependency('snapd-glib', version : '>= 1.31') | ||
570 | 801 | endif | ||
571 | 802 | |||
572 | 803 | gnome = import('gnome') | ||
573 | 804 | >>>>>>> debian/patches/0011-Support-snap-channels.patch | ||
574 | 714 | diff --git a/plugins/dummy/gs-plugin-dummy.c b/plugins/dummy/gs-plugin-dummy.c | 805 | diff --git a/plugins/dummy/gs-plugin-dummy.c b/plugins/dummy/gs-plugin-dummy.c |
575 | 715 | index 6f739ff7..02301bec 100644 | 806 | index 6f739ff7..02301bec 100644 |
576 | 716 | --- a/plugins/dummy/gs-plugin-dummy.c | 807 | --- a/plugins/dummy/gs-plugin-dummy.c |
577 | @@ -734,7 +825,11 @@ index 6f739ff7..02301bec 100644 | |||
578 | 734 | gs_plugin_app_upgrade_download (GsPlugin *plugin, GsApp *app, | 825 | gs_plugin_app_upgrade_download (GsPlugin *plugin, GsApp *app, |
579 | 735 | GCancellable *cancellable, GError **error) | 826 | GCancellable *cancellable, GError **error) |
580 | 736 | diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c | 827 | diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c |
581 | 828 | <<<<<<< debian/patches/0011-Support-snap-channels.patch | ||
582 | 737 | index 693f9c8a..064443d1 100644 | 829 | index 693f9c8a..064443d1 100644 |
583 | 830 | ======= | ||
584 | 831 | index d7957712..b5add5c1 100644 | ||
585 | 832 | >>>>>>> debian/patches/0011-Support-snap-channels.patch | ||
586 | 738 | --- a/plugins/snap/gs-plugin-snap.c | 833 | --- a/plugins/snap/gs-plugin-snap.c |
587 | 739 | +++ b/plugins/snap/gs-plugin-snap.c | 834 | +++ b/plugins/snap/gs-plugin-snap.c |
588 | 740 | @@ -36,6 +36,27 @@ struct GsPluginData { | 835 | @@ -36,6 +36,27 @@ struct GsPluginData { |
589 | @@ -875,7 +970,11 @@ index 693f9c8a..064443d1 100644 | |||
590 | 875 | if (store_snap != NULL) | 970 | if (store_snap != NULL) |
591 | 876 | return load_store_icon (app, store_snap); | 971 | return load_store_icon (app, store_snap); |
592 | 877 | 972 | ||
593 | 973 | <<<<<<< debian/patches/0011-Support-snap-channels.patch | ||
594 | 878 | @@ -782,6 +812,102 @@ gs_plugin_snap_get_description_safe (SnapdSnap *snap) | 974 | @@ -782,6 +812,102 @@ gs_plugin_snap_get_description_safe (SnapdSnap *snap) |
595 | 975 | ======= | ||
596 | 976 | @@ -787,6 +819,102 @@ gs_plugin_snap_get_description_safe (SnapdSnap *snap) | ||
597 | 977 | >>>>>>> debian/patches/0011-Support-snap-channels.patch | ||
598 | 879 | return g_string_free (str, FALSE); | 978 | return g_string_free (str, FALSE); |
599 | 880 | } | 979 | } |
600 | 881 | 980 | ||
601 | @@ -978,7 +1077,11 @@ index 693f9c8a..064443d1 100644 | |||
602 | 978 | gboolean | 1077 | gboolean |
603 | 979 | gs_plugin_refine_app (GsPlugin *plugin, | 1078 | gs_plugin_refine_app (GsPlugin *plugin, |
604 | 980 | GsApp *app, | 1079 | GsApp *app, |
605 | 1080 | <<<<<<< debian/patches/0011-Support-snap-channels.patch | ||
606 | 981 | @@ -791,7 +917,7 @@ gs_plugin_refine_app (GsPlugin *plugin, | 1081 | @@ -791,7 +917,7 @@ gs_plugin_refine_app (GsPlugin *plugin, |
607 | 1082 | ======= | ||
608 | 1083 | @@ -796,7 +924,7 @@ gs_plugin_refine_app (GsPlugin *plugin, | ||
609 | 1084 | >>>>>>> debian/patches/0011-Support-snap-channels.patch | ||
610 | 982 | { | 1085 | { |
611 | 983 | GsPluginData *priv = gs_plugin_get_data (plugin); | 1086 | GsPluginData *priv = gs_plugin_get_data (plugin); |
612 | 984 | g_autoptr(SnapdClient) client = NULL; | 1087 | g_autoptr(SnapdClient) client = NULL; |
613 | @@ -987,7 +1090,11 @@ index 693f9c8a..064443d1 100644 | |||
614 | 987 | g_autoptr(SnapdSnap) local_snap = NULL; | 1090 | g_autoptr(SnapdSnap) local_snap = NULL; |
615 | 988 | g_autoptr(SnapdSnap) store_snap = NULL; | 1091 | g_autoptr(SnapdSnap) store_snap = NULL; |
616 | 989 | SnapdSnap *snap; | 1092 | SnapdSnap *snap; |
617 | 1093 | <<<<<<< debian/patches/0011-Support-snap-channels.patch | ||
618 | 990 | @@ -808,13 +934,52 @@ gs_plugin_refine_app (GsPlugin *plugin, | 1094 | @@ -808,13 +934,52 @@ gs_plugin_refine_app (GsPlugin *plugin, |
619 | 1095 | ======= | ||
620 | 1096 | @@ -818,13 +946,52 @@ gs_plugin_refine_app (GsPlugin *plugin, | ||
621 | 1097 | >>>>>>> debian/patches/0011-Support-snap-channels.patch | ||
622 | 991 | 1098 | ||
623 | 992 | /* get information from local snaps and store */ | 1099 | /* get information from local snaps and store */ |
624 | 993 | local_snap = snapd_client_get_snap_sync (client, gs_app_get_metadata_item (app, "snap::name"), cancellable, NULL); | 1100 | local_snap = snapd_client_get_snap_sync (client, gs_app_get_metadata_item (app, "snap::name"), cancellable, NULL); |
625 | @@ -1043,7 +1150,11 @@ index 693f9c8a..064443d1 100644 | |||
626 | 1043 | else | 1150 | else |
627 | 1044 | gs_app_set_state (app, AS_APP_STATE_AVAILABLE); | 1151 | gs_app_set_state (app, AS_APP_STATE_AVAILABLE); |
628 | 1045 | 1152 | ||
629 | 1153 | <<<<<<< debian/patches/0011-Support-snap-channels.patch | ||
630 | 1046 | @@ -926,6 +1091,7 @@ gs_plugin_app_install (GsPlugin *plugin, | 1154 | @@ -926,6 +1091,7 @@ gs_plugin_app_install (GsPlugin *plugin, |
631 | 1155 | ======= | ||
632 | 1156 | @@ -929,6 +1096,7 @@ gs_plugin_app_install (GsPlugin *plugin, | ||
633 | 1157 | >>>>>>> debian/patches/0011-Support-snap-channels.patch | ||
634 | 1047 | { | 1158 | { |
635 | 1048 | g_autoptr(SnapdClient) client = NULL; | 1159 | g_autoptr(SnapdClient) client = NULL; |
636 | 1049 | SnapdInstallFlags flags = SNAPD_INSTALL_FLAGS_NONE; | 1160 | SnapdInstallFlags flags = SNAPD_INSTALL_FLAGS_NONE; |
637 | @@ -1051,7 +1162,11 @@ index 693f9c8a..064443d1 100644 | |||
638 | 1051 | 1162 | ||
639 | 1052 | /* We can only install apps we know of */ | 1163 | /* We can only install apps we know of */ |
640 | 1053 | if (g_strcmp0 (gs_app_get_management_plugin (app), "snap") != 0) | 1164 | if (g_strcmp0 (gs_app_get_management_plugin (app), "snap") != 0) |
641 | 1165 | <<<<<<< debian/patches/0011-Support-snap-channels.patch | ||
642 | 1054 | @@ -935,10 +1101,39 @@ gs_plugin_app_install (GsPlugin *plugin, | 1166 | @@ -935,10 +1101,39 @@ gs_plugin_app_install (GsPlugin *plugin, |
643 | 1167 | ======= | ||
644 | 1168 | @@ -938,10 +1106,39 @@ gs_plugin_app_install (GsPlugin *plugin, | ||
645 | 1169 | >>>>>>> debian/patches/0011-Support-snap-channels.patch | ||
646 | 1055 | if (client == NULL) | 1170 | if (client == NULL) |
647 | 1056 | return FALSE; | 1171 | return FALSE; |
648 | 1057 | 1172 | ||
649 | @@ -1092,7 +1207,11 @@ index 693f9c8a..064443d1 100644 | |||
650 | 1092 | gs_app_set_state_recover (app); | 1207 | gs_app_set_state_recover (app); |
651 | 1093 | snapd_error_convert (error); | 1208 | snapd_error_convert (error); |
652 | 1094 | return FALSE; | 1209 | return FALSE; |
653 | 1210 | <<<<<<< debian/patches/0011-Support-snap-channels.patch | ||
654 | 1095 | @@ -1027,6 +1222,31 @@ gs_plugin_launch (GsPlugin *plugin, | 1211 | @@ -1027,6 +1222,31 @@ gs_plugin_launch (GsPlugin *plugin, |
655 | 1212 | ======= | ||
656 | 1213 | @@ -1030,6 +1227,31 @@ gs_plugin_launch (GsPlugin *plugin, | ||
657 | 1214 | >>>>>>> debian/patches/0011-Support-snap-channels.patch | ||
658 | 1096 | return g_app_info_launch (info, NULL, NULL, error); | 1215 | return g_app_info_launch (info, NULL, NULL, error); |
659 | 1097 | } | 1216 | } |
660 | 1098 | 1217 | ||
661 | @@ -1124,8 +1243,35 @@ index 693f9c8a..064443d1 100644 | |||
662 | 1124 | gboolean | 1243 | gboolean |
663 | 1125 | gs_plugin_app_remove (GsPlugin *plugin, | 1244 | gs_plugin_app_remove (GsPlugin *plugin, |
664 | 1126 | GsApp *app, | 1245 | GsApp *app, |
665 | 1246 | <<<<<<< debian/patches/0011-Support-snap-channels.patch | ||
666 | 1127 | diff --git a/src/gs-details-page.c b/src/gs-details-page.c | 1247 | diff --git a/src/gs-details-page.c b/src/gs-details-page.c |
667 | 1128 | index 3eafb32b..3d57a8af 100644 | 1248 | index 3eafb32b..3d57a8af 100644 |
668 | 1249 | ======= | ||
669 | 1250 | @@ -1072,21 +1294,15 @@ gs_plugin_auth_login (GsPlugin *plugin, GsAuth *auth, | ||
670 | 1251 | g_clear_object (&priv->auth_data); | ||
671 | 1252 | if (priv->snapd_supports_polkit) { | ||
672 | 1253 | g_autoptr(SnapdClient) client = NULL; | ||
673 | 1254 | -#ifdef SNAPD_GLIB_VERSION_1_26 | ||
674 | 1255 | g_autoptr(SnapdUserInformation) user_information = NULL; | ||
675 | 1256 | -#endif | ||
676 | 1257 | |||
677 | 1258 | client = get_client (plugin, error); | ||
678 | 1259 | if (client == NULL) | ||
679 | 1260 | return FALSE; | ||
680 | 1261 | |||
681 | 1262 | -#ifdef SNAPD_GLIB_VERSION_1_26 | ||
682 | 1263 | user_information = snapd_client_login2_sync (client, gs_auth_get_username (auth), gs_auth_get_password (auth), gs_auth_get_pin (auth), NULL, error); | ||
683 | 1264 | if (user_information != NULL) | ||
684 | 1265 | priv->auth_data = g_object_ref (snapd_user_information_get_auth_data (user_information)); | ||
685 | 1266 | -#else | ||
686 | 1267 | - priv->auth_data = snapd_client_login_sync (client, gs_auth_get_username (auth), gs_auth_get_password (auth), gs_auth_get_pin (auth), NULL, error); | ||
687 | 1268 | -#endif | ||
688 | 1269 | } | ||
689 | 1270 | else | ||
690 | 1271 | priv->auth_data = snapd_login_sync (gs_auth_get_username (auth), gs_auth_get_password (auth), gs_auth_get_pin (auth), NULL, error); | ||
691 | 1272 | diff --git a/src/gs-details-page.c b/src/gs-details-page.c | ||
692 | 1273 | index 5380541c..d2132d3b 100644 | ||
693 | 1274 | >>>>>>> debian/patches/0011-Support-snap-channels.patch | ||
694 | 1129 | --- a/src/gs-details-page.c | 1275 | --- a/src/gs-details-page.c |
695 | 1130 | +++ b/src/gs-details-page.c | 1276 | +++ b/src/gs-details-page.c |
696 | 1131 | @@ -113,6 +113,8 @@ struct _GsDetailsPage | 1277 | @@ -113,6 +113,8 @@ struct _GsDetailsPage |
697 | @@ -1218,7 +1364,11 @@ index 3eafb32b..3d57a8af 100644 | |||
698 | 1218 | NULL); | 1364 | NULL); |
699 | 1219 | gs_plugin_loader_job_process_async (self->plugin_loader, plugin_job, | 1365 | gs_plugin_loader_job_process_async (self->plugin_loader, plugin_job, |
700 | 1220 | self->cancellable, | 1366 | self->cancellable, |
701 | 1367 | <<<<<<< debian/patches/0011-Support-snap-channels.patch | ||
702 | 1221 | @@ -1932,6 +1949,165 @@ gs_details_page_app_cancel_button_cb (GtkWidget *widget, GsDetailsPage *self) | 1368 | @@ -1932,6 +1949,165 @@ gs_details_page_app_cancel_button_cb (GtkWidget *widget, GsDetailsPage *self) |
703 | 1369 | ======= | ||
704 | 1370 | @@ -1930,6 +1947,166 @@ gs_details_page_app_cancel_button_cb (GtkWidget *widget, GsDetailsPage *self) | ||
705 | 1371 | >>>>>>> debian/patches/0011-Support-snap-channels.patch | ||
706 | 1222 | gs_details_page_remove_app (self); | 1372 | gs_details_page_remove_app (self); |
707 | 1223 | } | 1373 | } |
708 | 1224 | 1374 | ||
709 | @@ -1384,7 +1534,11 @@ index 3eafb32b..3d57a8af 100644 | |||
710 | 1384 | static void | 1534 | static void |
711 | 1385 | gs_details_page_app_install_button_cb (GtkWidget *widget, GsDetailsPage *self) | 1535 | gs_details_page_app_install_button_cb (GtkWidget *widget, GsDetailsPage *self) |
712 | 1386 | { | 1536 | { |
713 | 1537 | <<<<<<< debian/patches/0011-Support-snap-channels.patch | ||
714 | 1387 | @@ -2405,6 +2581,9 @@ gs_details_page_setup (GsPage *page, | 1538 | @@ -2405,6 +2581,9 @@ gs_details_page_setup (GsPage *page, |
715 | 1539 | ======= | ||
716 | 1540 | @@ -2398,6 +2575,9 @@ gs_details_page_setup (GsPage *page, | ||
717 | 1541 | >>>>>>> debian/patches/0011-Support-snap-channels.patch | ||
718 | 1388 | g_signal_connect (self->button_donate, "clicked", | 1542 | g_signal_connect (self->button_donate, "clicked", |
719 | 1389 | G_CALLBACK (gs_details_page_donate_cb), | 1543 | G_CALLBACK (gs_details_page_donate_cb), |
720 | 1390 | self); | 1544 | self); |
721 | @@ -1394,7 +1548,11 @@ index 3eafb32b..3d57a8af 100644 | |||
722 | 1394 | g_signal_connect (self->button_details_license_free, "clicked", | 1548 | g_signal_connect (self->button_details_license_free, "clicked", |
723 | 1395 | G_CALLBACK (gs_details_page_license_free_cb), | 1549 | G_CALLBACK (gs_details_page_license_free_cb), |
724 | 1396 | self); | 1550 | self); |
725 | 1551 | <<<<<<< debian/patches/0011-Support-snap-channels.patch | ||
726 | 1397 | @@ -2505,6 +2684,10 @@ gs_details_page_class_init (GsDetailsPageClass *klass) | 1552 | @@ -2505,6 +2684,10 @@ gs_details_page_class_init (GsDetailsPageClass *klass) |
727 | 1553 | ======= | ||
728 | 1554 | @@ -2495,6 +2675,10 @@ gs_details_page_class_init (GsDetailsPageClass *klass) | ||
729 | 1555 | >>>>>>> debian/patches/0011-Support-snap-channels.patch | ||
730 | 1398 | gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_details_size_installed_value); | 1556 | gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_details_size_installed_value); |
731 | 1399 | gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_details_updated_title); | 1557 | gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_details_updated_title); |
732 | 1400 | gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_details_updated_value); | 1558 | gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_details_updated_value); |
733 | diff --git a/debian/patches/0014-Add-a-basic-permissions-system.patch b/debian/patches/0014-Add-a-basic-permissions-system.patch | |||
734 | index 37803b3..77bcad1 100644 | |||
735 | --- a/debian/patches/0014-Add-a-basic-permissions-system.patch | |||
736 | +++ b/debian/patches/0014-Add-a-basic-permissions-system.patch | |||
737 | @@ -1,7 +1,14 @@ | |||
738 | 1 | <<<<<<< debian/patches/0014-Add-a-basic-permissions-system.patch | ||
739 | 1 | From f5fe307b183ae0517fb52157698bf0dbdb3364c3 Mon Sep 17 00:00:00 2001 | 2 | From f5fe307b183ae0517fb52157698bf0dbdb3364c3 Mon Sep 17 00:00:00 2001 |
740 | 2 | From: Robert Ancell <robert.ancell@canonical.com> | 3 | From: Robert Ancell <robert.ancell@canonical.com> |
741 | 3 | Date: Fri, 26 May 2017 16:30:56 +1200 | 4 | Date: Fri, 26 May 2017 16:30:56 +1200 |
742 | 4 | Subject: [PATCH 14/24] Add a basic permissions system | 5 | Subject: [PATCH 14/24] Add a basic permissions system |
743 | 6 | ======= | ||
744 | 7 | From ca6ed906e2d9ee5f0116e708e369e32124a79cb0 Mon Sep 17 00:00:00 2001 | ||
745 | 8 | From: Robert Ancell <robert.ancell@canonical.com> | ||
746 | 9 | Date: Fri, 26 May 2017 16:30:56 +1200 | ||
747 | 10 | Subject: [PATCH 14/22] Add a basic permissions system | ||
748 | 11 | >>>>>>> debian/patches/0014-Add-a-basic-permissions-system.patch | ||
749 | 5 | 12 | ||
750 | 6 | --- | 13 | --- |
751 | 7 | lib/gs-app.c | 55 ++++++++ | 14 | lib/gs-app.c | 55 ++++++++ |
752 | @@ -47,10 +54,17 @@ Subject: [PATCH 14/24] Add a basic permissions system | |||
753 | 47 | create mode 100644 src/gs-permission-switch.h | 54 | create mode 100644 src/gs-permission-switch.h |
754 | 48 | 55 | ||
755 | 49 | diff --git a/lib/gs-app.c b/lib/gs-app.c | 56 | diff --git a/lib/gs-app.c b/lib/gs-app.c |
756 | 57 | <<<<<<< debian/patches/0014-Add-a-basic-permissions-system.patch | ||
757 | 50 | index 41fe8039..28ceb474 100644 | 58 | index 41fe8039..28ceb474 100644 |
758 | 51 | --- a/lib/gs-app.c | 59 | --- a/lib/gs-app.c |
759 | 52 | +++ b/lib/gs-app.c | 60 | +++ b/lib/gs-app.c |
760 | 53 | @@ -92,6 +92,7 @@ typedef struct | 61 | @@ -92,6 +92,7 @@ typedef struct |
761 | 62 | ======= | ||
762 | 63 | index 04617630..f342844b 100644 | ||
763 | 64 | --- a/lib/gs-app.c | ||
764 | 65 | +++ b/lib/gs-app.c | ||
765 | 66 | @@ -91,6 +91,7 @@ typedef struct | ||
766 | 67 | >>>>>>> debian/patches/0014-Add-a-basic-permissions-system.patch | ||
767 | 54 | gchar *origin; | 68 | gchar *origin; |
768 | 55 | gchar *origin_appstream; | 69 | gchar *origin_appstream; |
769 | 56 | gchar *origin_hostname; | 70 | gchar *origin_hostname; |
770 | @@ -58,7 +72,11 @@ index 41fe8039..28ceb474 100644 | |||
771 | 58 | gchar *update_version; | 72 | gchar *update_version; |
772 | 59 | gchar *update_version_ui; | 73 | gchar *update_version_ui; |
773 | 60 | gchar *update_details; | 74 | gchar *update_details; |
774 | 75 | <<<<<<< debian/patches/0014-Add-a-basic-permissions-system.patch | ||
775 | 61 | @@ -448,6 +449,18 @@ gs_app_to_string_append (GsApp *app, GString *str) | 76 | @@ -448,6 +449,18 @@ gs_app_to_string_append (GsApp *app, GString *str) |
776 | 77 | ======= | ||
777 | 78 | @@ -450,6 +451,18 @@ gs_app_to_string_append (GsApp *app, GString *str) | ||
778 | 79 | >>>>>>> debian/patches/0014-Add-a-basic-permissions-system.patch | ||
779 | 62 | gs_app_kv_lpad (str, "icon-filename", | 80 | gs_app_kv_lpad (str, "icon-filename", |
780 | 63 | as_icon_get_filename (icon)); | 81 | as_icon_get_filename (icon)); |
781 | 64 | } | 82 | } |
782 | @@ -77,7 +95,11 @@ index 41fe8039..28ceb474 100644 | |||
783 | 77 | if (priv->match_value != 0) | 95 | if (priv->match_value != 0) |
784 | 78 | gs_app_kv_printf (str, "match-value", "%05x", priv->match_value); | 96 | gs_app_kv_printf (str, "match-value", "%05x", priv->match_value); |
785 | 79 | if (priv->priority != 0) | 97 | if (priv->priority != 0) |
786 | 98 | <<<<<<< debian/patches/0014-Add-a-basic-permissions-system.patch | ||
787 | 80 | @@ -2599,6 +2612,46 @@ gs_app_set_origin_hostname (GsApp *app, const gchar *origin_hostname) | 99 | @@ -2599,6 +2612,46 @@ gs_app_set_origin_hostname (GsApp *app, const gchar *origin_hostname) |
788 | 100 | ======= | ||
789 | 101 | @@ -2647,6 +2660,46 @@ gs_app_set_origin_hostname (GsApp *app, const gchar *origin_hostname) | ||
790 | 102 | >>>>>>> debian/patches/0014-Add-a-basic-permissions-system.patch | ||
791 | 81 | priv->origin_hostname = g_strdup (origin_hostname); | 103 | priv->origin_hostname = g_strdup (origin_hostname); |
792 | 82 | } | 104 | } |
793 | 83 | 105 | ||
794 | @@ -124,7 +146,11 @@ index 41fe8039..28ceb474 100644 | |||
795 | 124 | /** | 146 | /** |
796 | 125 | * gs_app_add_screenshot: | 147 | * gs_app_add_screenshot: |
797 | 126 | * @app: a #GsApp | 148 | * @app: a #GsApp |
798 | 149 | <<<<<<< debian/patches/0014-Add-a-basic-permissions-system.patch | ||
799 | 127 | @@ -4256,6 +4309,7 @@ gs_app_dispose (GObject *object) | 150 | @@ -4256,6 +4309,7 @@ gs_app_dispose (GObject *object) |
800 | 151 | ======= | ||
801 | 152 | @@ -4327,6 +4380,7 @@ gs_app_dispose (GObject *object) | ||
802 | 153 | >>>>>>> debian/patches/0014-Add-a-basic-permissions-system.patch | ||
803 | 128 | g_clear_pointer (&priv->icons, g_ptr_array_unref); | 154 | g_clear_pointer (&priv->icons, g_ptr_array_unref); |
804 | 129 | g_clear_pointer (&priv->channels, g_ptr_array_unref); | 155 | g_clear_pointer (&priv->channels, g_ptr_array_unref); |
805 | 130 | g_clear_object (&priv->active_channel); | 156 | g_clear_object (&priv->active_channel); |
806 | @@ -132,7 +158,11 @@ index 41fe8039..28ceb474 100644 | |||
807 | 132 | 158 | ||
808 | 133 | G_OBJECT_CLASS (gs_app_parent_class)->dispose (object); | 159 | G_OBJECT_CLASS (gs_app_parent_class)->dispose (object); |
809 | 134 | } | 160 | } |
810 | 161 | <<<<<<< debian/patches/0014-Add-a-basic-permissions-system.patch | ||
811 | 135 | @@ -4444,6 +4498,7 @@ gs_app_init (GsApp *app) | 162 | @@ -4444,6 +4498,7 @@ gs_app_init (GsApp *app) |
812 | 163 | ======= | ||
813 | 164 | @@ -4517,6 +4571,7 @@ gs_app_init (GsApp *app) | ||
814 | 165 | >>>>>>> debian/patches/0014-Add-a-basic-permissions-system.patch | ||
815 | 136 | priv->provides = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref); | 166 | priv->provides = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref); |
816 | 137 | priv->icons = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref); | 167 | priv->icons = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref); |
817 | 138 | priv->channels = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref); | 168 | priv->channels = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref); |
818 | @@ -141,7 +171,11 @@ index 41fe8039..28ceb474 100644 | |||
819 | 141 | g_str_equal, | 171 | g_str_equal, |
820 | 142 | g_free, | 172 | g_free, |
821 | 143 | diff --git a/lib/gs-app.h b/lib/gs-app.h | 173 | diff --git a/lib/gs-app.h b/lib/gs-app.h |
822 | 174 | <<<<<<< debian/patches/0014-Add-a-basic-permissions-system.patch | ||
823 | 144 | index 225d8708..72636aa1 100644 | 175 | index 225d8708..72636aa1 100644 |
824 | 176 | ======= | ||
825 | 177 | index 7f469fc0..72d723d7 100644 | ||
826 | 178 | >>>>>>> debian/patches/0014-Add-a-basic-permissions-system.patch | ||
827 | 145 | --- a/lib/gs-app.h | 179 | --- a/lib/gs-app.h |
828 | 146 | +++ b/lib/gs-app.h | 180 | +++ b/lib/gs-app.h |
829 | 147 | @@ -30,6 +30,7 @@ | 181 | @@ -30,6 +30,7 @@ |
830 | @@ -913,10 +947,17 @@ index ae5ad87b..ce019a47 100644 | |||
831 | 913 | 'gs-plugin-event.c', | 947 | 'gs-plugin-event.c', |
832 | 914 | 'gs-plugin-job.c', | 948 | 'gs-plugin-job.c', |
833 | 915 | diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c | 949 | diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c |
834 | 950 | <<<<<<< debian/patches/0014-Add-a-basic-permissions-system.patch | ||
835 | 916 | index 064443d1..bf5f42f3 100644 | 951 | index 064443d1..bf5f42f3 100644 |
836 | 917 | --- a/plugins/snap/gs-plugin-snap.c | 952 | --- a/plugins/snap/gs-plugin-snap.c |
837 | 918 | +++ b/plugins/snap/gs-plugin-snap.c | 953 | +++ b/plugins/snap/gs-plugin-snap.c |
838 | 919 | @@ -1062,6 +1062,170 @@ gs_plugin_refine_app (GsPlugin *plugin, | 954 | @@ -1062,6 +1062,170 @@ gs_plugin_refine_app (GsPlugin *plugin, |
839 | 955 | ======= | ||
840 | 956 | index ad700be7..ecdfc48d 100644 | ||
841 | 957 | --- a/plugins/snap/gs-plugin-snap.c | ||
842 | 958 | +++ b/plugins/snap/gs-plugin-snap.c | ||
843 | 959 | @@ -1044,6 +1044,170 @@ gs_plugin_refine_app (GsPlugin *plugin, | ||
844 | 960 | >>>>>>> debian/patches/0014-Add-a-basic-permissions-system.patch | ||
845 | 920 | if (flags & GS_PLUGIN_REFINE_FLAGS_REQUIRE_ICON && gs_app_get_pixbuf (app) == NULL) | 961 | if (flags & GS_PLUGIN_REFINE_FLAGS_REQUIRE_ICON && gs_app_get_pixbuf (app) == NULL) |
846 | 921 | load_icon (plugin, client, app, gs_app_get_metadata_item (app, "snap::name"), local_snap, store_snap, cancellable); | 962 | load_icon (plugin, client, app, gs_app_get_metadata_item (app, "snap::name"), local_snap, store_snap, cancellable); |
847 | 922 | 963 | ||
848 | @@ -1087,7 +1128,11 @@ index 064443d1..bf5f42f3 100644 | |||
849 | 1087 | return TRUE; | 1128 | return TRUE; |
850 | 1088 | } | 1129 | } |
851 | 1089 | 1130 | ||
852 | 1131 | <<<<<<< debian/patches/0014-Add-a-basic-permissions-system.patch | ||
853 | 1090 | @@ -1273,6 +1437,55 @@ gs_plugin_app_remove (GsPlugin *plugin, | 1132 | @@ -1273,6 +1437,55 @@ gs_plugin_app_remove (GsPlugin *plugin, |
854 | 1133 | ======= | ||
855 | 1134 | @@ -1255,6 +1419,55 @@ gs_plugin_app_remove (GsPlugin *plugin, | ||
856 | 1135 | >>>>>>> debian/patches/0014-Add-a-basic-permissions-system.patch | ||
857 | 1091 | return TRUE; | 1136 | return TRUE; |
858 | 1092 | } | 1137 | } |
859 | 1093 | 1138 | ||
860 | @@ -1168,7 +1213,11 @@ index 5ce90429..b6c9916d 100644 | |||
861 | 1168 | <file preprocess="xml-stripblanks">gs-prefs-dialog.ui</file> | 1213 | <file preprocess="xml-stripblanks">gs-prefs-dialog.ui</file> |
862 | 1169 | <file preprocess="xml-stripblanks">gs-removal-dialog.ui</file> | 1214 | <file preprocess="xml-stripblanks">gs-removal-dialog.ui</file> |
863 | 1170 | diff --git a/src/gs-details-page.c b/src/gs-details-page.c | 1215 | diff --git a/src/gs-details-page.c b/src/gs-details-page.c |
864 | 1216 | <<<<<<< debian/patches/0014-Add-a-basic-permissions-system.patch | ||
865 | 1171 | index 3d57a8af..071f91e6 100644 | 1217 | index 3d57a8af..071f91e6 100644 |
866 | 1218 | ======= | ||
867 | 1219 | index 256881a9..8647bdfe 100644 | ||
868 | 1220 | >>>>>>> debian/patches/0014-Add-a-basic-permissions-system.patch | ||
869 | 1172 | --- a/src/gs-details-page.c | 1221 | --- a/src/gs-details-page.c |
870 | 1173 | +++ b/src/gs-details-page.c | 1222 | +++ b/src/gs-details-page.c |
871 | 1174 | @@ -39,6 +39,7 @@ | 1223 | @@ -39,6 +39,7 @@ |
872 | @@ -1264,7 +1313,11 @@ index 3d57a8af..071f91e6 100644 | |||
873 | 1264 | gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, infobar_details_app_norepo); | 1313 | gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, infobar_details_app_norepo); |
874 | 1265 | gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, infobar_details_app_repo); | 1314 | gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, infobar_details_app_repo); |
875 | 1266 | diff --git a/src/gs-details-page.ui b/src/gs-details-page.ui | 1315 | diff --git a/src/gs-details-page.ui b/src/gs-details-page.ui |
876 | 1316 | <<<<<<< debian/patches/0014-Add-a-basic-permissions-system.patch | ||
877 | 1267 | index 154ce197..a3f2ccb5 100644 | 1317 | index 154ce197..a3f2ccb5 100644 |
878 | 1318 | ======= | ||
879 | 1319 | index a9b1aad4..255617c4 100644 | ||
880 | 1320 | >>>>>>> debian/patches/0014-Add-a-basic-permissions-system.patch | ||
881 | 1268 | --- a/src/gs-details-page.ui | 1321 | --- a/src/gs-details-page.ui |
882 | 1269 | +++ b/src/gs-details-page.ui | 1322 | +++ b/src/gs-details-page.ui |
883 | 1270 | @@ -367,6 +367,22 @@ | 1323 | @@ -367,6 +367,22 @@ |
884 | diff --git a/debian/patches/0020-Show-verified-developers.patch b/debian/patches/0020-Show-verified-developers.patch | |||
885 | 1271 | new file mode 100644 | 1324 | new file mode 100644 |
886 | index 0000000..582b49e | |||
887 | --- /dev/null | |||
888 | +++ b/debian/patches/0020-Show-verified-developers.patch | |||
889 | @@ -0,0 +1,217 @@ | |||
890 | 1 | From 4a94b04735a2ad8852a2a148e06a631f9aff334e Mon Sep 17 00:00:00 2001 | ||
891 | 2 | From: Robert Ancell <robert.ancell@canonical.com> | ||
892 | 3 | Date: Tue, 28 Aug 2018 12:15:09 +1200 | ||
893 | 4 | Subject: [PATCH 20/24] Show verified developers | ||
894 | 5 | |||
895 | 6 | --- | ||
896 | 7 | lib/gs-app.c | 17 +++++++++++++++++ | ||
897 | 8 | lib/gs-app.h | 3 +++ | ||
898 | 9 | meson.build | 2 +- | ||
899 | 10 | plugins/snap/gs-plugin-snap.c | 8 +++++++- | ||
900 | 11 | src/developer-verified.svg | 12 ++++++++++++ | ||
901 | 12 | src/gnome-software.gresource.xml | 1 + | ||
902 | 13 | src/gs-details-page.c | 3 +++ | ||
903 | 14 | src/gs-details-page.ui | 30 ++++++++++++++++++++++-------- | ||
904 | 15 | 8 files changed, 66 insertions(+), 10 deletions(-) | ||
905 | 16 | create mode 100644 src/developer-verified.svg | ||
906 | 17 | |||
907 | 18 | diff --git a/lib/gs-app.c b/lib/gs-app.c | ||
908 | 19 | index c8c5876b..bc7d8d75 100644 | ||
909 | 20 | --- a/lib/gs-app.c | ||
910 | 21 | +++ b/lib/gs-app.c | ||
911 | 22 | @@ -133,6 +133,7 @@ typedef struct | ||
912 | 23 | GsChannel *active_channel; | ||
913 | 24 | GCancellable *cancellable; | ||
914 | 25 | GsPluginAction pending_action; | ||
915 | 26 | + gboolean developer_is_verified; | ||
916 | 27 | } GsAppPrivate; | ||
917 | 28 | |||
918 | 29 | enum { | ||
919 | 30 | @@ -1657,6 +1658,22 @@ gs_app_set_developer_name (GsApp *app, const gchar *developer_name) | ||
920 | 31 | _g_set_str (&priv->developer_name, developer_name); | ||
921 | 32 | } | ||
922 | 33 | |||
923 | 34 | +gboolean | ||
924 | 35 | +gs_app_get_developer_is_verified (GsApp *app) | ||
925 | 36 | +{ | ||
926 | 37 | + GsAppPrivate *priv = gs_app_get_instance_private (app); | ||
927 | 38 | + g_return_val_if_fail (GS_IS_APP (app), FALSE); | ||
928 | 39 | + return priv->developer_is_verified; | ||
929 | 40 | +} | ||
930 | 41 | + | ||
931 | 42 | +void | ||
932 | 43 | +gs_app_set_developer_is_verified (GsApp *app, gboolean developer_is_verified) | ||
933 | 44 | +{ | ||
934 | 45 | + GsAppPrivate *priv = gs_app_get_instance_private (app); | ||
935 | 46 | + g_return_if_fail (GS_IS_APP (app)); | ||
936 | 47 | + priv->developer_is_verified = developer_is_verified; | ||
937 | 48 | +} | ||
938 | 49 | + | ||
939 | 50 | /** | ||
940 | 51 | * gs_app_get_pixbuf: | ||
941 | 52 | * @app: a #GsApp | ||
942 | 53 | diff --git a/lib/gs-app.h b/lib/gs-app.h | ||
943 | 54 | index 72d723d7..ffccf5db 100644 | ||
944 | 55 | --- a/lib/gs-app.h | ||
945 | 56 | +++ b/lib/gs-app.h | ||
946 | 57 | @@ -168,6 +168,9 @@ void gs_app_set_project_group (GsApp *app, | ||
947 | 58 | const gchar *gs_app_get_developer_name (GsApp *app); | ||
948 | 59 | void gs_app_set_developer_name (GsApp *app, | ||
949 | 60 | const gchar *developer_name); | ||
950 | 61 | +gboolean gs_app_get_developer_is_verified (GsApp *app); | ||
951 | 62 | +void gs_app_set_developer_is_verified (GsApp *app, | ||
952 | 63 | + gboolean developer_is_verified); | ||
953 | 64 | const gchar *gs_app_get_version (GsApp *app); | ||
954 | 65 | const gchar *gs_app_get_version_ui (GsApp *app); | ||
955 | 66 | void gs_app_set_version (GsApp *app, | ||
956 | 67 | diff --git a/meson.build b/meson.build | ||
957 | 68 | index 3b2f726e..20fdd31a 100644 | ||
958 | 69 | --- a/meson.build | ||
959 | 70 | +++ b/meson.build | ||
960 | 71 | @@ -166,7 +166,7 @@ if get_option('enable-gudev') | ||
961 | 72 | endif | ||
962 | 73 | |||
963 | 74 | if get_option('enable-snap') | ||
964 | 75 | - snap = dependency('snapd-glib', version : '>= 1.31') | ||
965 | 76 | + snap = dependency('snapd-glib', version : '>= 1.42') | ||
966 | 77 | endif | ||
967 | 78 | |||
968 | 79 | gnome = import('gnome') | ||
969 | 80 | diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c | ||
970 | 81 | index 405ec8e1..fadb7866 100644 | ||
971 | 82 | --- a/plugins/snap/gs-plugin-snap.c | ||
972 | 83 | +++ b/plugins/snap/gs-plugin-snap.c | ||
973 | 84 | @@ -934,6 +934,7 @@ gs_plugin_refine_app (GsPlugin *plugin, | ||
974 | 85 | g_autoptr(SnapdSnap) local_snap = NULL; | ||
975 | 86 | g_autoptr(SnapdSnap) store_snap = NULL; | ||
976 | 87 | SnapdSnap *snap; | ||
977 | 88 | + const gchar *developer_name; | ||
978 | 89 | g_autofree gchar *description = NULL; | ||
979 | 90 | |||
980 | 91 | /* not us */ | ||
981 | 92 | @@ -1013,7 +1014,12 @@ gs_plugin_refine_app (GsPlugin *plugin, | ||
982 | 93 | if (description != NULL) | ||
983 | 94 | gs_app_set_description (app, GS_APP_QUALITY_NORMAL, description); | ||
984 | 95 | gs_app_set_license (app, GS_APP_QUALITY_NORMAL, snapd_snap_get_license (snap)); | ||
985 | 96 | - gs_app_set_developer_name (app, snapd_snap_get_developer (snap)); | ||
986 | 97 | + developer_name = snapd_snap_get_publisher_display_name (snap); | ||
987 | 98 | + if (developer_name == NULL) | ||
988 | 99 | + developer_name = snapd_snap_get_publisher_username (snap); | ||
989 | 100 | + gs_app_set_developer_name (app, developer_name); | ||
990 | 101 | + if (snapd_snap_get_publisher_validation (snap) == SNAPD_PUBLISHER_VALIDATION_VERIFIED) | ||
991 | 102 | + gs_app_set_developer_is_verified (app, TRUE); | ||
992 | 103 | |||
993 | 104 | snap = local_snap != NULL ? local_snap : store_snap; | ||
994 | 105 | gs_app_set_version (app, snapd_snap_get_version (snap)); | ||
995 | 106 | diff --git a/src/developer-verified.svg b/src/developer-verified.svg | ||
996 | 107 | new file mode 100644 | ||
997 | 108 | index 00000000..57c0f11b | ||
998 | 109 | --- /dev/null | ||
999 | 110 | +++ b/src/developer-verified.svg | ||
1000 | 111 | @@ -0,0 +1,12 @@ | ||
1001 | 112 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
1002 | 113 | +<svg xmlns="http://www.w3.org/2000/svg" height="12px" width="12px" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 12 12"><!-- Generator: Sketch 50.2 (55047) - http://www.bohemiancoding.com/sketch --> | ||
1003 | 114 | + <title>path6490</title> | ||
1004 | 115 | + <desc>Created with Sketch.</desc> | ||
1005 | 116 | + <g id="misc" fill-rule="evenodd" fill="none"> | ||
1006 | 117 | + <g id="Artboard" fill-rule="nonzero" fill="#82BEA0" transform="translate(-419 -444)"> | ||
1007 | 118 | + <g id="VALIDATED--SNAPCRAFTER-ICON" transform="translate(419 444)"> | ||
1008 | 119 | + <path id="path6490" d="m5.0239 0.38296l-0.4325 0.40107c-0.3507 0.32527-0.8065 0.51407-1.2846 0.53217l-0.5886 0.0222c-0.75 0.0283-1.3515 0.6298-1.3798 1.3798l-0.0222 0.5886c-0.0181 0.4781-0.2069 0.9339-0.53217 1.2846l-0.40107 0.4325c-0.51061 0.5506-0.51061 1.4016 0 1.9522l0.40107 0.4325c0.32527 0.3507 0.51407 0.8065 0.53217 1.2846l0.0222 0.5886c0.0283 0.7502 0.6298 1.3512 1.3798 1.3802l0.5886 0.022c0.4781 0.018 0.9339 0.207 1.2846 0.532l0.4325 0.401c0.5506 0.511 1.4016 0.511 1.9522 0l0.4325-0.401c0.3507-0.325 0.8065-0.514 1.2846-0.532l0.5886-0.022c0.7502-0.029 1.3512-0.63 1.3802-1.3802l0.022-0.5886c0.018-0.4781 0.207-0.9339 0.532-1.2846l0.401-0.4325c0.511-0.5506 0.511-1.4016 0-1.9522l-0.401-0.4325c-0.325-0.3507-0.514-0.8065-0.532-1.2846l-0.022-0.5886c-0.029-0.75-0.63-1.3515-1.3802-1.3798l-0.5886-0.0222c-0.4781-0.0181-0.9339-0.2069-1.2846-0.53217l-0.4325-0.40107c-0.5506-0.51061-1.4016-0.51061-1.9522 0zm3.3697 3.1711l0.8675 0.8565-4.2062 4.2411-2.316-2.3398 0.8611-0.8549 1.4549 1.4659 3.3387-3.3688z"/> | ||
1009 | 120 | + </g> | ||
1010 | 121 | + </g> | ||
1011 | 122 | + </g> | ||
1012 | 123 | +</svg> | ||
1013 | 124 | \ No newline at end of file | ||
1014 | 125 | diff --git a/src/gnome-software.gresource.xml b/src/gnome-software.gresource.xml | ||
1015 | 126 | index 44e5a28a..46022303 100644 | ||
1016 | 127 | --- a/src/gnome-software.gresource.xml | ||
1017 | 128 | +++ b/src/gnome-software.gresource.xml | ||
1018 | 129 | @@ -38,5 +38,6 @@ | ||
1019 | 130 | <file preprocess="xml-stripblanks">org.freedesktop.PackageKit.xml</file> | ||
1020 | 131 | <file>gtk-style.css</file> | ||
1021 | 132 | <file>gtk-style-hc.css</file> | ||
1022 | 133 | + <file>developer-verified.svg</file> | ||
1023 | 134 | </gresource> | ||
1024 | 135 | </gresources> | ||
1025 | 136 | diff --git a/src/gs-details-page.c b/src/gs-details-page.c | ||
1026 | 137 | index 8647bdfe..16677d2a 100644 | ||
1027 | 138 | --- a/src/gs-details-page.c | ||
1028 | 139 | +++ b/src/gs-details-page.c | ||
1029 | 140 | @@ -101,6 +101,7 @@ struct _GsDetailsPage | ||
1030 | 141 | GtkWidget *label_details_category_value; | ||
1031 | 142 | GtkWidget *label_details_developer_title; | ||
1032 | 143 | GtkWidget *label_details_developer_value; | ||
1033 | 144 | + GtkWidget *image_details_developer_verified; | ||
1034 | 145 | GtkWidget *button_details_license_free; | ||
1035 | 146 | GtkWidget *button_details_license_nonfree; | ||
1036 | 147 | GtkWidget *button_details_license_unknown; | ||
1037 | 148 | @@ -963,6 +964,7 @@ gs_details_page_refresh_all (GsDetailsPage *self) | ||
1038 | 149 | gtk_label_set_label (GTK_LABEL (self->label_details_developer_value), tmp); | ||
1039 | 150 | gtk_widget_set_visible (self->label_details_developer_value, TRUE); | ||
1040 | 151 | } | ||
1041 | 152 | + gtk_widget_set_visible (self->image_details_developer_verified, gs_app_get_developer_is_verified (self->app)); | ||
1042 | 153 | |||
1043 | 154 | /* set the license buttons */ | ||
1044 | 155 | tmp = gs_app_get_license (self->app); | ||
1045 | 156 | @@ -2702,6 +2704,7 @@ gs_details_page_class_init (GsDetailsPageClass *klass) | ||
1046 | 157 | gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_details_category_value); | ||
1047 | 158 | gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_details_developer_title); | ||
1048 | 159 | gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_details_developer_value); | ||
1049 | 160 | + gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, image_details_developer_verified); | ||
1050 | 161 | gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, button_details_license_free); | ||
1051 | 162 | gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, button_details_license_nonfree); | ||
1052 | 163 | gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, button_details_license_unknown); | ||
1053 | 164 | diff --git a/src/gs-details-page.ui b/src/gs-details-page.ui | ||
1054 | 165 | index 255617c4..bc03b421 100644 | ||
1055 | 166 | --- a/src/gs-details-page.ui | ||
1056 | 167 | +++ b/src/gs-details-page.ui | ||
1057 | 168 | @@ -1133,16 +1133,30 @@ | ||
1058 | 169 | </packing> | ||
1059 | 170 | </child> | ||
1060 | 171 | <child> | ||
1061 | 172 | - <object class="GtkLabel" id="label_details_developer_value"> | ||
1062 | 173 | + <object class="GtkBox" id="box_details_developer"> | ||
1063 | 174 | <property name="visible">True</property> | ||
1064 | 175 | <property name="can_focus">False</property> | ||
1065 | 176 | <property name="hexpand">True</property> | ||
1066 | 177 | - <property name="label">Yorba</property> | ||
1067 | 178 | - <property name="wrap">True</property> | ||
1068 | 179 | - <property name="selectable">True</property> | ||
1069 | 180 | - <property name="max_width_chars">10</property> | ||
1070 | 181 | - <property name="xalign">0</property> | ||
1071 | 182 | - <property name="yalign">0.5</property> | ||
1072 | 183 | + <property name="spacing">3</property> | ||
1073 | 184 | + <child> | ||
1074 | 185 | + <object class="GtkLabel" id="label_details_developer_value"> | ||
1075 | 186 | + <property name="visible">True</property> | ||
1076 | 187 | + <property name="can_focus">False</property> | ||
1077 | 188 | + <property name="label">Yorba</property> | ||
1078 | 189 | + <property name="selectable">True</property> | ||
1079 | 190 | + <property name="max_width_chars">10</property> | ||
1080 | 191 | + <property name="xalign">0</property> | ||
1081 | 192 | + <property name="yalign">0.5</property> | ||
1082 | 193 | + </object> | ||
1083 | 194 | + </child> | ||
1084 | 195 | + <child> | ||
1085 | 196 | + <object class="GtkImage" id="image_details_developer_verified"> | ||
1086 | 197 | + <property name="visible">True</property> | ||
1087 | 198 | + <property name="can_focus">False</property> | ||
1088 | 199 | + <property name="pixel_size">16</property> | ||
1089 | 200 | + <property name="resource">/org/gnome/Software/developer-verified.svg</property> | ||
1090 | 201 | + </object> | ||
1091 | 202 | + </child> | ||
1092 | 203 | </object> | ||
1093 | 204 | <packing> | ||
1094 | 205 | <property name="left_attach">1</property> | ||
1095 | 206 | @@ -1455,7 +1469,7 @@ | ||
1096 | 207 | <widget name="label_details_category_value"/> | ||
1097 | 208 | <widget name="label_details_size_installed_value"/> | ||
1098 | 209 | <widget name="label_details_size_download_value"/> | ||
1099 | 210 | - <widget name="label_details_developer_value"/> | ||
1100 | 211 | + <widget name="box_details_developer"/> | ||
1101 | 212 | <widget name="button_details_license_free"/> | ||
1102 | 213 | </widgets> | ||
1103 | 214 | </object> | ||
1104 | 215 | -- | ||
1105 | 216 | 2.17.1 | ||
1106 | 217 | |||
1107 | diff --git a/debian/patches/0021-snap-Use-wide-scope-when-searching.patch b/debian/patches/0021-snap-Use-wide-scope-when-searching.patch | |||
1108 | 0 | new file mode 100644 | 218 | new file mode 100644 |
1109 | index 0000000..221f8fe | |||
1110 | --- /dev/null | |||
1111 | +++ b/debian/patches/0021-snap-Use-wide-scope-when-searching.patch | |||
1112 | @@ -0,0 +1,70 @@ | |||
1113 | 1 | From 0c6077b03a2d31eaecc1ea8968ec395270585c9c Mon Sep 17 00:00:00 2001 | ||
1114 | 2 | From: Robert Ancell <robert.ancell@canonical.com> | ||
1115 | 3 | Date: Tue, 7 Aug 2018 16:49:35 +1200 | ||
1116 | 4 | Subject: [PATCH 21/24] snap: Use wide scope when searching | ||
1117 | 5 | |||
1118 | 6 | --- | ||
1119 | 7 | plugins/snap/gs-plugin-snap.c | 12 ++++++------ | ||
1120 | 8 | 1 file changed, 6 insertions(+), 6 deletions(-) | ||
1121 | 9 | |||
1122 | 10 | diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c | ||
1123 | 11 | index 509f7d0a..57fc7fa7 100644 | ||
1124 | 12 | --- a/plugins/snap/gs-plugin-snap.c | ||
1125 | 13 | +++ b/plugins/snap/gs-plugin-snap.c | ||
1126 | 14 | @@ -385,7 +385,7 @@ gs_plugin_url_to_app (GsPlugin *plugin, | ||
1127 | 15 | |||
1128 | 16 | /* create app */ | ||
1129 | 17 | path = gs_utils_get_url_path (url); | ||
1130 | 18 | - snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_MATCH_NAME, NULL, path, cancellable, NULL); | ||
1131 | 19 | + snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_SCOPE_WIDE | SNAPD_FIND_FLAGS_MATCH_NAME, NULL, path, cancellable, NULL); | ||
1132 | 20 | if (snaps == NULL || snaps->len < 1) | ||
1133 | 21 | return TRUE; | ||
1134 | 22 | |||
1135 | 23 | @@ -451,7 +451,7 @@ gs_plugin_add_featured (GsPlugin *plugin, | ||
1136 | 24 | g_autoptr(GString) background_css = NULL; | ||
1137 | 25 | g_autofree gchar *css = NULL; | ||
1138 | 26 | |||
1139 | 27 | - snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_NONE, "featured", NULL, cancellable, error); | ||
1140 | 28 | + snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_SCOPE_WIDE, "featured", NULL, cancellable, error); | ||
1141 | 29 | |||
1142 | 30 | if (snaps == NULL) | ||
1143 | 31 | return FALSE; | ||
1144 | 32 | @@ -520,7 +520,7 @@ gs_plugin_add_popular (GsPlugin *plugin, | ||
1145 | 33 | g_autoptr(GPtrArray) snaps = NULL; | ||
1146 | 34 | guint i; | ||
1147 | 35 | |||
1148 | 36 | - snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_NONE, "featured", NULL, cancellable, error); | ||
1149 | 37 | + snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_SCOPE_WIDE, "featured", NULL, cancellable, error); | ||
1150 | 38 | if (snaps == NULL) | ||
1151 | 39 | return FALSE; | ||
1152 | 40 | |||
1153 | 41 | @@ -578,7 +578,7 @@ gs_plugin_add_category_apps (GsPlugin *plugin, | ||
1154 | 42 | g_autoptr(GPtrArray) snaps = NULL; | ||
1155 | 43 | guint j; | ||
1156 | 44 | |||
1157 | 45 | - snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_NONE, tokens[i], NULL, cancellable, error); | ||
1158 | 46 | + snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_SCOPE_WIDE, tokens[i], NULL, cancellable, error); | ||
1159 | 47 | if (snaps == NULL) | ||
1160 | 48 | return FALSE; | ||
1161 | 49 | for (j = 0; j < snaps->len; j++) { | ||
1162 | 50 | @@ -636,7 +636,7 @@ gs_plugin_add_search (GsPlugin *plugin, | ||
1163 | 51 | guint i; | ||
1164 | 52 | |||
1165 | 53 | query = g_strjoinv (" ", values); | ||
1166 | 54 | - snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_NONE, NULL, query, cancellable, error); | ||
1167 | 55 | + snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_SCOPE_WIDE, NULL, query, cancellable, error); | ||
1168 | 56 | if (snaps == NULL) | ||
1169 | 57 | return FALSE; | ||
1170 | 58 | |||
1171 | 59 | @@ -659,7 +659,7 @@ get_store_snap (GsPlugin *plugin, const gchar *name, gboolean need_details, GCan | ||
1172 | 60 | if (snap != NULL) | ||
1173 | 61 | return g_object_ref (snap); | ||
1174 | 62 | |||
1175 | 63 | - snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_MATCH_NAME, NULL, name, cancellable, error); | ||
1176 | 64 | + snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_SCOPE_WIDE | SNAPD_FIND_FLAGS_MATCH_NAME, NULL, name, cancellable, error); | ||
1177 | 65 | if (snaps == NULL || snaps->len < 1) | ||
1178 | 66 | return NULL; | ||
1179 | 67 | |||
1180 | 68 | -- | ||
1181 | 69 | 2.17.1 | ||
1182 | 70 | |||
1183 | diff --git a/debian/patches/0022-Delay-startup-of-GNOME-Software-to-allow-the-Shell-t.patch b/debian/patches/0022-Delay-startup-of-GNOME-Software-to-allow-the-Shell-t.patch | |||
1184 | 0 | new file mode 100644 | 71 | new file mode 100644 |
1185 | index 0000000..070fd81 | |||
1186 | --- /dev/null | |||
1187 | +++ b/debian/patches/0022-Delay-startup-of-GNOME-Software-to-allow-the-Shell-t.patch | |||
1188 | @@ -0,0 +1,25 @@ | |||
1189 | 1 | From 7932bac03d7d47011ee170dc2b31e9de1512812c Mon Sep 17 00:00:00 2001 | ||
1190 | 2 | From: Jean-Baptiste Lallement <jean-baptiste.lallement@canonical.com> | ||
1191 | 3 | Date: Mon, 25 Jun 2018 16:14:38 +1200 | ||
1192 | 4 | Subject: [PATCH 22/25] Delay startup of GNOME Software to allow the Shell to | ||
1193 | 5 | load first. | ||
1194 | 6 | |||
1195 | 7 | --- | ||
1196 | 8 | src/gnome-software-service.desktop.in | 1 + | ||
1197 | 9 | 1 file changed, 1 insertion(+) | ||
1198 | 10 | |||
1199 | 11 | diff --git a/src/gnome-software-service.desktop.in b/src/gnome-software-service.desktop.in | ||
1200 | 12 | index dc4d4d90..fb47759b 100644 | ||
1201 | 13 | --- a/src/gnome-software-service.desktop.in | ||
1202 | 14 | +++ b/src/gnome-software-service.desktop.in | ||
1203 | 15 | @@ -1,6 +1,7 @@ | ||
1204 | 16 | [Desktop Entry] | ||
1205 | 17 | Type=Application | ||
1206 | 18 | Name=GNOME Software | ||
1207 | 19 | +X-GNOME-Autostart-Delay=60 | ||
1208 | 20 | Exec=@bindir@/gnome-software --gapplication-service | ||
1209 | 21 | OnlyShowIn=GNOME;Unity; | ||
1210 | 22 | NoDisplay=true | ||
1211 | 23 | -- | ||
1212 | 24 | 2.17.1 | ||
1213 | 25 | |||
1214 | diff --git a/debian/patches/0023-Revert-Revert-flatpak-Use-list-of-related-apps-for-i.patch b/debian/patches/0023-Revert-Revert-flatpak-Use-list-of-related-apps-for-i.patch | |||
1215 | 0 | new file mode 100644 | 26 | new file mode 100644 |
1216 | index 0000000..eeb6403 | |||
1217 | --- /dev/null | |||
1218 | +++ b/debian/patches/0023-Revert-Revert-flatpak-Use-list-of-related-apps-for-i.patch | |||
1219 | @@ -0,0 +1,114 @@ | |||
1220 | 1 | From 3b71756838799497639163a637ef7120a756277e Mon Sep 17 00:00:00 2001 | ||
1221 | 2 | From: Joaquim Rocha <jrocha@endlessm.com> | ||
1222 | 3 | Date: Wed, 23 May 2018 13:17:37 +0200 | ||
1223 | 4 | Subject: [PATCH 23/28] Revert "Revert "flatpak: Use "list of related apps for | ||
1224 | 5 | install" when updating an app"" | ||
1225 | 6 | |||
1226 | 7 | This reverts commit 79c14a2c67ec1ac459ace6c2e08dce74f78a9e16 and brings | ||
1227 | 8 | back the ae5c13cc39eae89ab261bab44ea2fd0fc941f9d5 and | ||
1228 | 9 | eb68607baea3b83b719acb739516b361a6758bcf. | ||
1229 | 10 | |||
1230 | 11 | The mentioned functionality had been reverted in order for the release | ||
1231 | 12 | 3.28 but it's necessary for getting the related apps when updating apps. | ||
1232 | 13 | --- | ||
1233 | 14 | plugins/flatpak/gs-flatpak.c | 53 +++++++++++++++++++++++++++--------- | ||
1234 | 15 | 1 file changed, 40 insertions(+), 13 deletions(-) | ||
1235 | 16 | |||
1236 | 17 | diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c | ||
1237 | 18 | index 6a424ed8..8f57eda6 100644 | ||
1238 | 19 | --- a/plugins/flatpak/gs-flatpak.c | ||
1239 | 20 | +++ b/plugins/flatpak/gs-flatpak.c | ||
1240 | 21 | @@ -2587,8 +2587,11 @@ gs_flatpak_refine_runtime_for_install (GsFlatpak *self, | ||
1241 | 22 | } | ||
1242 | 23 | |||
1243 | 24 | static GsAppList * | ||
1244 | 25 | -gs_flatpak_get_list_for_install (GsFlatpak *self, GsApp *app, | ||
1245 | 26 | - GCancellable *cancellable, GError **error) | ||
1246 | 27 | +gs_flatpak_get_list_for_install_or_update (GsFlatpak *self, | ||
1247 | 28 | + GsApp *app, | ||
1248 | 29 | + gboolean is_update, | ||
1249 | 30 | + GCancellable *cancellable, | ||
1250 | 31 | + GError **error) | ||
1251 | 32 | { | ||
1252 | 33 | GsApp *runtime; | ||
1253 | 34 | g_autofree gchar *ref = NULL; | ||
1254 | 35 | @@ -2596,6 +2599,7 @@ gs_flatpak_get_list_for_install (GsFlatpak *self, GsApp *app, | ||
1255 | 36 | g_autoptr(GPtrArray) xrefs_installed = NULL; | ||
1256 | 37 | g_autoptr(GHashTable) hash_installed = NULL; | ||
1257 | 38 | g_autoptr(GsAppList) list = gs_app_list_new (); | ||
1258 | 39 | + g_autofree gchar *app_ref = NULL; | ||
1259 | 40 | |||
1260 | 41 | /* get the list of installed apps */ | ||
1261 | 42 | xrefs_installed = flatpak_installation_list_installed_refs (self->installation, | ||
1262 | 43 | @@ -2658,26 +2662,49 @@ gs_flatpak_get_list_for_install (GsFlatpak *self, GsApp *app, | ||
1263 | 44 | /* already installed? */ | ||
1264 | 45 | app_tmp = gs_flatpak_create_app (self, FLATPAK_REF (xref_related)); | ||
1265 | 46 | ref_display = gs_flatpak_app_get_ref_display (app_tmp); | ||
1266 | 47 | - if (g_hash_table_contains (hash_installed, ref_display)) { | ||
1267 | 48 | + if (!is_update && g_hash_table_contains (hash_installed, ref_display)) { | ||
1268 | 49 | g_debug ("not adding related %s as already installed", ref_display); | ||
1269 | 50 | - } else { | ||
1270 | 51 | - gs_app_set_origin (app_tmp, gs_app_get_origin (app)); | ||
1271 | 52 | - g_debug ("adding related %s for install", ref_display); | ||
1272 | 53 | - | ||
1273 | 54 | - if (!gs_plugin_refine_item_state (self, app_tmp, cancellable, error)) | ||
1274 | 55 | - return NULL; | ||
1275 | 56 | + continue; | ||
1276 | 57 | + } | ||
1277 | 58 | |||
1278 | 59 | - gs_app_list_add (list, app_tmp); | ||
1279 | 60 | + gs_app_set_origin (app_tmp, gs_app_get_origin (app)); | ||
1280 | 61 | + if (!gs_plugin_refine_item_state (self, app_tmp, cancellable, error)) | ||
1281 | 62 | + return FALSE; | ||
1282 | 63 | + if (is_update && !gs_app_is_updatable (app_tmp)) { | ||
1283 | 64 | + g_debug ("not adding related %s as it's not updatable", ref_display); | ||
1284 | 65 | + continue; | ||
1285 | 66 | } | ||
1286 | 67 | + g_debug ("adding related %s for install/update", ref_display); | ||
1287 | 68 | + gs_app_list_add (list, app_tmp); | ||
1288 | 69 | } | ||
1289 | 70 | |||
1290 | 71 | - /* add the original app last unless it's a proxy app */ | ||
1291 | 72 | - if (!gs_app_has_quirk (app, AS_APP_QUIRK_IS_PROXY)) | ||
1292 | 73 | + /* add the original app last unless it's already installed or is a proxy app */ | ||
1293 | 74 | + app_ref = gs_flatpak_app_get_ref_display (app); | ||
1294 | 75 | + if (!gs_app_has_quirk (app, AS_APP_QUIRK_IS_PROXY) && | ||
1295 | 76 | + !g_hash_table_contains (hash_installed, app_ref)) | ||
1296 | 77 | gs_app_list_add (list, app); | ||
1297 | 78 | |||
1298 | 79 | return g_steal_pointer (&list); | ||
1299 | 80 | } | ||
1300 | 81 | |||
1301 | 82 | +static GsAppList * | ||
1302 | 83 | +gs_flatpak_get_list_for_install (GsFlatpak *self, | ||
1303 | 84 | + GsApp *app, | ||
1304 | 85 | + GCancellable *cancellable, | ||
1305 | 86 | + GError **error) | ||
1306 | 87 | +{ | ||
1307 | 88 | + return gs_flatpak_get_list_for_install_or_update (self, app, FALSE, cancellable, error); | ||
1308 | 89 | +} | ||
1309 | 90 | + | ||
1310 | 91 | +static GsAppList * | ||
1311 | 92 | +gs_flatpak_get_list_for_update (GsFlatpak *self, | ||
1312 | 93 | + GsApp *app, | ||
1313 | 94 | + GCancellable *cancellable, | ||
1314 | 95 | + GError **error) | ||
1315 | 96 | +{ | ||
1316 | 97 | + return gs_flatpak_get_list_for_install_or_update (self, app, TRUE, cancellable, error); | ||
1317 | 98 | +} | ||
1318 | 99 | + | ||
1319 | 100 | gboolean | ||
1320 | 101 | gs_flatpak_app_remove (GsFlatpak *self, | ||
1321 | 102 | GsApp *app, | ||
1322 | 103 | @@ -3065,7 +3092,7 @@ gs_flatpak_update_app (GsFlatpak *self, | ||
1323 | 104 | } | ||
1324 | 105 | |||
1325 | 106 | /* get the list of apps to process */ | ||
1326 | 107 | - list = gs_flatpak_get_list_for_install (self, app, cancellable, error); | ||
1327 | 108 | + list = gs_flatpak_get_list_for_update (self, app, cancellable, error); | ||
1328 | 109 | if (list == NULL) { | ||
1329 | 110 | g_prefix_error (error, "failed to get related refs: "); | ||
1330 | 111 | gs_app_set_state_recover (app); | ||
1331 | 112 | -- | ||
1332 | 113 | 2.19.1 | ||
1333 | 114 | |||
1334 | diff --git a/debian/patches/0024-flatpak-Check-if-a-related-app-is-installed-even-whe.patch b/debian/patches/0024-flatpak-Check-if-a-related-app-is-installed-even-whe.patch | |||
1335 | 0 | new file mode 100644 | 115 | new file mode 100644 |
1336 | index 0000000..640e5c5 | |||
1337 | --- /dev/null | |||
1338 | +++ b/debian/patches/0024-flatpak-Check-if-a-related-app-is-installed-even-whe.patch | |||
1339 | @@ -0,0 +1,37 @@ | |||
1340 | 1 | From 54e1bbc547a52485cec6d2de32ff02205e9c5917 Mon Sep 17 00:00:00 2001 | ||
1341 | 2 | From: Joaquim Rocha <jrocha@endlessm.com> | ||
1342 | 3 | Date: Wed, 13 Dec 2017 00:48:13 +0000 | ||
1343 | 4 | Subject: [PATCH 24/28] flatpak: Check if a related app is installed even when | ||
1344 | 5 | dealing with updates | ||
1345 | 6 | |||
1346 | 7 | When dealing with updates, gs-flatpak gets the list of related apps | ||
1347 | 8 | (usually runtime extensions) that should be updated together with the | ||
1348 | 9 | main app. However, if one of those related apps is not installed, the | ||
1349 | 10 | gs_app_is_updatable call will return FALSE and the app will not be | ||
1350 | 11 | installed. | ||
1351 | 12 | This is a problem when e.g. a runtime extension has been mistakenly | ||
1352 | 13 | removed, or when an app is updated and needs a new runtime extension. | ||
1353 | 14 | |||
1354 | 15 | This patch simply adds a further test for whether the app is installed, | ||
1355 | 16 | together with the logic mentioned above. | ||
1356 | 17 | --- | ||
1357 | 18 | plugins/flatpak/gs-flatpak.c | 3 ++- | ||
1358 | 19 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
1359 | 20 | |||
1360 | 21 | diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c | ||
1361 | 22 | index 8f57eda6..d8781206 100644 | ||
1362 | 23 | --- a/plugins/flatpak/gs-flatpak.c | ||
1363 | 24 | +++ b/plugins/flatpak/gs-flatpak.c | ||
1364 | 25 | @@ -2670,7 +2670,8 @@ gs_flatpak_get_list_for_install_or_update (GsFlatpak *self, | ||
1365 | 26 | gs_app_set_origin (app_tmp, gs_app_get_origin (app)); | ||
1366 | 27 | if (!gs_plugin_refine_item_state (self, app_tmp, cancellable, error)) | ||
1367 | 28 | return FALSE; | ||
1368 | 29 | - if (is_update && !gs_app_is_updatable (app_tmp)) { | ||
1369 | 30 | + if (gs_app_is_installed (app_tmp) && is_update && | ||
1370 | 31 | + !gs_app_is_updatable (app_tmp)) { | ||
1371 | 32 | g_debug ("not adding related %s as it's not updatable", ref_display); | ||
1372 | 33 | continue; | ||
1373 | 34 | } | ||
1374 | 35 | -- | ||
1375 | 36 | 2.19.1 | ||
1376 | 37 | |||
1377 | diff --git a/debian/patches/0025-flatpak-Include-related-refs-to-the-app-s-runtime-on.patch b/debian/patches/0025-flatpak-Include-related-refs-to-the-app-s-runtime-on.patch | |||
1378 | 0 | new file mode 100644 | 38 | new file mode 100644 |
1379 | index 0000000..22bdc42 | |||
1380 | --- /dev/null | |||
1381 | +++ b/debian/patches/0025-flatpak-Include-related-refs-to-the-app-s-runtime-on.patch | |||
1382 | @@ -0,0 +1,192 @@ | |||
1383 | 1 | From 04977409f7f5179f7ce17ab894fd51e3c539f4d6 Mon Sep 17 00:00:00 2001 | ||
1384 | 2 | From: Joaquim Rocha <jrocha@endlessm.com> | ||
1385 | 3 | Date: Wed, 23 May 2018 13:02:20 +0200 | ||
1386 | 4 | Subject: [PATCH 25/28] flatpak: Include related refs to the app's runtime on | ||
1387 | 5 | install/update | ||
1388 | 6 | |||
1389 | 7 | When installing/updating an app, if its related refs and its runtime | ||
1390 | 8 | need to be installed as well, then they do. However, refs that are | ||
1391 | 9 | related to the runtime itself do not get installed, and this is a | ||
1392 | 10 | problem because some apps may need them (besides being a discrepancy | ||
1393 | 11 | between using the Flatpak CLI and GNOME Software for installing Flatpak | ||
1394 | 12 | apps). | ||
1395 | 13 | |||
1396 | 14 | Thus, these changes add any refs related to an app's runtime to the | ||
1397 | 15 | list of refs that should be installed when installing or updating an | ||
1398 | 16 | app. Note that it deliberately doesn't update refs related to the | ||
1399 | 17 | runtime though, just as it doesn't update the runtime when updating an | ||
1400 | 18 | app. Thus, refs that are related to the runtime get updated together | ||
1401 | 19 | with it. | ||
1402 | 20 | --- | ||
1403 | 21 | plugins/flatpak/gs-flatpak.c | 124 +++++++++++++++++++++++++---------- | ||
1404 | 22 | 1 file changed, 88 insertions(+), 36 deletions(-) | ||
1405 | 23 | |||
1406 | 24 | diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c | ||
1407 | 25 | index d8781206..a820918c 100644 | ||
1408 | 26 | --- a/plugins/flatpak/gs-flatpak.c | ||
1409 | 27 | +++ b/plugins/flatpak/gs-flatpak.c | ||
1410 | 28 | @@ -2586,6 +2586,68 @@ gs_flatpak_refine_runtime_for_install (GsFlatpak *self, | ||
1411 | 29 | return TRUE; | ||
1412 | 30 | } | ||
1413 | 31 | |||
1414 | 32 | +static GPtrArray * | ||
1415 | 33 | +gs_flatpak_get_app_remote_related_refs (GsFlatpak *self, | ||
1416 | 34 | + GsApp *app, | ||
1417 | 35 | + GCancellable *cancellable, | ||
1418 | 36 | + GError **error) | ||
1419 | 37 | +{ | ||
1420 | 38 | + g_autofree gchar *ref = NULL; | ||
1421 | 39 | + | ||
1422 | 40 | + /* lookup any related refs for this ref */ | ||
1423 | 41 | + ref = g_strdup_printf ("%s/%s/%s/%s", | ||
1424 | 42 | + gs_flatpak_app_get_ref_kind_as_str (app), | ||
1425 | 43 | + gs_flatpak_app_get_ref_name (app), | ||
1426 | 44 | + gs_flatpak_app_get_ref_arch (app), | ||
1427 | 45 | + gs_flatpak_app_get_ref_branch (app)); | ||
1428 | 46 | + return flatpak_installation_list_remote_related_refs_sync (self->installation, | ||
1429 | 47 | + gs_app_get_origin (app), | ||
1430 | 48 | + ref, cancellable, error); | ||
1431 | 49 | +} | ||
1432 | 50 | + | ||
1433 | 51 | +static gboolean | ||
1434 | 52 | +gs_flatpak_add_related_refs_to_list (GsFlatpak *self, | ||
1435 | 53 | + GsApp *app, | ||
1436 | 54 | + GPtrArray *related_refs, | ||
1437 | 55 | + GHashTable *hash_installed, | ||
1438 | 56 | + gboolean is_update, | ||
1439 | 57 | + GsAppList *list, | ||
1440 | 58 | + GCancellable *cancellable, | ||
1441 | 59 | + GError **error) | ||
1442 | 60 | +{ | ||
1443 | 61 | + for (guint i = 0; i < related_refs->len; i++) { | ||
1444 | 62 | + FlatpakRelatedRef *xref_related = g_ptr_array_index (related_refs, i); | ||
1445 | 63 | + g_autofree gchar *ref_display = NULL; | ||
1446 | 64 | + g_autoptr(GsApp) app_tmp = NULL; | ||
1447 | 65 | + | ||
1448 | 66 | + /* not included */ | ||
1449 | 67 | + if (!gs_flatpak_related_should_download (self, app, xref_related)) | ||
1450 | 68 | + continue; | ||
1451 | 69 | + | ||
1452 | 70 | + /* already installed? */ | ||
1453 | 71 | + app_tmp = gs_flatpak_create_app (self, FLATPAK_REF (xref_related)); | ||
1454 | 72 | + ref_display = gs_flatpak_app_get_ref_display (app_tmp); | ||
1455 | 73 | + if (!is_update && g_hash_table_contains (hash_installed, ref_display)) { | ||
1456 | 74 | + g_debug ("not adding related %s as already installed", ref_display); | ||
1457 | 75 | + continue; | ||
1458 | 76 | + } | ||
1459 | 77 | + | ||
1460 | 78 | + if (gs_app_get_origin (app_tmp) == NULL) | ||
1461 | 79 | + gs_app_set_origin (app_tmp, gs_app_get_origin (app)); | ||
1462 | 80 | + | ||
1463 | 81 | + if (!gs_plugin_refine_item_state (self, app_tmp, cancellable, error)) | ||
1464 | 82 | + return FALSE; | ||
1465 | 83 | + if (gs_app_is_installed (app_tmp) && is_update && | ||
1466 | 84 | + !gs_app_is_updatable (app_tmp)) { | ||
1467 | 85 | + g_debug ("not adding related %s as it's not updatable", ref_display); | ||
1468 | 86 | + continue; | ||
1469 | 87 | + } | ||
1470 | 88 | + g_debug ("adding related %s for install/update", ref_display); | ||
1471 | 89 | + gs_app_list_add (list, app_tmp); | ||
1472 | 90 | + } | ||
1473 | 91 | + return TRUE; | ||
1474 | 92 | +} | ||
1475 | 93 | + | ||
1476 | 94 | static GsAppList * | ||
1477 | 95 | gs_flatpak_get_list_for_install_or_update (GsFlatpak *self, | ||
1478 | 96 | GsApp *app, | ||
1479 | 97 | @@ -2596,6 +2658,7 @@ gs_flatpak_get_list_for_install_or_update (GsFlatpak *self, | ||
1480 | 98 | GsApp *runtime; | ||
1481 | 99 | g_autofree gchar *ref = NULL; | ||
1482 | 100 | g_autoptr(GPtrArray) related = NULL; | ||
1483 | 101 | + g_autoptr(GPtrArray) runtime_related = NULL; | ||
1484 | 102 | g_autoptr(GPtrArray) xrefs_installed = NULL; | ||
1485 | 103 | g_autoptr(GHashTable) hash_installed = NULL; | ||
1486 | 104 | g_autoptr(GsAppList) list = gs_app_list_new (); | ||
1487 | 105 | @@ -2621,6 +2684,7 @@ gs_flatpak_get_list_for_install_or_update (GsFlatpak *self, | ||
1488 | 106 | return NULL; | ||
1489 | 107 | runtime = gs_app_get_update_runtime (app); | ||
1490 | 108 | if (runtime != NULL) { | ||
1491 | 109 | + g_autoptr(GError) local_error = NULL; | ||
1492 | 110 | g_autofree gchar *ref_display = NULL; | ||
1493 | 111 | ref_display = gs_flatpak_app_get_ref_display (runtime); | ||
1494 | 112 | if (g_hash_table_contains (hash_installed, ref_display)) { | ||
1495 | 113 | @@ -2632,52 +2696,40 @@ gs_flatpak_get_list_for_install_or_update (GsFlatpak *self, | ||
1496 | 114 | gs_flatpak_app_get_ref_branch (runtime)); | ||
1497 | 115 | gs_app_list_add (list, runtime); | ||
1498 | 116 | } | ||
1499 | 117 | + | ||
1500 | 118 | + /* add refs related to the runtime */ | ||
1501 | 119 | + runtime_related = gs_flatpak_get_app_remote_related_refs (self, runtime, | ||
1502 | 120 | + cancellable, | ||
1503 | 121 | + &local_error); | ||
1504 | 122 | + if (runtime_related == NULL) | ||
1505 | 123 | + g_debug ("Failed to get related refs for runtime %s when " | ||
1506 | 124 | + "installing/updating %s: %s; continuing nonetheless...", | ||
1507 | 125 | + gs_app_get_unique_id (runtime), | ||
1508 | 126 | + gs_app_get_unique_id (app), | ||
1509 | 127 | + local_error->message); | ||
1510 | 128 | } | ||
1511 | 129 | |||
1512 | 130 | /* lookup any related refs for this ref */ | ||
1513 | 131 | - ref = g_strdup_printf ("%s/%s/%s/%s", | ||
1514 | 132 | - gs_flatpak_app_get_ref_kind_as_str (app), | ||
1515 | 133 | - gs_flatpak_app_get_ref_name (app), | ||
1516 | 134 | - gs_flatpak_app_get_ref_arch (app), | ||
1517 | 135 | - gs_flatpak_app_get_ref_branch (app)); | ||
1518 | 136 | - related = flatpak_installation_list_remote_related_refs_sync (self->installation, | ||
1519 | 137 | - gs_app_get_origin (app), | ||
1520 | 138 | - ref, cancellable, error); | ||
1521 | 139 | + related = gs_flatpak_get_app_remote_related_refs (self, app, cancellable, error); | ||
1522 | 140 | if (related == NULL) { | ||
1523 | 141 | g_prefix_error (error, "using origin %s: ", gs_app_get_origin (app)); | ||
1524 | 142 | gs_flatpak_error_convert (error); | ||
1525 | 143 | return NULL; | ||
1526 | 144 | } | ||
1527 | 145 | |||
1528 | 146 | - /* any extra bits */ | ||
1529 | 147 | - for (guint i = 0; i < related->len; i++) { | ||
1530 | 148 | - FlatpakRelatedRef *xref_related = g_ptr_array_index (related, i); | ||
1531 | 149 | - g_autofree gchar *ref_display = NULL; | ||
1532 | 150 | - g_autoptr(GsApp) app_tmp = NULL; | ||
1533 | 151 | - | ||
1534 | 152 | - /* not included */ | ||
1535 | 153 | - if (!gs_flatpak_related_should_download (self, app, xref_related)) | ||
1536 | 154 | - continue; | ||
1537 | 155 | - | ||
1538 | 156 | - /* already installed? */ | ||
1539 | 157 | - app_tmp = gs_flatpak_create_app (self, FLATPAK_REF (xref_related)); | ||
1540 | 158 | - ref_display = gs_flatpak_app_get_ref_display (app_tmp); | ||
1541 | 159 | - if (!is_update && g_hash_table_contains (hash_installed, ref_display)) { | ||
1542 | 160 | - g_debug ("not adding related %s as already installed", ref_display); | ||
1543 | 161 | - continue; | ||
1544 | 162 | - } | ||
1545 | 163 | + /* add refs related to the app */ | ||
1546 | 164 | + if (!gs_flatpak_add_related_refs_to_list (self, app, related, hash_installed, | ||
1547 | 165 | + is_update, list, cancellable, error)) | ||
1548 | 166 | + return FALSE; | ||
1549 | 167 | |||
1550 | 168 | - gs_app_set_origin (app_tmp, gs_app_get_origin (app)); | ||
1551 | 169 | - if (!gs_plugin_refine_item_state (self, app_tmp, cancellable, error)) | ||
1552 | 170 | - return FALSE; | ||
1553 | 171 | - if (gs_app_is_installed (app_tmp) && is_update && | ||
1554 | 172 | - !gs_app_is_updatable (app_tmp)) { | ||
1555 | 173 | - g_debug ("not adding related %s as it's not updatable", ref_display); | ||
1556 | 174 | - continue; | ||
1557 | 175 | - } | ||
1558 | 176 | - g_debug ("adding related %s for install/update", ref_display); | ||
1559 | 177 | - gs_app_list_add (list, app_tmp); | ||
1560 | 178 | - } | ||
1561 | 179 | + /* add refs related to the runtime; however, we're only adding them if they | ||
1562 | 180 | + * need to be installed, as their update should be performed together with | ||
1563 | 181 | + * the runtime instead */ | ||
1564 | 182 | + if (runtime_related != NULL && | ||
1565 | 183 | + !gs_flatpak_add_related_refs_to_list (self, runtime, runtime_related, | ||
1566 | 184 | + hash_installed, FALSE, list, | ||
1567 | 185 | + cancellable, error)) | ||
1568 | 186 | + return FALSE; | ||
1569 | 187 | |||
1570 | 188 | /* add the original app last unless it's already installed or is a proxy app */ | ||
1571 | 189 | app_ref = gs_flatpak_app_get_ref_display (app); | ||
1572 | 190 | -- | ||
1573 | 191 | 2.19.1 | ||
1574 | 192 | |||
1575 | diff --git a/debian/patches/0026-shell-search-provider-implement-XUbuntuCancel.patch b/debian/patches/0026-shell-search-provider-implement-XUbuntuCancel.patch | |||
1576 | 0 | new file mode 100644 | 193 | new file mode 100644 |
1577 | index 0000000..f914b22 | |||
1578 | --- /dev/null | |||
1579 | +++ b/debian/patches/0026-shell-search-provider-implement-XUbuntuCancel.patch | |||
1580 | @@ -0,0 +1,176 @@ | |||
1581 | 1 | From 2ac5ea28829ecaff2f8a180f2ef7eefbb07602d9 Mon Sep 17 00:00:00 2001 | ||
1582 | 2 | From: Andrea Azzarone <andrea.azzarone@canonical.com> | ||
1583 | 3 | Date: Fri, 7 Sep 2018 19:58:00 +0200 | ||
1584 | 4 | Subject: [PATCH 24/26] shell-search-provider: implement XUbuntuCancel | ||
1585 | 5 | |||
1586 | 6 | Implement XUbuntuCancel to request search cancellation. This is used by | ||
1587 | 7 | gnome-shell to cancel the current search e.g. if the search overview is | ||
1588 | 8 | closed. | ||
1589 | 9 | --- | ||
1590 | 10 | src/gs-shell-search-provider.c | 74 +++++++++++++++---- | ||
1591 | 11 | src/shell-search-provider-dbus-interfaces.xml | 1 + | ||
1592 | 12 | 2 files changed, 60 insertions(+), 15 deletions(-) | ||
1593 | 13 | |||
1594 | 14 | diff --git a/src/gs-shell-search-provider.c b/src/gs-shell-search-provider.c | ||
1595 | 15 | index c01d72cb..8c1e0fda 100644 | ||
1596 | 16 | --- a/src/gs-shell-search-provider.c | ||
1597 | 17 | +++ b/src/gs-shell-search-provider.c | ||
1598 | 18 | @@ -45,6 +45,8 @@ struct _GsShellSearchProvider { | ||
1599 | 19 | GsPluginLoader *plugin_loader; | ||
1600 | 20 | GCancellable *cancellable; | ||
1601 | 21 | |||
1602 | 22 | + PendingSearch *current_search; | ||
1603 | 23 | + | ||
1604 | 24 | GHashTable *metas_cache; | ||
1605 | 25 | GsAppList *search_results; | ||
1606 | 26 | }; | ||
1607 | 27 | @@ -58,6 +60,17 @@ pending_search_free (PendingSearch *search) | ||
1608 | 28 | g_slice_free (PendingSearch, search); | ||
1609 | 29 | } | ||
1610 | 30 | |||
1611 | 31 | +static void | ||
1612 | 32 | +cancel_current_search (GsShellSearchProvider *self) | ||
1613 | 33 | +{ | ||
1614 | 34 | + g_debug ("*** Cancel current search"); | ||
1615 | 35 | + | ||
1616 | 36 | + if (self->cancellable != NULL) { | ||
1617 | 37 | + g_cancellable_cancel (self->cancellable); | ||
1618 | 38 | + g_clear_object (&self->cancellable); | ||
1619 | 39 | + } | ||
1620 | 40 | +} | ||
1621 | 41 | + | ||
1622 | 42 | static gint | ||
1623 | 43 | search_sort_by_kudo_cb (GsApp *app1, GsApp *app2, gpointer user_data) | ||
1624 | 44 | { | ||
1625 | 45 | @@ -71,6 +84,23 @@ search_sort_by_kudo_cb (GsApp *app1, GsApp *app2, gpointer user_data) | ||
1626 | 46 | return 0; | ||
1627 | 47 | } | ||
1628 | 48 | |||
1629 | 49 | +static void | ||
1630 | 50 | +pending_search_finish (PendingSearch *search, | ||
1631 | 51 | + GDBusMethodInvocation *invocation, | ||
1632 | 52 | + GVariant *result) | ||
1633 | 53 | +{ | ||
1634 | 54 | + GsShellSearchProvider *self = search->provider; | ||
1635 | 55 | + | ||
1636 | 56 | + g_dbus_method_invocation_return_value (invocation, result); | ||
1637 | 57 | + | ||
1638 | 58 | + if (search == self->current_search) { | ||
1639 | 59 | + self->current_search = NULL; | ||
1640 | 60 | + } | ||
1641 | 61 | + | ||
1642 | 62 | + pending_search_free (search); | ||
1643 | 63 | + g_application_release (g_application_get_default ()); | ||
1644 | 64 | +} | ||
1645 | 65 | + | ||
1646 | 66 | static void | ||
1647 | 67 | search_done_cb (GObject *source, | ||
1648 | 68 | GAsyncResult *res, | ||
1649 | 69 | @@ -87,10 +117,9 @@ search_done_cb (GObject *source, | ||
1650 | 70 | |||
1651 | 71 | list = gs_plugin_loader_job_process_finish (self->plugin_loader, res, NULL); | ||
1652 | 72 | if (list == NULL) { | ||
1653 | 73 | - g_dbus_method_invocation_return_value (search->invocation, g_variant_new ("(as)", NULL)); | ||
1654 | 74 | - pending_search_free (search); | ||
1655 | 75 | - g_application_release (g_application_get_default ()); | ||
1656 | 76 | - return; | ||
1657 | 77 | + pending_search_finish (search, search->invocation, | ||
1658 | 78 | + g_variant_new ("(as)", NULL)); | ||
1659 | 79 | + return; | ||
1660 | 80 | } | ||
1661 | 81 | |||
1662 | 82 | /* sort by kudos, as there is no ratings data by default */ | ||
1663 | 83 | @@ -106,10 +135,8 @@ search_done_cb (GObject *source, | ||
1664 | 84 | /* cache this in case we need the app in GetResultMetas */ | ||
1665 | 85 | gs_app_list_add (self->search_results, app); | ||
1666 | 86 | } | ||
1667 | 87 | - g_dbus_method_invocation_return_value (search->invocation, g_variant_new ("(as)", &builder)); | ||
1668 | 88 | |||
1669 | 89 | - pending_search_free (search); | ||
1670 | 90 | - g_application_release (g_application_get_default ()); | ||
1671 | 91 | + pending_search_finish (search, search->invocation, g_variant_new ("(as)", &builder)); | ||
1672 | 92 | } | ||
1673 | 93 | |||
1674 | 94 | static gchar * | ||
1675 | 95 | @@ -167,10 +194,7 @@ execute_search (GsShellSearchProvider *self, | ||
1676 | 96 | |||
1677 | 97 | value = g_strjoinv (" ", terms); | ||
1678 | 98 | |||
1679 | 99 | - if (self->cancellable != NULL) { | ||
1680 | 100 | - g_cancellable_cancel (self->cancellable); | ||
1681 | 101 | - g_clear_object (&self->cancellable); | ||
1682 | 102 | - } | ||
1683 | 103 | + cancel_current_search (self); | ||
1684 | 104 | |||
1685 | 105 | /* don't attempt searches for a single character */ | ||
1686 | 106 | if (g_strv_length (terms) == 1 && | ||
1687 | 107 | @@ -183,6 +207,7 @@ execute_search (GsShellSearchProvider *self, | ||
1688 | 108 | pending_search->provider = self; | ||
1689 | 109 | pending_search->invocation = g_object_ref (invocation); | ||
1690 | 110 | |||
1691 | 111 | + self->current_search = pending_search; | ||
1692 | 112 | g_application_hold (g_application_get_default ()); | ||
1693 | 113 | self->cancellable = g_cancellable_new (); | ||
1694 | 114 | |||
1695 | 115 | @@ -334,6 +359,26 @@ handle_launch_search (GsShellSearchProvider2 *skeleton, | ||
1696 | 116 | return TRUE; | ||
1697 | 117 | } | ||
1698 | 118 | |||
1699 | 119 | +static gboolean | ||
1700 | 120 | +handle_xubuntu_cancel (GsShellSearchProvider2 *skeleton, | ||
1701 | 121 | + GDBusMethodInvocation *invocation, | ||
1702 | 122 | + gpointer user_data) | ||
1703 | 123 | +{ | ||
1704 | 124 | + GsShellSearchProvider *self = GS_SHELL_SEARCH_PROVIDER (user_data); | ||
1705 | 125 | + | ||
1706 | 126 | + g_debug ("*** XUbuntuCancel called"); | ||
1707 | 127 | + | ||
1708 | 128 | + if (self->current_search != NULL && | ||
1709 | 129 | + g_strcmp0 (g_dbus_method_invocation_get_sender (self->current_search->invocation), | ||
1710 | 130 | + g_dbus_method_invocation_get_sender (invocation)) == 0) { | ||
1711 | 131 | + cancel_current_search (self); | ||
1712 | 132 | + } | ||
1713 | 133 | + | ||
1714 | 134 | + gs_shell_search_provider2_complete_xubuntu_cancel (skeleton, invocation); | ||
1715 | 135 | + | ||
1716 | 136 | + return TRUE; | ||
1717 | 137 | +} | ||
1718 | 138 | + | ||
1719 | 139 | gboolean | ||
1720 | 140 | gs_shell_search_provider_register (GsShellSearchProvider *self, | ||
1721 | 141 | GDBusConnection *connection, | ||
1722 | 142 | @@ -355,10 +400,7 @@ search_provider_dispose (GObject *obj) | ||
1723 | 143 | { | ||
1724 | 144 | GsShellSearchProvider *self = GS_SHELL_SEARCH_PROVIDER (obj); | ||
1725 | 145 | |||
1726 | 146 | - if (self->cancellable != NULL) { | ||
1727 | 147 | - g_cancellable_cancel (self->cancellable); | ||
1728 | 148 | - g_clear_object (&self->cancellable); | ||
1729 | 149 | - } | ||
1730 | 150 | + cancel_current_search (self); | ||
1731 | 151 | |||
1732 | 152 | if (self->metas_cache != NULL) { | ||
1733 | 153 | g_hash_table_destroy (self->metas_cache); | ||
1734 | 154 | @@ -393,6 +435,8 @@ gs_shell_search_provider_init (GsShellSearchProvider *self) | ||
1735 | 155 | G_CALLBACK (handle_activate_result), self); | ||
1736 | 156 | g_signal_connect (self->skeleton, "handle-launch-search", | ||
1737 | 157 | G_CALLBACK (handle_launch_search), self); | ||
1738 | 158 | + g_signal_connect (self->skeleton, "handle-xubuntu-cancel", | ||
1739 | 159 | + G_CALLBACK (handle_xubuntu_cancel), self); | ||
1740 | 160 | } | ||
1741 | 161 | |||
1742 | 162 | static void | ||
1743 | 163 | diff --git a/src/shell-search-provider-dbus-interfaces.xml b/src/shell-search-provider-dbus-interfaces.xml | ||
1744 | 164 | index f6840e2c..4529c1e8 100644 | ||
1745 | 165 | --- a/src/shell-search-provider-dbus-interfaces.xml | ||
1746 | 166 | +++ b/src/shell-search-provider-dbus-interfaces.xml | ||
1747 | 167 | @@ -40,5 +40,6 @@ | ||
1748 | 168 | <arg type='as' name='Terms' direction='in' /> | ||
1749 | 169 | <arg type='u' name='Timestamp' direction='in' /> | ||
1750 | 170 | </method> | ||
1751 | 171 | + <method name = 'XUbuntuCancel' /> | ||
1752 | 172 | </interface> | ||
1753 | 173 | </node> | ||
1754 | 174 | -- | ||
1755 | 175 | 2.17.1 | ||
1756 | 176 | |||
1757 | diff --git a/debian/patches/series b/debian/patches/series | |||
1758 | index fba8a0a..91ad116 100644 | |||
1759 | --- a/debian/patches/series | |||
1760 | +++ b/debian/patches/series | |||
1761 | @@ -1,9 +1,18 @@ | |||
1762 | 1 | # Patches from upstream | 1 | # Patches from upstream |
1763 | 2 | <<<<<<< debian/patches/series | ||
1764 | 2 | 0001-details-page-Add-support-for-verified-developers.patch | 3 | 0001-details-page-Add-support-for-verified-developers.patch |
1765 | 3 | 0002-snap-Set-verified-developer-flag.patch | 4 | 0002-snap-Set-verified-developer-flag.patch |
1766 | 4 | 0001-lib-Allow-opening-CAB-files-that-resolve-more-than-o.patch | 5 | 0001-lib-Allow-opening-CAB-files-that-resolve-more-than-o.patch |
1767 | 5 | 0001-Use-correct-boolean-type-for-GsPluginJob-interactive.patch | 6 | 0001-Use-correct-boolean-type-for-GsPluginJob-interactive.patch |
1768 | 6 | 0001-Revert-ef15f51d.patch | 7 | 0001-Revert-ef15f51d.patch |
1769 | 8 | ======= | ||
1770 | 9 | 0001-snap-Scale-embedded-snap-icons-to-64x64.patch | ||
1771 | 10 | 0001-snap-Only-load-icons-once.patch | ||
1772 | 11 | 0001-Fix-gs_app_set_state_recover-not-working-during-purc.patch | ||
1773 | 12 | 0001-snap-plugin-segfault.patch | ||
1774 | 13 | 0001-Set-reboot-notifications-as-urgent-to-avoid-them-tim.patch | ||
1775 | 14 | 0001-lib-Allow-opening-CAB-files-that-resolve-more-than-o.patch | ||
1776 | 15 | >>>>>>> debian/patches/series | ||
1777 | 7 | 16 | ||
1778 | 8 | # Patches from the ubuntu* branch | 17 | # Patches from the ubuntu* branch |
1779 | 9 | 0001-Construct-the-Software-Sources-menu-item-dynamically.patch | 18 | 0001-Construct-the-Software-Sources-menu-item-dynamically.patch |
1780 | @@ -20,6 +29,7 @@ | |||
1781 | 20 | 0012-Don-t-use-colour-to-differentiate-between-free-and-p.patch | 29 | 0012-Don-t-use-colour-to-differentiate-between-free-and-p.patch |
1782 | 21 | 0013-overview-page-Rotate-featured-apps.patch | 30 | 0013-overview-page-Rotate-featured-apps.patch |
1783 | 22 | 0014-Add-a-basic-permissions-system.patch | 31 | 0014-Add-a-basic-permissions-system.patch |
1784 | 32 | <<<<<<< debian/patches/series | ||
1785 | 23 | 0015-build-Translate-Ubuntu-s-.desktop-file.patch | 33 | 0015-build-Translate-Ubuntu-s-.desktop-file.patch |
1786 | 24 | 0016-snap-Use-default-icon-if-none-provided.patch | 34 | 0016-snap-Use-default-icon-if-none-provided.patch |
1787 | 25 | 0017-snap-Make-snaps-purchasable.patch | 35 | 0017-snap-Make-snaps-purchasable.patch |
1788 | @@ -30,3 +40,17 @@ | |||
1789 | 30 | 0022-snap-Use-wide-scope-when-searching.patch | 40 | 0022-snap-Use-wide-scope-when-searching.patch |
1790 | 31 | 0023-snap-Don-t-treat-auth-cancellation-as-an-error.patch | 41 | 0023-snap-Don-t-treat-auth-cancellation-as-an-error.patch |
1791 | 32 | 0024-shell-search-provider-implement-XUbuntuCancel.patch | 42 | 0024-shell-search-provider-implement-XUbuntuCancel.patch |
1792 | 43 | ======= | ||
1793 | 44 | 0015-Don-t-reject-unexpected-state-changes-external-event.patch | ||
1794 | 45 | 0016-build-Translate-Ubuntu-s-.desktop-file.patch | ||
1795 | 46 | 0017-snap-Use-default-icon-if-none-provided.patch | ||
1796 | 47 | 0018-snap-Make-snaps-purchasable.patch | ||
1797 | 48 | 0019-Disable-paid-snap-support-unless-env-variable-GNOME_.patch | ||
1798 | 49 | 0020-Show-verified-developers.patch | ||
1799 | 50 | 0021-snap-Use-wide-scope-when-searching.patch | ||
1800 | 51 | 0022-Delay-startup-of-GNOME-Software-to-allow-the-Shell-t.patch | ||
1801 | 52 | 0023-Revert-Revert-flatpak-Use-list-of-related-apps-for-i.patch | ||
1802 | 53 | 0024-flatpak-Check-if-a-related-app-is-installed-even-whe.patch | ||
1803 | 54 | 0025-flatpak-Include-related-refs-to-the-app-s-runtime-on.patch | ||
1804 | 55 | 0026-shell-search-provider-implement-XUbuntuCancel.patch | ||
1805 | 56 | >>>>>>> debian/patches/series |