Merge ~3v1n0/ubuntu/+source/gnome-software:ubuntu/bionic into ~ubuntu-desktop/ubuntu/+source/gnome-software:ubuntu/master

Proposed by Marco Trevisan (Treviño)
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
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.

To post a comment you must log in.

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

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index 3a663a4..8dcdc3a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,4 @@
1<<<<<<< debian/changelog
1gnome-software (3.30.2-0ubuntu8) cosmic; urgency=medium2gnome-software (3.30.2-0ubuntu8) cosmic; urgency=medium
23
3 * debian/patches/0001-Revert-ef15f51d.patch:4 * debian/patches/0001-Revert-ef15f51d.patch:
@@ -147,20 +148,79 @@ gnome-software (3.29.1-0ubuntu1) cosmic; urgency=medium
147 -- Robert Ancell <robert.ancell@canonical.com> Wed, 23 May 2018 11:55:28 +1200148 -- Robert Ancell <robert.ancell@canonical.com> Wed, 23 May 2018 11:55:28 +1200
148149
149gnome-software (3.28.1-0ubuntu6) cosmic; urgency=medium150gnome-software (3.28.1-0ubuntu6) cosmic; urgency=medium
151=======
152gnome-software (3.28.1-0ubuntu4.18.04.6) bionic; urgency=medium
153>>>>>>> debian/changelog
150154
155 * debian/patches/0026-shell-search-provider-implement-XUbuntuCancel.patch
156 - implement XUbuntuCancel to request pending search cancellation from
157 gnome-shell (LP: #1756826)
158
159 -- Marco Trevisan (Treviño) <marco@ubuntu.com> Thu, 08 Nov 2018 03:32:00 -0600
160
161gnome-software (3.28.1-0ubuntu4.18.04.5) bionic; urgency=medium
162
163 * debian/patches/0023-Revert-Revert-flatpak-Use-list-of-related-apps-for-i.patch:
164 * debian/patches/0024-flatpak-Check-if-a-related-app-is-installed-even-whe.patch:
165 * debian/patches/0025-flatpak-Include-related-refs-to-the-app-s-runtime-on.patch:
166 - Pull related flatpak refs (LP: #1754864)
167 * debian/patches/0003-Sort-snaps-before-other-apps.patch:
168 - Fix snap search result ordering (LP: #1798228)
169 * debian/patches/0001-Set-reboot-notifications-as-urgent-to-avoid-them-tim.patch:
170 - Stop reboot notification from timing out (LP: #1719797)
171 * debian/patches/0001-lib-Allow-opening-CAB-files-that-resolve-more-than-o.patch:
172 - Support composite CAB files (LP: #1798470)
173
174 -- Robert Ancell <robert.ancell@canonical.com> Mon, 29 Oct 2018 16:06:34 +1300
175
176gnome-software (3.28.1-0ubuntu4.18.04.4) bionic; urgency=medium
177
178 * debian/control:
179 - Bump build-dependency on libsnapd-glib-dev
180 * debian/patches/0020-Show-verified-developers.patch:
181 - Show verified developers (LP: #1789336)
151 * debian/patches/0011-Support-snap-channels.patch:182 * debian/patches/0011-Support-snap-channels.patch:
152 - Make snap channel selection list scrollable (LP: #1768779)183 * debian/patches/0021-snap-Use-wide-scope-when-searching.patch:
153 - Fix channel branches all showing the same name (LP: #1768794)184 - Use wide scope searching (LP: #1789338)
154 - Alphabetically sort channel branch names (LP: #1769556)185 * debian/patches/0022-Delay-startup-of-GNOME-Software-to-allow-the-Shell-t.patch:
186 - Delay startup of service to allow the shell to load first (LP: #1756379)
155187
188 -- Robert Ancell <robert.ancell@canonical.com> Wed, 19 Sep 2018 16:27:38 +0200
189
190gnome-software (3.28.1-0ubuntu4.18.04.3) bionic; urgency=medium
191
192<<<<<<< debian/changelog
156 -- Robert Ancell <robert.ancell@canonical.com> Mon, 07 May 2018 16:31:46 +1200193 -- Robert Ancell <robert.ancell@canonical.com> Mon, 07 May 2018 16:31:46 +1200
194=======
195 * debian/patches/0006-packagekit-Disable-updates.patch:
196 - also disable offline updates in refresh plugin (LP: #1775226)
197>>>>>>> debian/changelog
198
199 -- Olivier Tilloy <olivier.tilloy@canonical.com> Thu, 02 Aug 2018 12:25:36 +0200
157200
158gnome-software (3.28.1-0ubuntu5) cosmic; urgency=medium201gnome-software (3.28.1-0ubuntu4.18.04.2) bionic; urgency=medium
202
203 [ Robert Ancell ]
204 * debian/patches/0014-Add-a-basic-permissions-system.patch:
205 - Fix crash when have plugs with multiple slots available (LP: #1778160)
206
207 [ Andrea Azzarone ]
208 * debian/patches/0001-snap-plugin-segfault.patch:
209 - don't segfault on null snap installation date (lp: #1781996)
210
211 -- Sebastien Bacher <seb128@ubuntu.com> Thu, 19 Jul 2018 17:10:17 +0200
212
213gnome-software (3.28.1-0ubuntu4.18.04.1) bionic; urgency=medium
159214
160 * debian/patches/0011-Support-snap-channels.patch:215 * debian/patches/0011-Support-snap-channels.patch:
161 - Fix incorrect default install version being shown (LP: #1767445)216 - Fix incorrect default install version being shown (LP: #1767445)
217 - Make snap channel selection list scrollable (LP: #1768779)
218 - Fix channel branches all showing the same name (LP: #1768794)
219 - Alphabetically sort channel branch names (LP: #1769556)
220 * debian/control:
221 - Use bionic Vcs link
162222
163 -- Robert Ancell <robert.ancell@canonical.com> Thu, 03 May 2018 12:33:30 +1200223 -- Robert Ancell <robert.ancell@canonical.com> Mon, 07 May 2018 16:32:37 +1200
164224
165gnome-software (3.28.1-0ubuntu4) bionic; urgency=medium225gnome-software (3.28.1-0ubuntu4) bionic; urgency=medium
166226
diff --git a/debian/control b/debian/control
index 02b40b2..56cce3f 100644
--- a/debian/control
+++ b/debian/control
@@ -29,7 +29,11 @@ Build-Depends: appstream,
29 libpackagekit-glib2-dev (>= 1.1.4),29 libpackagekit-glib2-dev (>= 1.1.4),
30 libpolkit-gobject-1-dev,30 libpolkit-gobject-1-dev,
31 libsecret-1-dev,31 libsecret-1-dev,
32<<<<<<< debian/control
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],
34=======
35 libsnapd-glib-dev (>= 1.42) [amd64 arm64 armel armhf i386 ppc64 ppc64el s390x],
36>>>>>>> debian/control
33 libsoup2.4-dev (>= 2.52),37 libsoup2.4-dev (>= 2.52),
34 libsqlite3-dev,38 libsqlite3-dev,
35 libxml2-utils,39 libxml2-utils,
@@ -42,7 +46,11 @@ Homepage: https://wiki.gnome.org/Apps/Software
42XS-Debian-Vcs-Browser: https://salsa.debian.org/gnome-team/gnome-software46XS-Debian-Vcs-Browser: https://salsa.debian.org/gnome-team/gnome-software
43XS-Debian-Vcs-Git: https://salsa.debian.org/gnome-team/gnome-software.git47XS-Debian-Vcs-Git: https://salsa.debian.org/gnome-team/gnome-software.git
44Vcs-Browser: https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/gnome-software48Vcs-Browser: https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/gnome-software
49<<<<<<< debian/control
45Vcs-Git: https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/gnome-software50Vcs-Git: https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/gnome-software
51=======
52Vcs-Git: https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/gnome-software -b ubuntu/bionic
53>>>>>>> debian/control
4654
47Package: gnome-software55Package: gnome-software
48Architecture: any56Architecture: any
@@ -60,7 +68,12 @@ Conflicts: sessioninstaller
60Recommends: gnome-software-plugin-snap [linux-any],68Recommends: gnome-software-plugin-snap [linux-any],
61Suggests: apt-config-icons-hidpi,69Suggests: apt-config-icons-hidpi,
62 fwupd [amd64 arm64 armhf i386],70 fwupd [amd64 arm64 armhf i386],
71<<<<<<< debian/control
63 gnome-software-plugin-flatpak [linux-any]72 gnome-software-plugin-flatpak [linux-any]
73=======
74 gnome-software-plugin-flatpak [linux-any],
75 gnome-software-plugin-limba [linux-any]
76>>>>>>> debian/control
64Description: Software Center for GNOME77Description: Software Center for GNOME
65 Software lets you install and update applications and system extensions.78 Software lets you install and update applications and system extensions.
66 .79 .
diff --git a/debian/control.in b/debian/control.in
index e0e8726..6b1c6df 100644
--- a/debian/control.in
+++ b/debian/control.in
@@ -25,7 +25,11 @@ Build-Depends: appstream,
25 libpackagekit-glib2-dev (>= 1.1.4),25 libpackagekit-glib2-dev (>= 1.1.4),
26 libpolkit-gobject-1-dev,26 libpolkit-gobject-1-dev,
27 libsecret-1-dev,27 libsecret-1-dev,
28<<<<<<< debian/control.in
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],
30=======
31 libsnapd-glib-dev (>= 1.42) [amd64 arm64 armel armhf i386 ppc64 ppc64el s390x],
32>>>>>>> debian/control.in
29 libsoup2.4-dev (>= 2.52),33 libsoup2.4-dev (>= 2.52),
30 libsqlite3-dev,34 libsqlite3-dev,
31 libxml2-utils,35 libxml2-utils,
@@ -38,7 +42,11 @@ Homepage: https://wiki.gnome.org/Apps/Software
38XS-Debian-Vcs-Browser: https://salsa.debian.org/gnome-team/gnome-software42XS-Debian-Vcs-Browser: https://salsa.debian.org/gnome-team/gnome-software
39XS-Debian-Vcs-Git: https://salsa.debian.org/gnome-team/gnome-software.git43XS-Debian-Vcs-Git: https://salsa.debian.org/gnome-team/gnome-software.git
40Vcs-Browser: https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/gnome-software44Vcs-Browser: https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/gnome-software
45<<<<<<< debian/control.in
41Vcs-Git: https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/gnome-software46Vcs-Git: https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/gnome-software
47=======
48Vcs-Git: https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/gnome-software -b ubuntu/bionic
49>>>>>>> debian/control.in
4250
43Package: gnome-software51Package: gnome-software
44Architecture: any52Architecture: any
diff --git a/debian/gbp.conf b/debian/gbp.conf
index 34a17e9..16658ad 100644
--- a/debian/gbp.conf
+++ b/debian/gbp.conf
@@ -1,5 +1,6 @@
1[DEFAULT]1[DEFAULT]
2debian-branch=ubuntu/master2debian-branch=ubuntu/master
3<<<<<<< debian/gbp.conf
3upstream-branch=upstream/latest4upstream-branch=upstream/latest
4debian-tag=ubuntu/%(version)s5debian-tag=ubuntu/%(version)s
5upstream-vcs-tag=%(version)s6upstream-vcs-tag=%(version)s
@@ -17,3 +18,9 @@ postimport = dch -v%(version)s New upstream release; git add debian/changelog; d
17[pq]18[pq]
18patch-numbers = False19patch-numbers = False
1920
21=======
22upstream-branch=upstream/3.28.x
23debian-tag=ubuntu/%(version)s
24upstream-vcs-tag=%(version)s
25pristine-tar=True
26>>>>>>> debian/gbp.conf
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
20new file mode 10064427new file mode 100644
index 0000000..3d37c58
--- /dev/null
+++ b/debian/patches/0001-Set-reboot-notifications-as-urgent-to-avoid-them-tim.patch
@@ -0,0 +1,27 @@
1From 057eea7cc03d647544b5819ff37951f7bfffb77e Mon Sep 17 00:00:00 2001
2From: Mario Limonciello <mario.limonciello@dell.com>
3Date: Thu, 13 Sep 2018 12:28:58 -0500
4Subject: [PATCH] Set reboot notifications as urgent to avoid them timing out
5 (Fixes: #341)
6
7It was confirmed in https://bugzilla.gnome.org/show_bug.cgi?id=783719
8that this field will influence the timeout
9---
10 src/gs-updates-page.c | 1 +
11 1 file changed, 1 insertion(+)
12
13diff --git a/src/gs-updates-page.c b/src/gs-updates-page.c
14index fa77dbd9..cd9db05d 100644
15--- a/src/gs-updates-page.c
16+++ b/src/gs-updates-page.c
17@@ -751,6 +751,7 @@ _perform_update_cb (GsPluginLoader *plugin_loader, GAsyncResult *res, gpointer u
18 /* TRANSLATORS: button text */
19 g_notification_add_button_with_target (n, _("Restart"), "app.reboot", NULL);
20 g_notification_set_default_action_and_target (n, "app.set-mode", "s", "updates");
21+ g_notification_set_priority (n, G_NOTIFICATION_PRIORITY_URGENT);
22 g_application_send_notification (g_application_get_default (), "restart-required", n);
23 }
24 }
25--
262.19.1
27
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
index 931e0db..f6bb205 100644
--- 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
@@ -1,4 +1,8 @@
1<<<<<<< debian/patches/0001-lib-Allow-opening-CAB-files-that-resolve-more-than-o.patch
1From 8e8887f890489959daa3400f531e7febf9e9f8b6 Mon Sep 17 00:00:00 20012From 8e8887f890489959daa3400f531e7febf9e9f8b6 Mon Sep 17 00:00:00 2001
3=======
4From 3c5e8905fb72437f7ce62fcc7fcd2fa0988e31d0 Mon Sep 17 00:00:00 2001
5>>>>>>> debian/patches/0001-lib-Allow-opening-CAB-files-that-resolve-more-than-o.patch
2From: Mario Limonciello <mario.limonciello@dell.com>6From: Mario Limonciello <mario.limonciello@dell.com>
3Date: Tue, 16 Oct 2018 11:21:47 -05007Date: Tue, 16 Oct 2018 11:21:47 -0500
4Subject: [PATCH] lib: Allow opening CAB files that resolve more than one GsApp8Subject: [PATCH] lib: Allow opening CAB files that resolve more than one GsApp
@@ -16,10 +20,17 @@ This was verified using a Dell USB-C dock and fwupd 1.1.3.
16 1 file changed, 1 insertion(+), 6 deletions(-)20 1 file changed, 1 insertion(+), 6 deletions(-)
1721
18diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c22diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
23<<<<<<< debian/patches/0001-lib-Allow-opening-CAB-files-that-resolve-more-than-o.patch
19index 55afa8bb..630d0c6c 10064424index 55afa8bb..630d0c6c 100644
20--- a/lib/gs-plugin-loader.c25--- a/lib/gs-plugin-loader.c
21+++ b/lib/gs-plugin-loader.c26+++ b/lib/gs-plugin-loader.c
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,
28=======
29index 2fb02e3c..f52d1d27 100644
30--- a/lib/gs-plugin-loader.c
31+++ b/lib/gs-plugin-loader.c
32@@ -3449,12 +3449,7 @@ gs_plugin_loader_process_thread_cb (GTask *task,
33>>>>>>> debian/patches/0001-lib-Allow-opening-CAB-files-that-resolve-more-than-o.patch
23 }34 }
24 if (gs_app_list_length (list) > 1) {35 if (gs_app_list_length (list) > 1) {
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);
diff --git a/debian/patches/0001-snap-plugin-segfault.patch b/debian/patches/0001-snap-plugin-segfault.patch
26new file mode 10064437new file mode 100644
index 0000000..6d1bbfd
--- /dev/null
+++ b/debian/patches/0001-snap-plugin-segfault.patch
@@ -0,0 +1,32 @@
1From e766ac5bd36295a851bf08296734f7df45208dd9 Mon Sep 17 00:00:00 2001
2From: Andrea Azzarone <azzaronea@gmail.com>
3Date: Mon, 16 Jul 2018 21:44:45 +0200
4Subject: [PATCH] snap: Don't pass NULL to g_date_time_to_unix
5
6As per API documentation, snapd_snap_get_install_date can return NULL. Passing
7NULL to g_date_time_to_unix results in a crash. When this happens we should pass
8GS_APP_INSTALL_DATE_UNKNOWN to gs_app_set_install_date.
9
10Fixes: https://bugs.launchpad.net/bugs/1781996
11---
12 plugins/snap/gs-plugin-snap.c | 4 +++-
13 1 file changed, 3 insertions(+), 1 deletion(-)
14
15diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c
16index 14571efe..6323f6ca 100644
17--- a/plugins/snap/gs-plugin-snap.c
18+++ b/plugins/snap/gs-plugin-snap.c
19@@ -823,9 +823,11 @@ gs_plugin_refine_app (GsPlugin *plugin,
20 /* add information specific to installed snaps */
21 if (local_snap != NULL) {
22 SnapdApp *snap_app;
23+ GDateTime *install_date;
24
25+ install_date = snapd_snap_get_install_date (local_snap);
26 gs_app_set_size_installed (app, snapd_snap_get_installed_size (local_snap));
27- gs_app_set_install_date (app, g_date_time_to_unix (snapd_snap_get_install_date (local_snap)));
28+ gs_app_set_install_date (app, install_date != NULL ? g_date_time_to_unix (install_date) : GS_APP_INSTALL_DATE_UNKNOWN);
29
30 snap_app = get_primary_app (local_snap);
31 if (snap_app != NULL) {
32
diff --git a/debian/patches/0003-Sort-snaps-before-other-apps.patch b/debian/patches/0003-Sort-snaps-before-other-apps.patch
index 85e799e..31693e9 100644
--- a/debian/patches/0003-Sort-snaps-before-other-apps.patch
+++ b/debian/patches/0003-Sort-snaps-before-other-apps.patch
@@ -1,7 +1,14 @@
1<<<<<<< debian/patches/0003-Sort-snaps-before-other-apps.patch
1From 93554bae8d7de73ad56532abc0b4d28a8bc8290b Mon Sep 17 00:00:00 20012From 93554bae8d7de73ad56532abc0b4d28a8bc8290b Mon Sep 17 00:00:00 2001
2From: Robert Ancell <robert.ancell@canonical.com>3From: Robert Ancell <robert.ancell@canonical.com>
3Date: Wed, 30 Mar 2016 15:55:47 +13004Date: Wed, 30 Mar 2016 15:55:47 +1300
4Subject: [PATCH 03/26] Sort snaps before other apps5Subject: [PATCH 03/26] Sort snaps before other apps
6=======
7From d11180688c730f3f27edbb6f374858b33144ee42 Mon Sep 17 00:00:00 2001
8From: Robert Ancell <robert.ancell@canonical.com>
9Date: Wed, 30 Mar 2016 15:55:47 +1300
10Subject: [PATCH 03/28] Sort snaps before other apps
11>>>>>>> debian/patches/0003-Sort-snaps-before-other-apps.patch
512
6---13---
7 plugins/snap/gs-plugin-snap.c | 1 +14 plugins/snap/gs-plugin-snap.c | 1 +
@@ -9,10 +16,17 @@ Subject: [PATCH 03/26] Sort snaps before other apps
9 2 files changed, 7 insertions(+)16 2 files changed, 7 insertions(+)
1017
11diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c18diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c
19<<<<<<< debian/patches/0003-Sort-snaps-before-other-apps.patch
12index d34948fe..f9c6a347 10064420index d34948fe..f9c6a347 100644
13--- a/plugins/snap/gs-plugin-snap.c21--- a/plugins/snap/gs-plugin-snap.c
14+++ b/plugins/snap/gs-plugin-snap.c22+++ b/plugins/snap/gs-plugin-snap.c
15@@ -585,6 +585,7 @@ gs_plugin_add_search (GsPlugin *plugin,23@@ -585,6 +585,7 @@ gs_plugin_add_search (GsPlugin *plugin,
24=======
25index 510a02a7..45f65bda 100644
26--- a/plugins/snap/gs-plugin-snap.c
27+++ b/plugins/snap/gs-plugin-snap.c
28@@ -590,6 +590,7 @@ gs_plugin_add_search (GsPlugin *plugin,
29>>>>>>> debian/patches/0003-Sort-snaps-before-other-apps.patch
16 30
17 for (i = 0; i < snaps->len; i++) {31 for (i = 0; i < snaps->len; i++) {
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));
diff --git a/debian/patches/0006-packagekit-Disable-updates.patch b/debian/patches/0006-packagekit-Disable-updates.patch
index 7c3ea9f..5bd0a63 100644
--- a/debian/patches/0006-packagekit-Disable-updates.patch
+++ b/debian/patches/0006-packagekit-Disable-updates.patch
@@ -1,15 +1,26 @@
1<<<<<<< debian/patches/0006-packagekit-Disable-updates.patch
1From 5117239ec132fc976ae9cc74e8f40a310221e602 Mon Sep 17 00:00:00 20012From 5117239ec132fc976ae9cc74e8f40a310221e602 Mon Sep 17 00:00:00 2001
2From: Olivier Tilloy <olivier.tilloy@canonical.com>3From: Olivier Tilloy <olivier.tilloy@canonical.com>
3Date: Tue, 7 Aug 2018 19:03:23 +02004Date: Tue, 7 Aug 2018 19:03:23 +0200
4Subject: [PATCH 06/26] packagekit: Disable updates5Subject: [PATCH 06/26] packagekit: Disable updates
56
6In Ubuntu we use Update Manager for this currently. The long term plan is to use Software, but we're not there yet.7In Ubuntu we use Update Manager for this currently. The long term plan is to use Software, but we're not there yet.
8=======
9Description: [PATCH 06/20] packagekit: Disable updates
10 In Ubuntu we use Update Manager for this currently. The long term plan
11 is to use Software, but we're not there yet.
12Author: Iain Lane <iain@orangesquash.org.uk>
13Author: Olivier Tilloy <olivier.tilloy@canonical.com>
14Date: Thu, 20 Jul 2017 10:12:58 +0100
15Last-Update: 2018-08-01
16>>>>>>> debian/patches/0006-packagekit-Disable-updates.patch
7---17---
8 plugins/packagekit/gs-plugin-packagekit-refresh.c | 3 +++18 plugins/packagekit/gs-plugin-packagekit-refresh.c | 3 +++
9 plugins/packagekit/gs-plugin-packagekit.c | 3 +++19 plugins/packagekit/gs-plugin-packagekit.c | 3 +++
10 plugins/packagekit/gs-plugin-systemd-updates.c | 3 +++20 plugins/packagekit/gs-plugin-systemd-updates.c | 3 +++
11 3 files changed, 9 insertions(+)21 3 files changed, 9 insertions(+)
1222
23<<<<<<< debian/patches/0006-packagekit-Disable-updates.patch
13diff --git a/plugins/packagekit/gs-plugin-packagekit-refresh.c b/plugins/packagekit/gs-plugin-packagekit-refresh.c24diff --git a/plugins/packagekit/gs-plugin-packagekit-refresh.c b/plugins/packagekit/gs-plugin-packagekit-refresh.c
14index 2b8ce27c..a6002d5d 10064425index 2b8ce27c..a6002d5d 100644
15--- a/plugins/packagekit/gs-plugin-packagekit-refresh.c26--- a/plugins/packagekit/gs-plugin-packagekit-refresh.c
@@ -40,6 +51,8 @@ index 8d7eb551..db3cc49d 100644
40 results = pk_client_get_updates (PK_CLIENT (priv->task),51 results = pk_client_get_updates (PK_CLIENT (priv->task),
41diff --git a/plugins/packagekit/gs-plugin-systemd-updates.c b/plugins/packagekit/gs-plugin-systemd-updates.c52diff --git a/plugins/packagekit/gs-plugin-systemd-updates.c b/plugins/packagekit/gs-plugin-systemd-updates.c
42index 449a9726..320af255 10064453index 449a9726..320af255 100644
54=======
55>>>>>>> debian/patches/0006-packagekit-Disable-updates.patch
43--- a/plugins/packagekit/gs-plugin-systemd-updates.c56--- a/plugins/packagekit/gs-plugin-systemd-updates.c
44+++ b/plugins/packagekit/gs-plugin-systemd-updates.c57+++ b/plugins/packagekit/gs-plugin-systemd-updates.c
45@@ -253,6 +253,9 @@ gs_plugin_update (GsPlugin *plugin,58@@ -253,6 +253,9 @@ gs_plugin_update (GsPlugin *plugin,
@@ -49,9 +62,27 @@ index 449a9726..320af255 100644
49+ /* In Ubuntu we're using Update Manager for this, for now. */62+ /* In Ubuntu we're using Update Manager for this, for now. */
50+ return TRUE;63+ return TRUE;
51+64+
65<<<<<<< debian/patches/0006-packagekit-Disable-updates.patch
52 /* any are us? */66 /* any are us? */
53 for (guint i = 0; i < gs_app_list_length (list); i++) {67 for (guint i = 0; i < gs_app_list_length (list); i++) {
54 GsApp *app = gs_app_list_index (list, i);68 GsApp *app = gs_app_list_index (list, i);
55-- 69--
562.17.1702.17.1
5771
72=======
73 /* get the id's if the file exists */
74 package_ids = pk_offline_get_prepared_ids (&error_local);
75 if (package_ids == NULL) {
76--- a/plugins/packagekit/gs-plugin-packagekit-refresh.c
77+++ b/plugins/packagekit/gs-plugin-packagekit-refresh.c
78@@ -97,6 +97,9 @@ gs_plugin_refresh (GsPlugin *plugin,
79 }
80 }
81
82+ /* In Ubuntu we're using Update Manager for this, for now (LP: #1775226) */
83+ return TRUE;
84+
85 /* download all the packages themselves */
86 if (flags & GS_PLUGIN_REFRESH_FLAGS_PAYLOAD) {
87 g_auto(GStrv) package_ids = NULL;
88>>>>>>> debian/patches/0006-packagekit-Disable-updates.patch
diff --git a/debian/patches/0011-Support-snap-channels.patch b/debian/patches/0011-Support-snap-channels.patch
index c02b5ec..949ab97 100644
--- a/debian/patches/0011-Support-snap-channels.patch
+++ b/debian/patches/0011-Support-snap-channels.patch
@@ -1,12 +1,22 @@
1<<<<<<< debian/patches/0011-Support-snap-channels.patch
1From ab6caf6eab44077952e18a88021bcba0b4867991 Mon Sep 17 00:00:00 20012From ab6caf6eab44077952e18a88021bcba0b4867991 Mon Sep 17 00:00:00 2001
3=======
4From c2a9016780d84fcf7978c25c84a244bf169b4a99 Mon Sep 17 00:00:00 2001
5>>>>>>> debian/patches/0011-Support-snap-channels.patch
2From: Robert Ancell <robert.ancell@canonical.com>6From: Robert Ancell <robert.ancell@canonical.com>
3Date: Thu, 23 Nov 2017 10:54:20 +13007Date: Thu, 23 Nov 2017 10:54:20 +1300
4Subject: [PATCH 11/24] Support snap channels8Subject: [PATCH 11/24] Support snap channels
59
6---10---
11<<<<<<< debian/patches/0011-Support-snap-channels.patch
7 lib/gs-app.c | 91 ++++++++++++12 lib/gs-app.c | 91 ++++++++++++
8 lib/gs-app.h | 7 +13 lib/gs-app.h | 7 +
9 lib/gs-channel.c | 116 +++++++++++++++14 lib/gs-channel.c | 116 +++++++++++++++
15=======
16 lib/gs-app.c | 108 +++++++++++++
17 lib/gs-app.h | 9 ++
18 lib/gs-channel.c | 116 ++++++++++++++
19>>>>>>> debian/patches/0011-Support-snap-channels.patch
10 lib/gs-channel.h | 44 ++++++20 lib/gs-channel.h | 44 ++++++
11 lib/gs-plugin-job-private.h | 1 +21 lib/gs-plugin-job-private.h | 1 +
12 lib/gs-plugin-job.c | 31 ++++22 lib/gs-plugin-job.c | 31 ++++
@@ -20,16 +30,28 @@ Subject: [PATCH 11/24] Support snap channels
20 lib/gs-utils.h | 2 +30 lib/gs-utils.h | 2 +
21 lib/meson.build | 2 +31 lib/meson.build | 2 +
22 plugins/dummy/gs-plugin-dummy.c | 11 ++32 plugins/dummy/gs-plugin-dummy.c | 11 ++
33<<<<<<< debian/patches/0011-Support-snap-channels.patch
23 plugins/snap/gs-plugin-snap.c | 254 +++++++++++++++++++++++++++++---34 plugins/snap/gs-plugin-snap.c | 254 +++++++++++++++++++++++++++++---
24 src/gs-details-page.c | 199 ++++++++++++++++++++++++-35 src/gs-details-page.c | 199 ++++++++++++++++++++++++-
25 src/gs-details-page.ui | 104 ++++++++++---36 src/gs-details-page.ui | 104 ++++++++++---
26 src/gtk-style.css | 31 ++++37 src/gtk-style.css | 31 ++++
27 20 files changed, 944 insertions(+), 43 deletions(-)38 20 files changed, 944 insertions(+), 43 deletions(-)
39=======
40 plugins/snap/gs-plugin-snap.c | 264 +++++++++++++++++++++++++++++---
41 src/gs-details-page.c | 200 +++++++++++++++++++++++-
42 src/gs-details-page.ui | 104 ++++++++++---
43 src/gtk-style.css | 31 ++++
44 21 files changed, 968 insertions(+), 51 deletions(-)
45>>>>>>> debian/patches/0011-Support-snap-channels.patch
28 create mode 100644 lib/gs-channel.c46 create mode 100644 lib/gs-channel.c
29 create mode 100644 lib/gs-channel.h47 create mode 100644 lib/gs-channel.h
3048
31diff --git a/lib/gs-app.c b/lib/gs-app.c49diff --git a/lib/gs-app.c b/lib/gs-app.c
50<<<<<<< debian/patches/0011-Support-snap-channels.patch
32index 805c6894..41fe8039 10064451index 805c6894..41fe8039 100644
52=======
53index 3dde87c8..3967578e 100644
54>>>>>>> debian/patches/0011-Support-snap-channels.patch
33--- a/lib/gs-app.c55--- a/lib/gs-app.c
34+++ b/lib/gs-app.c56+++ b/lib/gs-app.c
35@@ -126,6 +126,8 @@ typedef struct57@@ -126,6 +126,8 @@ typedef struct
@@ -60,7 +82,35 @@ index 805c6894..41fe8039 100644
60 keys = g_hash_table_get_keys (priv->metadata);82 keys = g_hash_table_get_keys (priv->metadata);
61 for (GList *l = keys; l != NULL; l = l->next) {83 for (GList *l = keys; l != NULL; l = l->next) {
62 GVariant *val;84 GVariant *val;
85<<<<<<< debian/patches/0011-Support-snap-channels.patch
63@@ -3985,6 +3999,80 @@ gs_app_get_priority (GsApp *app)86@@ -3985,6 +3999,80 @@ gs_app_get_priority (GsApp *app)
87=======
88@@ -3765,6 +3779,23 @@ gs_app_add_kudo (GsApp *app, GsAppKudo kudo)
89 priv->kudos |= kudo;
90 }
91
92+/**
93+ * gs_app_remove_kudo:
94+ * @app: a #GsApp
95+ * @kudo: a #GsAppKudo, e.g. %GS_APP_KUDO_MY_LANGUAGE
96+ *
97+ * Removes a kudo from an application.
98+ *
99+ * Since: 3.28
100+ **/
101+void
102+gs_app_remove_kudo (GsApp *app, GsAppKudo kudo)
103+{
104+ GsAppPrivate *priv = gs_app_get_instance_private (app);
105+ g_return_if_fail (GS_IS_APP (app));
106+ priv->kudos &= ~kudo;
107+}
108+
109 /**
110 * gs_app_has_kudo:
111 * @app: a #GsApp
112@@ -4040,6 +4071,80 @@ gs_app_get_priority (GsApp *app)
113>>>>>>> debian/patches/0011-Support-snap-channels.patch
64 return priv->priority;114 return priv->priority;
65 }115 }
66 116
@@ -141,7 +191,11 @@ index 805c6894..41fe8039 100644
141 /**191 /**
142 * gs_app_get_cancellable:192 * gs_app_get_cancellable:
143 * @app: a #GsApp193 * @app: a #GsApp
194<<<<<<< debian/patches/0011-Support-snap-channels.patch
144@@ -4166,6 +4254,8 @@ gs_app_dispose (GObject *object)195@@ -4166,6 +4254,8 @@ gs_app_dispose (GObject *object)
196=======
197@@ -4222,6 +4327,8 @@ gs_app_dispose (GObject *object)
198>>>>>>> debian/patches/0011-Support-snap-channels.patch
145 g_clear_pointer (&priv->reviews, g_ptr_array_unref);199 g_clear_pointer (&priv->reviews, g_ptr_array_unref);
146 g_clear_pointer (&priv->provides, g_ptr_array_unref);200 g_clear_pointer (&priv->provides, g_ptr_array_unref);
147 g_clear_pointer (&priv->icons, g_ptr_array_unref);201 g_clear_pointer (&priv->icons, g_ptr_array_unref);
@@ -150,7 +204,11 @@ index 805c6894..41fe8039 100644
150 204
151 G_OBJECT_CLASS (gs_app_parent_class)->dispose (object);205 G_OBJECT_CLASS (gs_app_parent_class)->dispose (object);
152 }206 }
207<<<<<<< debian/patches/0011-Support-snap-channels.patch
153@@ -4353,6 +4443,7 @@ gs_app_init (GsApp *app)208@@ -4353,6 +4443,7 @@ gs_app_init (GsApp *app)
209=======
210@@ -4411,6 +4518,7 @@ gs_app_init (GsApp *app)
211>>>>>>> debian/patches/0011-Support-snap-channels.patch
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);
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);
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);
@@ -472,7 +530,11 @@ index fdca6868..cfd9af78 100644
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__))
473 531
474diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c532diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
533<<<<<<< debian/patches/0011-Support-snap-channels.patch
475index ca327cdb..f3a83016 100644534index ca327cdb..f3a83016 100644
535=======
536index 2fb02e3c..989f3264 100644
537>>>>>>> debian/patches/0011-Support-snap-channels.patch
476--- a/lib/gs-plugin-loader.c538--- a/lib/gs-plugin-loader.c
477+++ b/lib/gs-plugin-loader.c539+++ b/lib/gs-plugin-loader.c
478@@ -135,6 +135,11 @@ typedef gboolean (*GsPluginPurchaseFunc) (GsPlugin *plugin,540@@ -135,6 +135,11 @@ typedef gboolean (*GsPluginPurchaseFunc) (GsPlugin *plugin,
@@ -487,7 +549,11 @@ index ca327cdb..f3a83016 100644
487 typedef gboolean (*GsPluginReviewFunc) (GsPlugin *plugin,549 typedef gboolean (*GsPluginReviewFunc) (GsPlugin *plugin,
488 GsApp *app,550 GsApp *app,
489 AsReview *review,551 AsReview *review,
552<<<<<<< debian/patches/0011-Support-snap-channels.patch
490@@ -618,6 +623,14 @@ gs_plugin_loader_call_vfunc (GsPluginLoaderHelper *helper,553@@ -618,6 +623,14 @@ gs_plugin_loader_call_vfunc (GsPluginLoaderHelper *helper,
554=======
555@@ -667,6 +672,14 @@ gs_plugin_loader_call_vfunc (GsPluginLoaderHelper *helper,
556>>>>>>> debian/patches/0011-Support-snap-channels.patch
491 cancellable, &error_local);557 cancellable, &error_local);
492 }558 }
493 break;559 break;
@@ -633,10 +699,17 @@ index 868d5a50..4a749182 100644
633 699
634 static void700 static void
635diff --git a/lib/gs-utils.c b/lib/gs-utils.c701diff --git a/lib/gs-utils.c b/lib/gs-utils.c
702<<<<<<< debian/patches/0011-Support-snap-channels.patch
636index 23d24995..0db55d84 100644703index 23d24995..0db55d84 100644
637--- a/lib/gs-utils.c704--- a/lib/gs-utils.c
638+++ b/lib/gs-utils.c705+++ b/lib/gs-utils.c
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)
707=======
708index f59b8c9c..d648e240 100644
709--- a/lib/gs-utils.c
710+++ b/lib/gs-utils.c
711@@ -983,6 +983,41 @@ gs_utils_get_url_path (const gchar *url)
712>>>>>>> debian/patches/0011-Support-snap-channels.patch
640 return g_strdup (path);713 return g_strdup (path);
641 }714 }
642 715
@@ -709,8 +782,26 @@ index 7b11e72c..ae5ad87b 100644
709 'gs-category.c',782 'gs-category.c',
710+ 'gs-channel.c',783+ 'gs-channel.c',
711 'gs-debug.c',784 'gs-debug.c',
785<<<<<<< debian/patches/0011-Support-snap-channels.patch
712 'gs-ioprio.c',786 'gs-ioprio.c',
713 'gs-ioprio.h',787 'gs-ioprio.h',
788=======
789 'gs-os-release.c',
790 'gs-plugin.c',
791diff --git a/meson.build b/meson.build
792index 9ded0971..3b2f726e 100644
793--- a/meson.build
794+++ b/meson.build
795@@ -166,7 +166,7 @@ if get_option('enable-gudev')
796 endif
797
798 if get_option('enable-snap')
799- snap = dependency('snapd-glib', version : '>= 1.19')
800+ snap = dependency('snapd-glib', version : '>= 1.31')
801 endif
802
803 gnome = import('gnome')
804>>>>>>> debian/patches/0011-Support-snap-channels.patch
714diff --git a/plugins/dummy/gs-plugin-dummy.c b/plugins/dummy/gs-plugin-dummy.c805diff --git a/plugins/dummy/gs-plugin-dummy.c b/plugins/dummy/gs-plugin-dummy.c
715index 6f739ff7..02301bec 100644806index 6f739ff7..02301bec 100644
716--- a/plugins/dummy/gs-plugin-dummy.c807--- a/plugins/dummy/gs-plugin-dummy.c
@@ -734,7 +825,11 @@ index 6f739ff7..02301bec 100644
734 gs_plugin_app_upgrade_download (GsPlugin *plugin, GsApp *app,825 gs_plugin_app_upgrade_download (GsPlugin *plugin, GsApp *app,
735 GCancellable *cancellable, GError **error)826 GCancellable *cancellable, GError **error)
736diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c827diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c
828<<<<<<< debian/patches/0011-Support-snap-channels.patch
737index 693f9c8a..064443d1 100644829index 693f9c8a..064443d1 100644
830=======
831index d7957712..b5add5c1 100644
832>>>>>>> debian/patches/0011-Support-snap-channels.patch
738--- a/plugins/snap/gs-plugin-snap.c833--- a/plugins/snap/gs-plugin-snap.c
739+++ b/plugins/snap/gs-plugin-snap.c834+++ b/plugins/snap/gs-plugin-snap.c
740@@ -36,6 +36,27 @@ struct GsPluginData {835@@ -36,6 +36,27 @@ struct GsPluginData {
@@ -875,7 +970,11 @@ index 693f9c8a..064443d1 100644
875 if (store_snap != NULL)970 if (store_snap != NULL)
876 return load_store_icon (app, store_snap);971 return load_store_icon (app, store_snap);
877 972
973<<<<<<< debian/patches/0011-Support-snap-channels.patch
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)
975=======
976@@ -787,6 +819,102 @@ gs_plugin_snap_get_description_safe (SnapdSnap *snap)
977>>>>>>> debian/patches/0011-Support-snap-channels.patch
879 return g_string_free (str, FALSE);978 return g_string_free (str, FALSE);
880 }979 }
881 980
@@ -978,7 +1077,11 @@ index 693f9c8a..064443d1 100644
978 gboolean1077 gboolean
979 gs_plugin_refine_app (GsPlugin *plugin,1078 gs_plugin_refine_app (GsPlugin *plugin,
980 GsApp *app,1079 GsApp *app,
1080<<<<<<< debian/patches/0011-Support-snap-channels.patch
981@@ -791,7 +917,7 @@ gs_plugin_refine_app (GsPlugin *plugin,1081@@ -791,7 +917,7 @@ gs_plugin_refine_app (GsPlugin *plugin,
1082=======
1083@@ -796,7 +924,7 @@ gs_plugin_refine_app (GsPlugin *plugin,
1084>>>>>>> debian/patches/0011-Support-snap-channels.patch
982 {1085 {
983 GsPluginData *priv = gs_plugin_get_data (plugin);1086 GsPluginData *priv = gs_plugin_get_data (plugin);
984 g_autoptr(SnapdClient) client = NULL;1087 g_autoptr(SnapdClient) client = NULL;
@@ -987,7 +1090,11 @@ index 693f9c8a..064443d1 100644
987 g_autoptr(SnapdSnap) local_snap = NULL;1090 g_autoptr(SnapdSnap) local_snap = NULL;
988 g_autoptr(SnapdSnap) store_snap = NULL;1091 g_autoptr(SnapdSnap) store_snap = NULL;
989 SnapdSnap *snap;1092 SnapdSnap *snap;
1093<<<<<<< debian/patches/0011-Support-snap-channels.patch
990@@ -808,13 +934,52 @@ gs_plugin_refine_app (GsPlugin *plugin,1094@@ -808,13 +934,52 @@ gs_plugin_refine_app (GsPlugin *plugin,
1095=======
1096@@ -818,13 +946,52 @@ gs_plugin_refine_app (GsPlugin *plugin,
1097>>>>>>> debian/patches/0011-Support-snap-channels.patch
991 1098
992 /* get information from local snaps and store */1099 /* get information from local snaps and store */
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);
@@ -1043,7 +1150,11 @@ index 693f9c8a..064443d1 100644
1043 else1150 else
1044 gs_app_set_state (app, AS_APP_STATE_AVAILABLE);1151 gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
1045 1152
1153<<<<<<< debian/patches/0011-Support-snap-channels.patch
1046@@ -926,6 +1091,7 @@ gs_plugin_app_install (GsPlugin *plugin,1154@@ -926,6 +1091,7 @@ gs_plugin_app_install (GsPlugin *plugin,
1155=======
1156@@ -929,6 +1096,7 @@ gs_plugin_app_install (GsPlugin *plugin,
1157>>>>>>> debian/patches/0011-Support-snap-channels.patch
1047 {1158 {
1048 g_autoptr(SnapdClient) client = NULL;1159 g_autoptr(SnapdClient) client = NULL;
1049 SnapdInstallFlags flags = SNAPD_INSTALL_FLAGS_NONE;1160 SnapdInstallFlags flags = SNAPD_INSTALL_FLAGS_NONE;
@@ -1051,7 +1162,11 @@ index 693f9c8a..064443d1 100644
1051 1162
1052 /* We can only install apps we know of */1163 /* We can only install apps we know of */
1053 if (g_strcmp0 (gs_app_get_management_plugin (app), "snap") != 0)1164 if (g_strcmp0 (gs_app_get_management_plugin (app), "snap") != 0)
1165<<<<<<< debian/patches/0011-Support-snap-channels.patch
1054@@ -935,10 +1101,39 @@ gs_plugin_app_install (GsPlugin *plugin,1166@@ -935,10 +1101,39 @@ gs_plugin_app_install (GsPlugin *plugin,
1167=======
1168@@ -938,10 +1106,39 @@ gs_plugin_app_install (GsPlugin *plugin,
1169>>>>>>> debian/patches/0011-Support-snap-channels.patch
1055 if (client == NULL)1170 if (client == NULL)
1056 return FALSE;1171 return FALSE;
1057 1172
@@ -1092,7 +1207,11 @@ index 693f9c8a..064443d1 100644
1092 gs_app_set_state_recover (app);1207 gs_app_set_state_recover (app);
1093 snapd_error_convert (error);1208 snapd_error_convert (error);
1094 return FALSE;1209 return FALSE;
1210<<<<<<< debian/patches/0011-Support-snap-channels.patch
1095@@ -1027,6 +1222,31 @@ gs_plugin_launch (GsPlugin *plugin,1211@@ -1027,6 +1222,31 @@ gs_plugin_launch (GsPlugin *plugin,
1212=======
1213@@ -1030,6 +1227,31 @@ gs_plugin_launch (GsPlugin *plugin,
1214>>>>>>> debian/patches/0011-Support-snap-channels.patch
1096 return g_app_info_launch (info, NULL, NULL, error);1215 return g_app_info_launch (info, NULL, NULL, error);
1097 }1216 }
1098 1217
@@ -1124,8 +1243,35 @@ index 693f9c8a..064443d1 100644
1124 gboolean1243 gboolean
1125 gs_plugin_app_remove (GsPlugin *plugin,1244 gs_plugin_app_remove (GsPlugin *plugin,
1126 GsApp *app,1245 GsApp *app,
1246<<<<<<< debian/patches/0011-Support-snap-channels.patch
1127diff --git a/src/gs-details-page.c b/src/gs-details-page.c1247diff --git a/src/gs-details-page.c b/src/gs-details-page.c
1128index 3eafb32b..3d57a8af 1006441248index 3eafb32b..3d57a8af 100644
1249=======
1250@@ -1072,21 +1294,15 @@ gs_plugin_auth_login (GsPlugin *plugin, GsAuth *auth,
1251 g_clear_object (&priv->auth_data);
1252 if (priv->snapd_supports_polkit) {
1253 g_autoptr(SnapdClient) client = NULL;
1254-#ifdef SNAPD_GLIB_VERSION_1_26
1255 g_autoptr(SnapdUserInformation) user_information = NULL;
1256-#endif
1257
1258 client = get_client (plugin, error);
1259 if (client == NULL)
1260 return FALSE;
1261
1262-#ifdef SNAPD_GLIB_VERSION_1_26
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);
1264 if (user_information != NULL)
1265 priv->auth_data = g_object_ref (snapd_user_information_get_auth_data (user_information));
1266-#else
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);
1268-#endif
1269 }
1270 else
1271 priv->auth_data = snapd_login_sync (gs_auth_get_username (auth), gs_auth_get_password (auth), gs_auth_get_pin (auth), NULL, error);
1272diff --git a/src/gs-details-page.c b/src/gs-details-page.c
1273index 5380541c..d2132d3b 100644
1274>>>>>>> debian/patches/0011-Support-snap-channels.patch
1129--- a/src/gs-details-page.c1275--- a/src/gs-details-page.c
1130+++ b/src/gs-details-page.c1276+++ b/src/gs-details-page.c
1131@@ -113,6 +113,8 @@ struct _GsDetailsPage1277@@ -113,6 +113,8 @@ struct _GsDetailsPage
@@ -1218,7 +1364,11 @@ index 3eafb32b..3d57a8af 100644
1218 NULL);1364 NULL);
1219 gs_plugin_loader_job_process_async (self->plugin_loader, plugin_job,1365 gs_plugin_loader_job_process_async (self->plugin_loader, plugin_job,
1220 self->cancellable,1366 self->cancellable,
1367<<<<<<< debian/patches/0011-Support-snap-channels.patch
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)
1369=======
1370@@ -1930,6 +1947,166 @@ gs_details_page_app_cancel_button_cb (GtkWidget *widget, GsDetailsPage *self)
1371>>>>>>> debian/patches/0011-Support-snap-channels.patch
1222 gs_details_page_remove_app (self);1372 gs_details_page_remove_app (self);
1223 }1373 }
1224 1374
@@ -1384,7 +1534,11 @@ index 3eafb32b..3d57a8af 100644
1384 static void1534 static void
1385 gs_details_page_app_install_button_cb (GtkWidget *widget, GsDetailsPage *self)1535 gs_details_page_app_install_button_cb (GtkWidget *widget, GsDetailsPage *self)
1386 {1536 {
1537<<<<<<< debian/patches/0011-Support-snap-channels.patch
1387@@ -2405,6 +2581,9 @@ gs_details_page_setup (GsPage *page,1538@@ -2405,6 +2581,9 @@ gs_details_page_setup (GsPage *page,
1539=======
1540@@ -2398,6 +2575,9 @@ gs_details_page_setup (GsPage *page,
1541>>>>>>> debian/patches/0011-Support-snap-channels.patch
1388 g_signal_connect (self->button_donate, "clicked",1542 g_signal_connect (self->button_donate, "clicked",
1389 G_CALLBACK (gs_details_page_donate_cb),1543 G_CALLBACK (gs_details_page_donate_cb),
1390 self);1544 self);
@@ -1394,7 +1548,11 @@ index 3eafb32b..3d57a8af 100644
1394 g_signal_connect (self->button_details_license_free, "clicked",1548 g_signal_connect (self->button_details_license_free, "clicked",
1395 G_CALLBACK (gs_details_page_license_free_cb),1549 G_CALLBACK (gs_details_page_license_free_cb),
1396 self);1550 self);
1551<<<<<<< debian/patches/0011-Support-snap-channels.patch
1397@@ -2505,6 +2684,10 @@ gs_details_page_class_init (GsDetailsPageClass *klass)1552@@ -2505,6 +2684,10 @@ gs_details_page_class_init (GsDetailsPageClass *klass)
1553=======
1554@@ -2495,6 +2675,10 @@ gs_details_page_class_init (GsDetailsPageClass *klass)
1555>>>>>>> debian/patches/0011-Support-snap-channels.patch
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);
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);
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);
diff --git a/debian/patches/0014-Add-a-basic-permissions-system.patch b/debian/patches/0014-Add-a-basic-permissions-system.patch
index 37803b3..77bcad1 100644
--- a/debian/patches/0014-Add-a-basic-permissions-system.patch
+++ b/debian/patches/0014-Add-a-basic-permissions-system.patch
@@ -1,7 +1,14 @@
1<<<<<<< debian/patches/0014-Add-a-basic-permissions-system.patch
1From f5fe307b183ae0517fb52157698bf0dbdb3364c3 Mon Sep 17 00:00:00 20012From f5fe307b183ae0517fb52157698bf0dbdb3364c3 Mon Sep 17 00:00:00 2001
2From: Robert Ancell <robert.ancell@canonical.com>3From: Robert Ancell <robert.ancell@canonical.com>
3Date: Fri, 26 May 2017 16:30:56 +12004Date: Fri, 26 May 2017 16:30:56 +1200
4Subject: [PATCH 14/24] Add a basic permissions system5Subject: [PATCH 14/24] Add a basic permissions system
6=======
7From ca6ed906e2d9ee5f0116e708e369e32124a79cb0 Mon Sep 17 00:00:00 2001
8From: Robert Ancell <robert.ancell@canonical.com>
9Date: Fri, 26 May 2017 16:30:56 +1200
10Subject: [PATCH 14/22] Add a basic permissions system
11>>>>>>> debian/patches/0014-Add-a-basic-permissions-system.patch
512
6---13---
7 lib/gs-app.c | 55 ++++++++14 lib/gs-app.c | 55 ++++++++
@@ -47,10 +54,17 @@ Subject: [PATCH 14/24] Add a basic permissions system
47 create mode 100644 src/gs-permission-switch.h54 create mode 100644 src/gs-permission-switch.h
4855
49diff --git a/lib/gs-app.c b/lib/gs-app.c56diff --git a/lib/gs-app.c b/lib/gs-app.c
57<<<<<<< debian/patches/0014-Add-a-basic-permissions-system.patch
50index 41fe8039..28ceb474 10064458index 41fe8039..28ceb474 100644
51--- a/lib/gs-app.c59--- a/lib/gs-app.c
52+++ b/lib/gs-app.c60+++ b/lib/gs-app.c
53@@ -92,6 +92,7 @@ typedef struct61@@ -92,6 +92,7 @@ typedef struct
62=======
63index 04617630..f342844b 100644
64--- a/lib/gs-app.c
65+++ b/lib/gs-app.c
66@@ -91,6 +91,7 @@ typedef struct
67>>>>>>> debian/patches/0014-Add-a-basic-permissions-system.patch
54 gchar *origin;68 gchar *origin;
55 gchar *origin_appstream;69 gchar *origin_appstream;
56 gchar *origin_hostname;70 gchar *origin_hostname;
@@ -58,7 +72,11 @@ index 41fe8039..28ceb474 100644
58 gchar *update_version;72 gchar *update_version;
59 gchar *update_version_ui;73 gchar *update_version_ui;
60 gchar *update_details;74 gchar *update_details;
75<<<<<<< debian/patches/0014-Add-a-basic-permissions-system.patch
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)
77=======
78@@ -450,6 +451,18 @@ gs_app_to_string_append (GsApp *app, GString *str)
79>>>>>>> debian/patches/0014-Add-a-basic-permissions-system.patch
62 gs_app_kv_lpad (str, "icon-filename",80 gs_app_kv_lpad (str, "icon-filename",
63 as_icon_get_filename (icon));81 as_icon_get_filename (icon));
64 }82 }
@@ -77,7 +95,11 @@ index 41fe8039..28ceb474 100644
77 if (priv->match_value != 0)95 if (priv->match_value != 0)
78 gs_app_kv_printf (str, "match-value", "%05x", priv->match_value);96 gs_app_kv_printf (str, "match-value", "%05x", priv->match_value);
79 if (priv->priority != 0)97 if (priv->priority != 0)
98<<<<<<< debian/patches/0014-Add-a-basic-permissions-system.patch
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)
100=======
101@@ -2647,6 +2660,46 @@ gs_app_set_origin_hostname (GsApp *app, const gchar *origin_hostname)
102>>>>>>> debian/patches/0014-Add-a-basic-permissions-system.patch
81 priv->origin_hostname = g_strdup (origin_hostname);103 priv->origin_hostname = g_strdup (origin_hostname);
82 }104 }
83 105
@@ -124,7 +146,11 @@ index 41fe8039..28ceb474 100644
124 /**146 /**
125 * gs_app_add_screenshot:147 * gs_app_add_screenshot:
126 * @app: a #GsApp148 * @app: a #GsApp
149<<<<<<< debian/patches/0014-Add-a-basic-permissions-system.patch
127@@ -4256,6 +4309,7 @@ gs_app_dispose (GObject *object)150@@ -4256,6 +4309,7 @@ gs_app_dispose (GObject *object)
151=======
152@@ -4327,6 +4380,7 @@ gs_app_dispose (GObject *object)
153>>>>>>> debian/patches/0014-Add-a-basic-permissions-system.patch
128 g_clear_pointer (&priv->icons, g_ptr_array_unref);154 g_clear_pointer (&priv->icons, g_ptr_array_unref);
129 g_clear_pointer (&priv->channels, g_ptr_array_unref);155 g_clear_pointer (&priv->channels, g_ptr_array_unref);
130 g_clear_object (&priv->active_channel);156 g_clear_object (&priv->active_channel);
@@ -132,7 +158,11 @@ index 41fe8039..28ceb474 100644
132 158
133 G_OBJECT_CLASS (gs_app_parent_class)->dispose (object);159 G_OBJECT_CLASS (gs_app_parent_class)->dispose (object);
134 }160 }
161<<<<<<< debian/patches/0014-Add-a-basic-permissions-system.patch
135@@ -4444,6 +4498,7 @@ gs_app_init (GsApp *app)162@@ -4444,6 +4498,7 @@ gs_app_init (GsApp *app)
163=======
164@@ -4517,6 +4571,7 @@ gs_app_init (GsApp *app)
165>>>>>>> debian/patches/0014-Add-a-basic-permissions-system.patch
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);
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);
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);
@@ -141,7 +171,11 @@ index 41fe8039..28ceb474 100644
141 g_str_equal,171 g_str_equal,
142 g_free,172 g_free,
143diff --git a/lib/gs-app.h b/lib/gs-app.h173diff --git a/lib/gs-app.h b/lib/gs-app.h
174<<<<<<< debian/patches/0014-Add-a-basic-permissions-system.patch
144index 225d8708..72636aa1 100644175index 225d8708..72636aa1 100644
176=======
177index 7f469fc0..72d723d7 100644
178>>>>>>> debian/patches/0014-Add-a-basic-permissions-system.patch
145--- a/lib/gs-app.h179--- a/lib/gs-app.h
146+++ b/lib/gs-app.h180+++ b/lib/gs-app.h
147@@ -30,6 +30,7 @@181@@ -30,6 +30,7 @@
@@ -913,10 +947,17 @@ index ae5ad87b..ce019a47 100644
913 'gs-plugin-event.c',947 'gs-plugin-event.c',
914 'gs-plugin-job.c',948 'gs-plugin-job.c',
915diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c949diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c
950<<<<<<< debian/patches/0014-Add-a-basic-permissions-system.patch
916index 064443d1..bf5f42f3 100644951index 064443d1..bf5f42f3 100644
917--- a/plugins/snap/gs-plugin-snap.c952--- a/plugins/snap/gs-plugin-snap.c
918+++ b/plugins/snap/gs-plugin-snap.c953+++ b/plugins/snap/gs-plugin-snap.c
919@@ -1062,6 +1062,170 @@ gs_plugin_refine_app (GsPlugin *plugin,954@@ -1062,6 +1062,170 @@ gs_plugin_refine_app (GsPlugin *plugin,
955=======
956index ad700be7..ecdfc48d 100644
957--- a/plugins/snap/gs-plugin-snap.c
958+++ b/plugins/snap/gs-plugin-snap.c
959@@ -1044,6 +1044,170 @@ gs_plugin_refine_app (GsPlugin *plugin,
960>>>>>>> debian/patches/0014-Add-a-basic-permissions-system.patch
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)
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);
922 963
@@ -1087,7 +1128,11 @@ index 064443d1..bf5f42f3 100644
1087 return TRUE;1128 return TRUE;
1088 }1129 }
1089 1130
1131<<<<<<< debian/patches/0014-Add-a-basic-permissions-system.patch
1090@@ -1273,6 +1437,55 @@ gs_plugin_app_remove (GsPlugin *plugin,1132@@ -1273,6 +1437,55 @@ gs_plugin_app_remove (GsPlugin *plugin,
1133=======
1134@@ -1255,6 +1419,55 @@ gs_plugin_app_remove (GsPlugin *plugin,
1135>>>>>>> debian/patches/0014-Add-a-basic-permissions-system.patch
1091 return TRUE;1136 return TRUE;
1092 }1137 }
1093 1138
@@ -1168,7 +1213,11 @@ index 5ce90429..b6c9916d 100644
1168 <file preprocess="xml-stripblanks">gs-prefs-dialog.ui</file>1213 <file preprocess="xml-stripblanks">gs-prefs-dialog.ui</file>
1169 <file preprocess="xml-stripblanks">gs-removal-dialog.ui</file>1214 <file preprocess="xml-stripblanks">gs-removal-dialog.ui</file>
1170diff --git a/src/gs-details-page.c b/src/gs-details-page.c1215diff --git a/src/gs-details-page.c b/src/gs-details-page.c
1216<<<<<<< debian/patches/0014-Add-a-basic-permissions-system.patch
1171index 3d57a8af..071f91e6 1006441217index 3d57a8af..071f91e6 100644
1218=======
1219index 256881a9..8647bdfe 100644
1220>>>>>>> debian/patches/0014-Add-a-basic-permissions-system.patch
1172--- a/src/gs-details-page.c1221--- a/src/gs-details-page.c
1173+++ b/src/gs-details-page.c1222+++ b/src/gs-details-page.c
1174@@ -39,6 +39,7 @@1223@@ -39,6 +39,7 @@
@@ -1264,7 +1313,11 @@ index 3d57a8af..071f91e6 100644
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);
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);
1266diff --git a/src/gs-details-page.ui b/src/gs-details-page.ui1315diff --git a/src/gs-details-page.ui b/src/gs-details-page.ui
1316<<<<<<< debian/patches/0014-Add-a-basic-permissions-system.patch
1267index 154ce197..a3f2ccb5 1006441317index 154ce197..a3f2ccb5 100644
1318=======
1319index a9b1aad4..255617c4 100644
1320>>>>>>> debian/patches/0014-Add-a-basic-permissions-system.patch
1268--- a/src/gs-details-page.ui1321--- a/src/gs-details-page.ui
1269+++ b/src/gs-details-page.ui1322+++ b/src/gs-details-page.ui
1270@@ -367,6 +367,22 @@1323@@ -367,6 +367,22 @@
diff --git a/debian/patches/0020-Show-verified-developers.patch b/debian/patches/0020-Show-verified-developers.patch
1271new file mode 1006441324new file mode 100644
index 0000000..582b49e
--- /dev/null
+++ b/debian/patches/0020-Show-verified-developers.patch
@@ -0,0 +1,217 @@
1From 4a94b04735a2ad8852a2a148e06a631f9aff334e Mon Sep 17 00:00:00 2001
2From: Robert Ancell <robert.ancell@canonical.com>
3Date: Tue, 28 Aug 2018 12:15:09 +1200
4Subject: [PATCH 20/24] Show verified developers
5
6---
7 lib/gs-app.c | 17 +++++++++++++++++
8 lib/gs-app.h | 3 +++
9 meson.build | 2 +-
10 plugins/snap/gs-plugin-snap.c | 8 +++++++-
11 src/developer-verified.svg | 12 ++++++++++++
12 src/gnome-software.gresource.xml | 1 +
13 src/gs-details-page.c | 3 +++
14 src/gs-details-page.ui | 30 ++++++++++++++++++++++--------
15 8 files changed, 66 insertions(+), 10 deletions(-)
16 create mode 100644 src/developer-verified.svg
17
18diff --git a/lib/gs-app.c b/lib/gs-app.c
19index c8c5876b..bc7d8d75 100644
20--- a/lib/gs-app.c
21+++ b/lib/gs-app.c
22@@ -133,6 +133,7 @@ typedef struct
23 GsChannel *active_channel;
24 GCancellable *cancellable;
25 GsPluginAction pending_action;
26+ gboolean developer_is_verified;
27 } GsAppPrivate;
28
29 enum {
30@@ -1657,6 +1658,22 @@ gs_app_set_developer_name (GsApp *app, const gchar *developer_name)
31 _g_set_str (&priv->developer_name, developer_name);
32 }
33
34+gboolean
35+gs_app_get_developer_is_verified (GsApp *app)
36+{
37+ GsAppPrivate *priv = gs_app_get_instance_private (app);
38+ g_return_val_if_fail (GS_IS_APP (app), FALSE);
39+ return priv->developer_is_verified;
40+}
41+
42+void
43+gs_app_set_developer_is_verified (GsApp *app, gboolean developer_is_verified)
44+{
45+ GsAppPrivate *priv = gs_app_get_instance_private (app);
46+ g_return_if_fail (GS_IS_APP (app));
47+ priv->developer_is_verified = developer_is_verified;
48+}
49+
50 /**
51 * gs_app_get_pixbuf:
52 * @app: a #GsApp
53diff --git a/lib/gs-app.h b/lib/gs-app.h
54index 72d723d7..ffccf5db 100644
55--- a/lib/gs-app.h
56+++ b/lib/gs-app.h
57@@ -168,6 +168,9 @@ void gs_app_set_project_group (GsApp *app,
58 const gchar *gs_app_get_developer_name (GsApp *app);
59 void gs_app_set_developer_name (GsApp *app,
60 const gchar *developer_name);
61+gboolean gs_app_get_developer_is_verified (GsApp *app);
62+void gs_app_set_developer_is_verified (GsApp *app,
63+ gboolean developer_is_verified);
64 const gchar *gs_app_get_version (GsApp *app);
65 const gchar *gs_app_get_version_ui (GsApp *app);
66 void gs_app_set_version (GsApp *app,
67diff --git a/meson.build b/meson.build
68index 3b2f726e..20fdd31a 100644
69--- a/meson.build
70+++ b/meson.build
71@@ -166,7 +166,7 @@ if get_option('enable-gudev')
72 endif
73
74 if get_option('enable-snap')
75- snap = dependency('snapd-glib', version : '>= 1.31')
76+ snap = dependency('snapd-glib', version : '>= 1.42')
77 endif
78
79 gnome = import('gnome')
80diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c
81index 405ec8e1..fadb7866 100644
82--- a/plugins/snap/gs-plugin-snap.c
83+++ b/plugins/snap/gs-plugin-snap.c
84@@ -934,6 +934,7 @@ gs_plugin_refine_app (GsPlugin *plugin,
85 g_autoptr(SnapdSnap) local_snap = NULL;
86 g_autoptr(SnapdSnap) store_snap = NULL;
87 SnapdSnap *snap;
88+ const gchar *developer_name;
89 g_autofree gchar *description = NULL;
90
91 /* not us */
92@@ -1013,7 +1014,12 @@ gs_plugin_refine_app (GsPlugin *plugin,
93 if (description != NULL)
94 gs_app_set_description (app, GS_APP_QUALITY_NORMAL, description);
95 gs_app_set_license (app, GS_APP_QUALITY_NORMAL, snapd_snap_get_license (snap));
96- gs_app_set_developer_name (app, snapd_snap_get_developer (snap));
97+ developer_name = snapd_snap_get_publisher_display_name (snap);
98+ if (developer_name == NULL)
99+ developer_name = snapd_snap_get_publisher_username (snap);
100+ gs_app_set_developer_name (app, developer_name);
101+ if (snapd_snap_get_publisher_validation (snap) == SNAPD_PUBLISHER_VALIDATION_VERIFIED)
102+ gs_app_set_developer_is_verified (app, TRUE);
103
104 snap = local_snap != NULL ? local_snap : store_snap;
105 gs_app_set_version (app, snapd_snap_get_version (snap));
106diff --git a/src/developer-verified.svg b/src/developer-verified.svg
107new file mode 100644
108index 00000000..57c0f11b
109--- /dev/null
110+++ b/src/developer-verified.svg
111@@ -0,0 +1,12 @@
112+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
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 -->
114+ <title>path6490</title>
115+ <desc>Created with Sketch.</desc>
116+ <g id="misc" fill-rule="evenodd" fill="none">
117+ <g id="Artboard" fill-rule="nonzero" fill="#82BEA0" transform="translate(-419 -444)">
118+ <g id="VALIDATED--SNAPCRAFTER-ICON" transform="translate(419 444)">
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"/>
120+ </g>
121+ </g>
122+ </g>
123+</svg>
124\ No newline at end of file
125diff --git a/src/gnome-software.gresource.xml b/src/gnome-software.gresource.xml
126index 44e5a28a..46022303 100644
127--- a/src/gnome-software.gresource.xml
128+++ b/src/gnome-software.gresource.xml
129@@ -38,5 +38,6 @@
130 <file preprocess="xml-stripblanks">org.freedesktop.PackageKit.xml</file>
131 <file>gtk-style.css</file>
132 <file>gtk-style-hc.css</file>
133+ <file>developer-verified.svg</file>
134 </gresource>
135 </gresources>
136diff --git a/src/gs-details-page.c b/src/gs-details-page.c
137index 8647bdfe..16677d2a 100644
138--- a/src/gs-details-page.c
139+++ b/src/gs-details-page.c
140@@ -101,6 +101,7 @@ struct _GsDetailsPage
141 GtkWidget *label_details_category_value;
142 GtkWidget *label_details_developer_title;
143 GtkWidget *label_details_developer_value;
144+ GtkWidget *image_details_developer_verified;
145 GtkWidget *button_details_license_free;
146 GtkWidget *button_details_license_nonfree;
147 GtkWidget *button_details_license_unknown;
148@@ -963,6 +964,7 @@ gs_details_page_refresh_all (GsDetailsPage *self)
149 gtk_label_set_label (GTK_LABEL (self->label_details_developer_value), tmp);
150 gtk_widget_set_visible (self->label_details_developer_value, TRUE);
151 }
152+ gtk_widget_set_visible (self->image_details_developer_verified, gs_app_get_developer_is_verified (self->app));
153
154 /* set the license buttons */
155 tmp = gs_app_get_license (self->app);
156@@ -2702,6 +2704,7 @@ gs_details_page_class_init (GsDetailsPageClass *klass)
157 gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_details_category_value);
158 gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_details_developer_title);
159 gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_details_developer_value);
160+ gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, image_details_developer_verified);
161 gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, button_details_license_free);
162 gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, button_details_license_nonfree);
163 gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, button_details_license_unknown);
164diff --git a/src/gs-details-page.ui b/src/gs-details-page.ui
165index 255617c4..bc03b421 100644
166--- a/src/gs-details-page.ui
167+++ b/src/gs-details-page.ui
168@@ -1133,16 +1133,30 @@
169 </packing>
170 </child>
171 <child>
172- <object class="GtkLabel" id="label_details_developer_value">
173+ <object class="GtkBox" id="box_details_developer">
174 <property name="visible">True</property>
175 <property name="can_focus">False</property>
176 <property name="hexpand">True</property>
177- <property name="label">Yorba</property>
178- <property name="wrap">True</property>
179- <property name="selectable">True</property>
180- <property name="max_width_chars">10</property>
181- <property name="xalign">0</property>
182- <property name="yalign">0.5</property>
183+ <property name="spacing">3</property>
184+ <child>
185+ <object class="GtkLabel" id="label_details_developer_value">
186+ <property name="visible">True</property>
187+ <property name="can_focus">False</property>
188+ <property name="label">Yorba</property>
189+ <property name="selectable">True</property>
190+ <property name="max_width_chars">10</property>
191+ <property name="xalign">0</property>
192+ <property name="yalign">0.5</property>
193+ </object>
194+ </child>
195+ <child>
196+ <object class="GtkImage" id="image_details_developer_verified">
197+ <property name="visible">True</property>
198+ <property name="can_focus">False</property>
199+ <property name="pixel_size">16</property>
200+ <property name="resource">/org/gnome/Software/developer-verified.svg</property>
201+ </object>
202+ </child>
203 </object>
204 <packing>
205 <property name="left_attach">1</property>
206@@ -1455,7 +1469,7 @@
207 <widget name="label_details_category_value"/>
208 <widget name="label_details_size_installed_value"/>
209 <widget name="label_details_size_download_value"/>
210- <widget name="label_details_developer_value"/>
211+ <widget name="box_details_developer"/>
212 <widget name="button_details_license_free"/>
213 </widgets>
214 </object>
215--
2162.17.1
217
diff --git a/debian/patches/0021-snap-Use-wide-scope-when-searching.patch b/debian/patches/0021-snap-Use-wide-scope-when-searching.patch
0new file mode 100644218new file mode 100644
index 0000000..221f8fe
--- /dev/null
+++ b/debian/patches/0021-snap-Use-wide-scope-when-searching.patch
@@ -0,0 +1,70 @@
1From 0c6077b03a2d31eaecc1ea8968ec395270585c9c Mon Sep 17 00:00:00 2001
2From: Robert Ancell <robert.ancell@canonical.com>
3Date: Tue, 7 Aug 2018 16:49:35 +1200
4Subject: [PATCH 21/24] snap: Use wide scope when searching
5
6---
7 plugins/snap/gs-plugin-snap.c | 12 ++++++------
8 1 file changed, 6 insertions(+), 6 deletions(-)
9
10diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c
11index 509f7d0a..57fc7fa7 100644
12--- a/plugins/snap/gs-plugin-snap.c
13+++ b/plugins/snap/gs-plugin-snap.c
14@@ -385,7 +385,7 @@ gs_plugin_url_to_app (GsPlugin *plugin,
15
16 /* create app */
17 path = gs_utils_get_url_path (url);
18- snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_MATCH_NAME, NULL, path, cancellable, NULL);
19+ snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_SCOPE_WIDE | SNAPD_FIND_FLAGS_MATCH_NAME, NULL, path, cancellable, NULL);
20 if (snaps == NULL || snaps->len < 1)
21 return TRUE;
22
23@@ -451,7 +451,7 @@ gs_plugin_add_featured (GsPlugin *plugin,
24 g_autoptr(GString) background_css = NULL;
25 g_autofree gchar *css = NULL;
26
27- snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_NONE, "featured", NULL, cancellable, error);
28+ snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_SCOPE_WIDE, "featured", NULL, cancellable, error);
29
30 if (snaps == NULL)
31 return FALSE;
32@@ -520,7 +520,7 @@ gs_plugin_add_popular (GsPlugin *plugin,
33 g_autoptr(GPtrArray) snaps = NULL;
34 guint i;
35
36- snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_NONE, "featured", NULL, cancellable, error);
37+ snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_SCOPE_WIDE, "featured", NULL, cancellable, error);
38 if (snaps == NULL)
39 return FALSE;
40
41@@ -578,7 +578,7 @@ gs_plugin_add_category_apps (GsPlugin *plugin,
42 g_autoptr(GPtrArray) snaps = NULL;
43 guint j;
44
45- snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_NONE, tokens[i], NULL, cancellable, error);
46+ snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_SCOPE_WIDE, tokens[i], NULL, cancellable, error);
47 if (snaps == NULL)
48 return FALSE;
49 for (j = 0; j < snaps->len; j++) {
50@@ -636,7 +636,7 @@ gs_plugin_add_search (GsPlugin *plugin,
51 guint i;
52
53 query = g_strjoinv (" ", values);
54- snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_NONE, NULL, query, cancellable, error);
55+ snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_SCOPE_WIDE, NULL, query, cancellable, error);
56 if (snaps == NULL)
57 return FALSE;
58
59@@ -659,7 +659,7 @@ get_store_snap (GsPlugin *plugin, const gchar *name, gboolean need_details, GCan
60 if (snap != NULL)
61 return g_object_ref (snap);
62
63- snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_MATCH_NAME, NULL, name, cancellable, error);
64+ snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_SCOPE_WIDE | SNAPD_FIND_FLAGS_MATCH_NAME, NULL, name, cancellable, error);
65 if (snaps == NULL || snaps->len < 1)
66 return NULL;
67
68--
692.17.1
70
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
0new file mode 10064471new file mode 100644
index 0000000..070fd81
--- /dev/null
+++ b/debian/patches/0022-Delay-startup-of-GNOME-Software-to-allow-the-Shell-t.patch
@@ -0,0 +1,25 @@
1From 7932bac03d7d47011ee170dc2b31e9de1512812c Mon Sep 17 00:00:00 2001
2From: Jean-Baptiste Lallement <jean-baptiste.lallement@canonical.com>
3Date: Mon, 25 Jun 2018 16:14:38 +1200
4Subject: [PATCH 22/25] Delay startup of GNOME Software to allow the Shell to
5 load first.
6
7---
8 src/gnome-software-service.desktop.in | 1 +
9 1 file changed, 1 insertion(+)
10
11diff --git a/src/gnome-software-service.desktop.in b/src/gnome-software-service.desktop.in
12index dc4d4d90..fb47759b 100644
13--- a/src/gnome-software-service.desktop.in
14+++ b/src/gnome-software-service.desktop.in
15@@ -1,6 +1,7 @@
16 [Desktop Entry]
17 Type=Application
18 Name=GNOME Software
19+X-GNOME-Autostart-Delay=60
20 Exec=@bindir@/gnome-software --gapplication-service
21 OnlyShowIn=GNOME;Unity;
22 NoDisplay=true
23--
242.17.1
25
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
0new file mode 10064426new file mode 100644
index 0000000..eeb6403
--- /dev/null
+++ b/debian/patches/0023-Revert-Revert-flatpak-Use-list-of-related-apps-for-i.patch
@@ -0,0 +1,114 @@
1From 3b71756838799497639163a637ef7120a756277e Mon Sep 17 00:00:00 2001
2From: Joaquim Rocha <jrocha@endlessm.com>
3Date: Wed, 23 May 2018 13:17:37 +0200
4Subject: [PATCH 23/28] Revert "Revert "flatpak: Use "list of related apps for
5 install" when updating an app""
6
7This reverts commit 79c14a2c67ec1ac459ace6c2e08dce74f78a9e16 and brings
8back the ae5c13cc39eae89ab261bab44ea2fd0fc941f9d5 and
9eb68607baea3b83b719acb739516b361a6758bcf.
10
11The mentioned functionality had been reverted in order for the release
123.28 but it's necessary for getting the related apps when updating apps.
13---
14 plugins/flatpak/gs-flatpak.c | 53 +++++++++++++++++++++++++++---------
15 1 file changed, 40 insertions(+), 13 deletions(-)
16
17diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
18index 6a424ed8..8f57eda6 100644
19--- a/plugins/flatpak/gs-flatpak.c
20+++ b/plugins/flatpak/gs-flatpak.c
21@@ -2587,8 +2587,11 @@ gs_flatpak_refine_runtime_for_install (GsFlatpak *self,
22 }
23
24 static GsAppList *
25-gs_flatpak_get_list_for_install (GsFlatpak *self, GsApp *app,
26- GCancellable *cancellable, GError **error)
27+gs_flatpak_get_list_for_install_or_update (GsFlatpak *self,
28+ GsApp *app,
29+ gboolean is_update,
30+ GCancellable *cancellable,
31+ GError **error)
32 {
33 GsApp *runtime;
34 g_autofree gchar *ref = NULL;
35@@ -2596,6 +2599,7 @@ gs_flatpak_get_list_for_install (GsFlatpak *self, GsApp *app,
36 g_autoptr(GPtrArray) xrefs_installed = NULL;
37 g_autoptr(GHashTable) hash_installed = NULL;
38 g_autoptr(GsAppList) list = gs_app_list_new ();
39+ g_autofree gchar *app_ref = NULL;
40
41 /* get the list of installed apps */
42 xrefs_installed = flatpak_installation_list_installed_refs (self->installation,
43@@ -2658,26 +2662,49 @@ gs_flatpak_get_list_for_install (GsFlatpak *self, GsApp *app,
44 /* already installed? */
45 app_tmp = gs_flatpak_create_app (self, FLATPAK_REF (xref_related));
46 ref_display = gs_flatpak_app_get_ref_display (app_tmp);
47- if (g_hash_table_contains (hash_installed, ref_display)) {
48+ if (!is_update && g_hash_table_contains (hash_installed, ref_display)) {
49 g_debug ("not adding related %s as already installed", ref_display);
50- } else {
51- gs_app_set_origin (app_tmp, gs_app_get_origin (app));
52- g_debug ("adding related %s for install", ref_display);
53-
54- if (!gs_plugin_refine_item_state (self, app_tmp, cancellable, error))
55- return NULL;
56+ continue;
57+ }
58
59- gs_app_list_add (list, app_tmp);
60+ gs_app_set_origin (app_tmp, gs_app_get_origin (app));
61+ if (!gs_plugin_refine_item_state (self, app_tmp, cancellable, error))
62+ return FALSE;
63+ if (is_update && !gs_app_is_updatable (app_tmp)) {
64+ g_debug ("not adding related %s as it's not updatable", ref_display);
65+ continue;
66 }
67+ g_debug ("adding related %s for install/update", ref_display);
68+ gs_app_list_add (list, app_tmp);
69 }
70
71- /* add the original app last unless it's a proxy app */
72- if (!gs_app_has_quirk (app, AS_APP_QUIRK_IS_PROXY))
73+ /* add the original app last unless it's already installed or is a proxy app */
74+ app_ref = gs_flatpak_app_get_ref_display (app);
75+ if (!gs_app_has_quirk (app, AS_APP_QUIRK_IS_PROXY) &&
76+ !g_hash_table_contains (hash_installed, app_ref))
77 gs_app_list_add (list, app);
78
79 return g_steal_pointer (&list);
80 }
81
82+static GsAppList *
83+gs_flatpak_get_list_for_install (GsFlatpak *self,
84+ GsApp *app,
85+ GCancellable *cancellable,
86+ GError **error)
87+{
88+ return gs_flatpak_get_list_for_install_or_update (self, app, FALSE, cancellable, error);
89+}
90+
91+static GsAppList *
92+gs_flatpak_get_list_for_update (GsFlatpak *self,
93+ GsApp *app,
94+ GCancellable *cancellable,
95+ GError **error)
96+{
97+ return gs_flatpak_get_list_for_install_or_update (self, app, TRUE, cancellable, error);
98+}
99+
100 gboolean
101 gs_flatpak_app_remove (GsFlatpak *self,
102 GsApp *app,
103@@ -3065,7 +3092,7 @@ gs_flatpak_update_app (GsFlatpak *self,
104 }
105
106 /* get the list of apps to process */
107- list = gs_flatpak_get_list_for_install (self, app, cancellable, error);
108+ list = gs_flatpak_get_list_for_update (self, app, cancellable, error);
109 if (list == NULL) {
110 g_prefix_error (error, "failed to get related refs: ");
111 gs_app_set_state_recover (app);
112--
1132.19.1
114
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
0new file mode 100644115new file mode 100644
index 0000000..640e5c5
--- /dev/null
+++ b/debian/patches/0024-flatpak-Check-if-a-related-app-is-installed-even-whe.patch
@@ -0,0 +1,37 @@
1From 54e1bbc547a52485cec6d2de32ff02205e9c5917 Mon Sep 17 00:00:00 2001
2From: Joaquim Rocha <jrocha@endlessm.com>
3Date: Wed, 13 Dec 2017 00:48:13 +0000
4Subject: [PATCH 24/28] flatpak: Check if a related app is installed even when
5 dealing with updates
6
7When dealing with updates, gs-flatpak gets the list of related apps
8(usually runtime extensions) that should be updated together with the
9main app. However, if one of those related apps is not installed, the
10gs_app_is_updatable call will return FALSE and the app will not be
11installed.
12This is a problem when e.g. a runtime extension has been mistakenly
13removed, or when an app is updated and needs a new runtime extension.
14
15This patch simply adds a further test for whether the app is installed,
16together with the logic mentioned above.
17---
18 plugins/flatpak/gs-flatpak.c | 3 ++-
19 1 file changed, 2 insertions(+), 1 deletion(-)
20
21diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
22index 8f57eda6..d8781206 100644
23--- a/plugins/flatpak/gs-flatpak.c
24+++ b/plugins/flatpak/gs-flatpak.c
25@@ -2670,7 +2670,8 @@ gs_flatpak_get_list_for_install_or_update (GsFlatpak *self,
26 gs_app_set_origin (app_tmp, gs_app_get_origin (app));
27 if (!gs_plugin_refine_item_state (self, app_tmp, cancellable, error))
28 return FALSE;
29- if (is_update && !gs_app_is_updatable (app_tmp)) {
30+ if (gs_app_is_installed (app_tmp) && is_update &&
31+ !gs_app_is_updatable (app_tmp)) {
32 g_debug ("not adding related %s as it's not updatable", ref_display);
33 continue;
34 }
35--
362.19.1
37
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
0new file mode 10064438new file mode 100644
index 0000000..22bdc42
--- /dev/null
+++ b/debian/patches/0025-flatpak-Include-related-refs-to-the-app-s-runtime-on.patch
@@ -0,0 +1,192 @@
1From 04977409f7f5179f7ce17ab894fd51e3c539f4d6 Mon Sep 17 00:00:00 2001
2From: Joaquim Rocha <jrocha@endlessm.com>
3Date: Wed, 23 May 2018 13:02:20 +0200
4Subject: [PATCH 25/28] flatpak: Include related refs to the app's runtime on
5 install/update
6
7When installing/updating an app, if its related refs and its runtime
8need to be installed as well, then they do. However, refs that are
9related to the runtime itself do not get installed, and this is a
10problem because some apps may need them (besides being a discrepancy
11between using the Flatpak CLI and GNOME Software for installing Flatpak
12apps).
13
14Thus, these changes add any refs related to an app's runtime to the
15list of refs that should be installed when installing or updating an
16app. Note that it deliberately doesn't update refs related to the
17runtime though, just as it doesn't update the runtime when updating an
18app. Thus, refs that are related to the runtime get updated together
19with it.
20---
21 plugins/flatpak/gs-flatpak.c | 124 +++++++++++++++++++++++++----------
22 1 file changed, 88 insertions(+), 36 deletions(-)
23
24diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
25index d8781206..a820918c 100644
26--- a/plugins/flatpak/gs-flatpak.c
27+++ b/plugins/flatpak/gs-flatpak.c
28@@ -2586,6 +2586,68 @@ gs_flatpak_refine_runtime_for_install (GsFlatpak *self,
29 return TRUE;
30 }
31
32+static GPtrArray *
33+gs_flatpak_get_app_remote_related_refs (GsFlatpak *self,
34+ GsApp *app,
35+ GCancellable *cancellable,
36+ GError **error)
37+{
38+ g_autofree gchar *ref = NULL;
39+
40+ /* lookup any related refs for this ref */
41+ ref = g_strdup_printf ("%s/%s/%s/%s",
42+ gs_flatpak_app_get_ref_kind_as_str (app),
43+ gs_flatpak_app_get_ref_name (app),
44+ gs_flatpak_app_get_ref_arch (app),
45+ gs_flatpak_app_get_ref_branch (app));
46+ return flatpak_installation_list_remote_related_refs_sync (self->installation,
47+ gs_app_get_origin (app),
48+ ref, cancellable, error);
49+}
50+
51+static gboolean
52+gs_flatpak_add_related_refs_to_list (GsFlatpak *self,
53+ GsApp *app,
54+ GPtrArray *related_refs,
55+ GHashTable *hash_installed,
56+ gboolean is_update,
57+ GsAppList *list,
58+ GCancellable *cancellable,
59+ GError **error)
60+{
61+ for (guint i = 0; i < related_refs->len; i++) {
62+ FlatpakRelatedRef *xref_related = g_ptr_array_index (related_refs, i);
63+ g_autofree gchar *ref_display = NULL;
64+ g_autoptr(GsApp) app_tmp = NULL;
65+
66+ /* not included */
67+ if (!gs_flatpak_related_should_download (self, app, xref_related))
68+ continue;
69+
70+ /* already installed? */
71+ app_tmp = gs_flatpak_create_app (self, FLATPAK_REF (xref_related));
72+ ref_display = gs_flatpak_app_get_ref_display (app_tmp);
73+ if (!is_update && g_hash_table_contains (hash_installed, ref_display)) {
74+ g_debug ("not adding related %s as already installed", ref_display);
75+ continue;
76+ }
77+
78+ if (gs_app_get_origin (app_tmp) == NULL)
79+ gs_app_set_origin (app_tmp, gs_app_get_origin (app));
80+
81+ if (!gs_plugin_refine_item_state (self, app_tmp, cancellable, error))
82+ return FALSE;
83+ if (gs_app_is_installed (app_tmp) && is_update &&
84+ !gs_app_is_updatable (app_tmp)) {
85+ g_debug ("not adding related %s as it's not updatable", ref_display);
86+ continue;
87+ }
88+ g_debug ("adding related %s for install/update", ref_display);
89+ gs_app_list_add (list, app_tmp);
90+ }
91+ return TRUE;
92+}
93+
94 static GsAppList *
95 gs_flatpak_get_list_for_install_or_update (GsFlatpak *self,
96 GsApp *app,
97@@ -2596,6 +2658,7 @@ gs_flatpak_get_list_for_install_or_update (GsFlatpak *self,
98 GsApp *runtime;
99 g_autofree gchar *ref = NULL;
100 g_autoptr(GPtrArray) related = NULL;
101+ g_autoptr(GPtrArray) runtime_related = NULL;
102 g_autoptr(GPtrArray) xrefs_installed = NULL;
103 g_autoptr(GHashTable) hash_installed = NULL;
104 g_autoptr(GsAppList) list = gs_app_list_new ();
105@@ -2621,6 +2684,7 @@ gs_flatpak_get_list_for_install_or_update (GsFlatpak *self,
106 return NULL;
107 runtime = gs_app_get_update_runtime (app);
108 if (runtime != NULL) {
109+ g_autoptr(GError) local_error = NULL;
110 g_autofree gchar *ref_display = NULL;
111 ref_display = gs_flatpak_app_get_ref_display (runtime);
112 if (g_hash_table_contains (hash_installed, ref_display)) {
113@@ -2632,52 +2696,40 @@ gs_flatpak_get_list_for_install_or_update (GsFlatpak *self,
114 gs_flatpak_app_get_ref_branch (runtime));
115 gs_app_list_add (list, runtime);
116 }
117+
118+ /* add refs related to the runtime */
119+ runtime_related = gs_flatpak_get_app_remote_related_refs (self, runtime,
120+ cancellable,
121+ &local_error);
122+ if (runtime_related == NULL)
123+ g_debug ("Failed to get related refs for runtime %s when "
124+ "installing/updating %s: %s; continuing nonetheless...",
125+ gs_app_get_unique_id (runtime),
126+ gs_app_get_unique_id (app),
127+ local_error->message);
128 }
129
130 /* lookup any related refs for this ref */
131- ref = g_strdup_printf ("%s/%s/%s/%s",
132- gs_flatpak_app_get_ref_kind_as_str (app),
133- gs_flatpak_app_get_ref_name (app),
134- gs_flatpak_app_get_ref_arch (app),
135- gs_flatpak_app_get_ref_branch (app));
136- related = flatpak_installation_list_remote_related_refs_sync (self->installation,
137- gs_app_get_origin (app),
138- ref, cancellable, error);
139+ related = gs_flatpak_get_app_remote_related_refs (self, app, cancellable, error);
140 if (related == NULL) {
141 g_prefix_error (error, "using origin %s: ", gs_app_get_origin (app));
142 gs_flatpak_error_convert (error);
143 return NULL;
144 }
145
146- /* any extra bits */
147- for (guint i = 0; i < related->len; i++) {
148- FlatpakRelatedRef *xref_related = g_ptr_array_index (related, i);
149- g_autofree gchar *ref_display = NULL;
150- g_autoptr(GsApp) app_tmp = NULL;
151-
152- /* not included */
153- if (!gs_flatpak_related_should_download (self, app, xref_related))
154- continue;
155-
156- /* already installed? */
157- app_tmp = gs_flatpak_create_app (self, FLATPAK_REF (xref_related));
158- ref_display = gs_flatpak_app_get_ref_display (app_tmp);
159- if (!is_update && g_hash_table_contains (hash_installed, ref_display)) {
160- g_debug ("not adding related %s as already installed", ref_display);
161- continue;
162- }
163+ /* add refs related to the app */
164+ if (!gs_flatpak_add_related_refs_to_list (self, app, related, hash_installed,
165+ is_update, list, cancellable, error))
166+ return FALSE;
167
168- gs_app_set_origin (app_tmp, gs_app_get_origin (app));
169- if (!gs_plugin_refine_item_state (self, app_tmp, cancellable, error))
170- return FALSE;
171- if (gs_app_is_installed (app_tmp) && is_update &&
172- !gs_app_is_updatable (app_tmp)) {
173- g_debug ("not adding related %s as it's not updatable", ref_display);
174- continue;
175- }
176- g_debug ("adding related %s for install/update", ref_display);
177- gs_app_list_add (list, app_tmp);
178- }
179+ /* add refs related to the runtime; however, we're only adding them if they
180+ * need to be installed, as their update should be performed together with
181+ * the runtime instead */
182+ if (runtime_related != NULL &&
183+ !gs_flatpak_add_related_refs_to_list (self, runtime, runtime_related,
184+ hash_installed, FALSE, list,
185+ cancellable, error))
186+ return FALSE;
187
188 /* add the original app last unless it's already installed or is a proxy app */
189 app_ref = gs_flatpak_app_get_ref_display (app);
190--
1912.19.1
192
diff --git a/debian/patches/0026-shell-search-provider-implement-XUbuntuCancel.patch b/debian/patches/0026-shell-search-provider-implement-XUbuntuCancel.patch
0new file mode 100644193new file mode 100644
index 0000000..f914b22
--- /dev/null
+++ b/debian/patches/0026-shell-search-provider-implement-XUbuntuCancel.patch
@@ -0,0 +1,176 @@
1From 2ac5ea28829ecaff2f8a180f2ef7eefbb07602d9 Mon Sep 17 00:00:00 2001
2From: Andrea Azzarone <andrea.azzarone@canonical.com>
3Date: Fri, 7 Sep 2018 19:58:00 +0200
4Subject: [PATCH 24/26] shell-search-provider: implement XUbuntuCancel
5
6Implement XUbuntuCancel to request search cancellation. This is used by
7gnome-shell to cancel the current search e.g. if the search overview is
8closed.
9---
10 src/gs-shell-search-provider.c | 74 +++++++++++++++----
11 src/shell-search-provider-dbus-interfaces.xml | 1 +
12 2 files changed, 60 insertions(+), 15 deletions(-)
13
14diff --git a/src/gs-shell-search-provider.c b/src/gs-shell-search-provider.c
15index c01d72cb..8c1e0fda 100644
16--- a/src/gs-shell-search-provider.c
17+++ b/src/gs-shell-search-provider.c
18@@ -45,6 +45,8 @@ struct _GsShellSearchProvider {
19 GsPluginLoader *plugin_loader;
20 GCancellable *cancellable;
21
22+ PendingSearch *current_search;
23+
24 GHashTable *metas_cache;
25 GsAppList *search_results;
26 };
27@@ -58,6 +60,17 @@ pending_search_free (PendingSearch *search)
28 g_slice_free (PendingSearch, search);
29 }
30
31+static void
32+cancel_current_search (GsShellSearchProvider *self)
33+{
34+ g_debug ("*** Cancel current search");
35+
36+ if (self->cancellable != NULL) {
37+ g_cancellable_cancel (self->cancellable);
38+ g_clear_object (&self->cancellable);
39+ }
40+}
41+
42 static gint
43 search_sort_by_kudo_cb (GsApp *app1, GsApp *app2, gpointer user_data)
44 {
45@@ -71,6 +84,23 @@ search_sort_by_kudo_cb (GsApp *app1, GsApp *app2, gpointer user_data)
46 return 0;
47 }
48
49+static void
50+pending_search_finish (PendingSearch *search,
51+ GDBusMethodInvocation *invocation,
52+ GVariant *result)
53+{
54+ GsShellSearchProvider *self = search->provider;
55+
56+ g_dbus_method_invocation_return_value (invocation, result);
57+
58+ if (search == self->current_search) {
59+ self->current_search = NULL;
60+ }
61+
62+ pending_search_free (search);
63+ g_application_release (g_application_get_default ());
64+}
65+
66 static void
67 search_done_cb (GObject *source,
68 GAsyncResult *res,
69@@ -87,10 +117,9 @@ search_done_cb (GObject *source,
70
71 list = gs_plugin_loader_job_process_finish (self->plugin_loader, res, NULL);
72 if (list == NULL) {
73- g_dbus_method_invocation_return_value (search->invocation, g_variant_new ("(as)", NULL));
74- pending_search_free (search);
75- g_application_release (g_application_get_default ());
76- return;
77+ pending_search_finish (search, search->invocation,
78+ g_variant_new ("(as)", NULL));
79+ return;
80 }
81
82 /* sort by kudos, as there is no ratings data by default */
83@@ -106,10 +135,8 @@ search_done_cb (GObject *source,
84 /* cache this in case we need the app in GetResultMetas */
85 gs_app_list_add (self->search_results, app);
86 }
87- g_dbus_method_invocation_return_value (search->invocation, g_variant_new ("(as)", &builder));
88
89- pending_search_free (search);
90- g_application_release (g_application_get_default ());
91+ pending_search_finish (search, search->invocation, g_variant_new ("(as)", &builder));
92 }
93
94 static gchar *
95@@ -167,10 +194,7 @@ execute_search (GsShellSearchProvider *self,
96
97 value = g_strjoinv (" ", terms);
98
99- if (self->cancellable != NULL) {
100- g_cancellable_cancel (self->cancellable);
101- g_clear_object (&self->cancellable);
102- }
103+ cancel_current_search (self);
104
105 /* don't attempt searches for a single character */
106 if (g_strv_length (terms) == 1 &&
107@@ -183,6 +207,7 @@ execute_search (GsShellSearchProvider *self,
108 pending_search->provider = self;
109 pending_search->invocation = g_object_ref (invocation);
110
111+ self->current_search = pending_search;
112 g_application_hold (g_application_get_default ());
113 self->cancellable = g_cancellable_new ();
114
115@@ -334,6 +359,26 @@ handle_launch_search (GsShellSearchProvider2 *skeleton,
116 return TRUE;
117 }
118
119+static gboolean
120+handle_xubuntu_cancel (GsShellSearchProvider2 *skeleton,
121+ GDBusMethodInvocation *invocation,
122+ gpointer user_data)
123+{
124+ GsShellSearchProvider *self = GS_SHELL_SEARCH_PROVIDER (user_data);
125+
126+ g_debug ("*** XUbuntuCancel called");
127+
128+ if (self->current_search != NULL &&
129+ g_strcmp0 (g_dbus_method_invocation_get_sender (self->current_search->invocation),
130+ g_dbus_method_invocation_get_sender (invocation)) == 0) {
131+ cancel_current_search (self);
132+ }
133+
134+ gs_shell_search_provider2_complete_xubuntu_cancel (skeleton, invocation);
135+
136+ return TRUE;
137+}
138+
139 gboolean
140 gs_shell_search_provider_register (GsShellSearchProvider *self,
141 GDBusConnection *connection,
142@@ -355,10 +400,7 @@ search_provider_dispose (GObject *obj)
143 {
144 GsShellSearchProvider *self = GS_SHELL_SEARCH_PROVIDER (obj);
145
146- if (self->cancellable != NULL) {
147- g_cancellable_cancel (self->cancellable);
148- g_clear_object (&self->cancellable);
149- }
150+ cancel_current_search (self);
151
152 if (self->metas_cache != NULL) {
153 g_hash_table_destroy (self->metas_cache);
154@@ -393,6 +435,8 @@ gs_shell_search_provider_init (GsShellSearchProvider *self)
155 G_CALLBACK (handle_activate_result), self);
156 g_signal_connect (self->skeleton, "handle-launch-search",
157 G_CALLBACK (handle_launch_search), self);
158+ g_signal_connect (self->skeleton, "handle-xubuntu-cancel",
159+ G_CALLBACK (handle_xubuntu_cancel), self);
160 }
161
162 static void
163diff --git a/src/shell-search-provider-dbus-interfaces.xml b/src/shell-search-provider-dbus-interfaces.xml
164index f6840e2c..4529c1e8 100644
165--- a/src/shell-search-provider-dbus-interfaces.xml
166+++ b/src/shell-search-provider-dbus-interfaces.xml
167@@ -40,5 +40,6 @@
168 <arg type='as' name='Terms' direction='in' />
169 <arg type='u' name='Timestamp' direction='in' />
170 </method>
171+ <method name = 'XUbuntuCancel' />
172 </interface>
173 </node>
174--
1752.17.1
176
diff --git a/debian/patches/series b/debian/patches/series
index fba8a0a..91ad116 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,9 +1,18 @@
1# Patches from upstream1# Patches from upstream
2<<<<<<< debian/patches/series
20001-details-page-Add-support-for-verified-developers.patch30001-details-page-Add-support-for-verified-developers.patch
30002-snap-Set-verified-developer-flag.patch40002-snap-Set-verified-developer-flag.patch
40001-lib-Allow-opening-CAB-files-that-resolve-more-than-o.patch50001-lib-Allow-opening-CAB-files-that-resolve-more-than-o.patch
50001-Use-correct-boolean-type-for-GsPluginJob-interactive.patch60001-Use-correct-boolean-type-for-GsPluginJob-interactive.patch
60001-Revert-ef15f51d.patch70001-Revert-ef15f51d.patch
8=======
90001-snap-Scale-embedded-snap-icons-to-64x64.patch
100001-snap-Only-load-icons-once.patch
110001-Fix-gs_app_set_state_recover-not-working-during-purc.patch
120001-snap-plugin-segfault.patch
130001-Set-reboot-notifications-as-urgent-to-avoid-them-tim.patch
140001-lib-Allow-opening-CAB-files-that-resolve-more-than-o.patch
15>>>>>>> debian/patches/series
716
8# Patches from the ubuntu* branch17# Patches from the ubuntu* branch
90001-Construct-the-Software-Sources-menu-item-dynamically.patch180001-Construct-the-Software-Sources-menu-item-dynamically.patch
@@ -20,6 +29,7 @@
200012-Don-t-use-colour-to-differentiate-between-free-and-p.patch290012-Don-t-use-colour-to-differentiate-between-free-and-p.patch
210013-overview-page-Rotate-featured-apps.patch300013-overview-page-Rotate-featured-apps.patch
220014-Add-a-basic-permissions-system.patch310014-Add-a-basic-permissions-system.patch
32<<<<<<< debian/patches/series
230015-build-Translate-Ubuntu-s-.desktop-file.patch330015-build-Translate-Ubuntu-s-.desktop-file.patch
240016-snap-Use-default-icon-if-none-provided.patch340016-snap-Use-default-icon-if-none-provided.patch
250017-snap-Make-snaps-purchasable.patch350017-snap-Make-snaps-purchasable.patch
@@ -30,3 +40,17 @@
300022-snap-Use-wide-scope-when-searching.patch400022-snap-Use-wide-scope-when-searching.patch
310023-snap-Don-t-treat-auth-cancellation-as-an-error.patch410023-snap-Don-t-treat-auth-cancellation-as-an-error.patch
320024-shell-search-provider-implement-XUbuntuCancel.patch420024-shell-search-provider-implement-XUbuntuCancel.patch
43=======
440015-Don-t-reject-unexpected-state-changes-external-event.patch
450016-build-Translate-Ubuntu-s-.desktop-file.patch
460017-snap-Use-default-icon-if-none-provided.patch
470018-snap-Make-snaps-purchasable.patch
480019-Disable-paid-snap-support-unless-env-variable-GNOME_.patch
490020-Show-verified-developers.patch
500021-snap-Use-wide-scope-when-searching.patch
510022-Delay-startup-of-GNOME-Software-to-allow-the-Shell-t.patch
520023-Revert-Revert-flatpak-Use-list-of-related-apps-for-i.patch
530024-flatpak-Check-if-a-related-app-is-installed-even-whe.patch
540025-flatpak-Include-related-refs-to-the-app-s-runtime-on.patch
550026-shell-search-provider-implement-XUbuntuCancel.patch
56>>>>>>> debian/patches/series

Subscribers

People subscribed via source and target branches