Marco Trevisan (Treviño) has proposed merging 
~3v1n0/ubuntu/+source/gnome-software:ubuntu/bionic into 
~ubuntu-desktop/ubuntu/+source/gnome-software:ubuntu/master.

Requested reviews:
  Ubuntu Desktop (ubuntu-desktop)
Related bugs:
  Bug #1719797 in gnome-software (Ubuntu): "Firmware update seemingly not 
working"
  https://bugs.launchpad.net/ubuntu/+source/gnome-software/+bug/1719797
  Bug #1754864 in gnome-software (Ubuntu): "Flatpak related refs are not 
installed when using GNOME Software on Ubuntu 18.04"
  https://bugs.launchpad.net/ubuntu/+source/gnome-software/+bug/1754864
  Bug #1756379 in gnome-software (Ubuntu): "Delay start of gnome-software 
service"
  https://bugs.launchpad.net/ubuntu/+source/gnome-software/+bug/1756379
  Bug #1756826 in nautilus (Ubuntu): "hangs when remote search provider 
performs expensive operation"
  https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/1756826
  Bug #1798228 in gnome-software (Ubuntu): "Snap search results not in the same 
order as command line"
  https://bugs.launchpad.net/ubuntu/+source/gnome-software/+bug/1798228
  Bug #1798470 in gnome-software (Ubuntu): "gnome-software can't handle 
composite CAB files"
  https://bugs.launchpad.net/ubuntu/+source/gnome-software/+bug/1798470

For more details, see:
https://code.launchpad.net/~3v1n0/ubuntu/+source/gnome-software/+git/gnome-software/+merge/358488
-- 
Your team Ubuntu Desktop is requested to review the proposed merge of 
~3v1n0/ubuntu/+source/gnome-software:ubuntu/bionic into 
~ubuntu-desktop/ubuntu/+source/gnome-software:ubuntu/master.
diff --git a/debian/changelog b/debian/changelog
index 3a663a4..8dcdc3a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,4 @@
+<<<<<<< debian/changelog
 gnome-software (3.30.2-0ubuntu8) cosmic; urgency=medium
 
   * debian/patches/0001-Revert-ef15f51d.patch:
@@ -147,20 +148,79 @@ gnome-software (3.29.1-0ubuntu1) cosmic; urgency=medium
  -- Robert Ancell <[email protected]>  Wed, 23 May 2018 11:55:28 +1200
 
 gnome-software (3.28.1-0ubuntu6) cosmic; urgency=medium
+=======
+gnome-software (3.28.1-0ubuntu4.18.04.6) bionic; urgency=medium
+>>>>>>> debian/changelog
 
+  * debian/patches/0026-shell-search-provider-implement-XUbuntuCancel.patch
+    - implement XUbuntuCancel to request pending search cancellation from
+      gnome-shell (LP: #1756826)
+
+ -- Marco Trevisan (Treviño) <[email protected]>  Thu, 08 Nov 2018 03:32:00 -0600
+
+gnome-software (3.28.1-0ubuntu4.18.04.5) bionic; urgency=medium
+
+  * 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)
+  * debian/patches/0003-Sort-snaps-before-other-apps.patch:
+    - Fix snap search result ordering (LP: #1798228)
+  * debian/patches/0001-Set-reboot-notifications-as-urgent-to-avoid-them-tim.patch:
+    - Stop reboot notification from timing out (LP: #1719797)
+  * debian/patches/0001-lib-Allow-opening-CAB-files-that-resolve-more-than-o.patch:
+    - Support composite CAB files (LP: #1798470)
+
+ -- Robert Ancell <[email protected]>  Mon, 29 Oct 2018 16:06:34 +1300
+
+gnome-software (3.28.1-0ubuntu4.18.04.4) bionic; urgency=medium
+
+  * debian/control:
+    - Bump build-dependency on libsnapd-glib-dev
+  * debian/patches/0020-Show-verified-developers.patch:
+    - Show verified developers (LP: #1789336)
   * debian/patches/0011-Support-snap-channels.patch:
-    - Make snap channel selection list scrollable (LP: #1768779)
-    - Fix channel branches all showing the same name (LP: #1768794)
-    - Alphabetically sort channel branch names (LP: #1769556)
+  * debian/patches/0021-snap-Use-wide-scope-when-searching.patch:
+    - Use wide scope searching (LP: #1789338)
+  * 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)
 
+ -- Robert Ancell <[email protected]>  Wed, 19 Sep 2018 16:27:38 +0200
+
+gnome-software (3.28.1-0ubuntu4.18.04.3) bionic; urgency=medium
+
+<<<<<<< debian/changelog
  -- Robert Ancell <[email protected]>  Mon, 07 May 2018 16:31:46 +1200
+=======
+  * debian/patches/0006-packagekit-Disable-updates.patch:
+    - also disable offline updates in refresh plugin (LP: #1775226)
+>>>>>>> debian/changelog
+
+ -- Olivier Tilloy <[email protected]>  Thu, 02 Aug 2018 12:25:36 +0200
 
-gnome-software (3.28.1-0ubuntu5) cosmic; urgency=medium
+gnome-software (3.28.1-0ubuntu4.18.04.2) bionic; urgency=medium
+
+  [ Robert Ancell ]
+  * debian/patches/0014-Add-a-basic-permissions-system.patch:
+    - Fix crash when have plugs with multiple slots available (LP: #1778160)
+
+  [ Andrea Azzarone ]
+  * debian/patches/0001-snap-plugin-segfault.patch:
+    - don't segfault on null snap installation date (lp: #1781996)
+
+ -- Sebastien Bacher <[email protected]>  Thu, 19 Jul 2018 17:10:17 +0200
+
+gnome-software (3.28.1-0ubuntu4.18.04.1) bionic; urgency=medium
 
   * debian/patches/0011-Support-snap-channels.patch:
     - Fix incorrect default install version being shown (LP: #1767445)
+    - Make snap channel selection list scrollable (LP: #1768779)
+    - Fix channel branches all showing the same name (LP: #1768794)
+    - Alphabetically sort channel branch names (LP: #1769556)
+  * debian/control:
+    - Use bionic Vcs link
 
- -- Robert Ancell <[email protected]>  Thu, 03 May 2018 12:33:30 +1200
+ -- Robert Ancell <[email protected]>  Mon, 07 May 2018 16:32:37 +1200
 
 gnome-software (3.28.1-0ubuntu4) bionic; urgency=medium
 
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,
                libpackagekit-glib2-dev (>= 1.1.4),
                libpolkit-gobject-1-dev,
                libsecret-1-dev,
+<<<<<<< debian/control
                libsnapd-glib-dev (>= 1.43) [amd64 arm64 armel armhf i386 ppc64 ppc64el s390x],
+=======
+               libsnapd-glib-dev (>= 1.42) [amd64 arm64 armel armhf i386 ppc64 ppc64el s390x],
+>>>>>>> debian/control
                libsoup2.4-dev (>= 2.52),
                libsqlite3-dev,
                libxml2-utils,
@@ -42,7 +46,11 @@ Homepage: https://wiki.gnome.org/Apps/Software
 XS-Debian-Vcs-Browser: https://salsa.debian.org/gnome-team/gnome-software
 XS-Debian-Vcs-Git: https://salsa.debian.org/gnome-team/gnome-software.git
 Vcs-Browser: https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/gnome-software
+<<<<<<< debian/control
 Vcs-Git: https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/gnome-software
+=======
+Vcs-Git: https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/gnome-software -b ubuntu/bionic
+>>>>>>> debian/control
 
 Package: gnome-software
 Architecture: any
@@ -60,7 +68,12 @@ Conflicts: sessioninstaller
 Recommends: gnome-software-plugin-snap [linux-any],
 Suggests: apt-config-icons-hidpi,
           fwupd [amd64 arm64 armhf i386],
+<<<<<<< debian/control
           gnome-software-plugin-flatpak [linux-any]
+=======
+          gnome-software-plugin-flatpak [linux-any],
+          gnome-software-plugin-limba [linux-any]
+>>>>>>> debian/control
 Description: Software Center for GNOME
  Software lets you install and update applications and system extensions.
  .
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,
                libpackagekit-glib2-dev (>= 1.1.4),
                libpolkit-gobject-1-dev,
                libsecret-1-dev,
+<<<<<<< debian/control.in
                libsnapd-glib-dev (>= 1.43) [amd64 arm64 armel armhf i386 ppc64 ppc64el s390x],
+=======
+               libsnapd-glib-dev (>= 1.42) [amd64 arm64 armel armhf i386 ppc64 ppc64el s390x],
+>>>>>>> debian/control.in
                libsoup2.4-dev (>= 2.52),
                libsqlite3-dev,
                libxml2-utils,
@@ -38,7 +42,11 @@ Homepage: https://wiki.gnome.org/Apps/Software
 XS-Debian-Vcs-Browser: https://salsa.debian.org/gnome-team/gnome-software
 XS-Debian-Vcs-Git: https://salsa.debian.org/gnome-team/gnome-software.git
 Vcs-Browser: https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/gnome-software
+<<<<<<< debian/control.in
 Vcs-Git: https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/gnome-software
+=======
+Vcs-Git: https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/gnome-software -b ubuntu/bionic
+>>>>>>> debian/control.in
 
 Package: gnome-software
 Architecture: 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 @@
 [DEFAULT]
 debian-branch=ubuntu/master
+<<<<<<< debian/gbp.conf
 upstream-branch=upstream/latest
 debian-tag=ubuntu/%(version)s
 upstream-vcs-tag=%(version)s
@@ -17,3 +18,9 @@ postimport = dch -v%(version)s New upstream release; git add debian/changelog; d
 [pq]
 patch-numbers = False
 
+=======
+upstream-branch=upstream/3.28.x
+debian-tag=ubuntu/%(version)s
+upstream-vcs-tag=%(version)s
+pristine-tar=True
+>>>>>>> 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
new 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 @@
+From 057eea7cc03d647544b5819ff37951f7bfffb77e Mon Sep 17 00:00:00 2001
+From: Mario Limonciello <[email protected]>
+Date: Thu, 13 Sep 2018 12:28:58 -0500
+Subject: [PATCH] Set reboot notifications as urgent to avoid them timing out
+ (Fixes: #341)
+
+It was confirmed in https://bugzilla.gnome.org/show_bug.cgi?id=783719
+that this field will influence the timeout
+---
+ src/gs-updates-page.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/gs-updates-page.c b/src/gs-updates-page.c
+index fa77dbd9..cd9db05d 100644
+--- a/src/gs-updates-page.c
++++ b/src/gs-updates-page.c
+@@ -751,6 +751,7 @@ _perform_update_cb (GsPluginLoader *plugin_loader, GAsyncResult *res, gpointer u
+ 		/* TRANSLATORS: button text */
+ 		g_notification_add_button_with_target (n, _("Restart"), "app.reboot", NULL);
+ 		g_notification_set_default_action_and_target (n, "app.set-mode", "s", "updates");
++		g_notification_set_priority (n, G_NOTIFICATION_PRIORITY_URGENT);
+ 		g_application_send_notification (g_application_get_default (), "restart-required", n);
+ 	}
+ }
+-- 
+2.19.1
+
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 @@
+<<<<<<< debian/patches/0001-lib-Allow-opening-CAB-files-that-resolve-more-than-o.patch
 From 8e8887f890489959daa3400f531e7febf9e9f8b6 Mon Sep 17 00:00:00 2001
+=======
+From 3c5e8905fb72437f7ce62fcc7fcd2fa0988e31d0 Mon Sep 17 00:00:00 2001
+>>>>>>> debian/patches/0001-lib-Allow-opening-CAB-files-that-resolve-more-than-o.patch
 From: Mario Limonciello <[email protected]>
 Date: Tue, 16 Oct 2018 11:21:47 -0500
 Subject: [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.
  1 file changed, 1 insertion(+), 6 deletions(-)
 
 diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
+<<<<<<< debian/patches/0001-lib-Allow-opening-CAB-files-that-resolve-more-than-o.patch
 index 55afa8bb..630d0c6c 100644
 --- a/lib/gs-plugin-loader.c
 +++ b/lib/gs-plugin-loader.c
 @@ -3385,12 +3385,7 @@ gs_plugin_loader_process_thread_cb (GTask *task,
+=======
+index 2fb02e3c..f52d1d27 100644
+--- a/lib/gs-plugin-loader.c
++++ b/lib/gs-plugin-loader.c
+@@ -3449,12 +3449,7 @@ gs_plugin_loader_process_thread_cb (GTask *task,
+>>>>>>> debian/patches/0001-lib-Allow-opening-CAB-files-that-resolve-more-than-o.patch
  		}
  		if (gs_app_list_length (list) > 1) {
  			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
new file mode 100644
index 0000000..6d1bbfd
--- /dev/null
+++ b/debian/patches/0001-snap-plugin-segfault.patch
@@ -0,0 +1,32 @@
+From e766ac5bd36295a851bf08296734f7df45208dd9 Mon Sep 17 00:00:00 2001
+From: Andrea Azzarone <[email protected]>
+Date: Mon, 16 Jul 2018 21:44:45 +0200
+Subject: [PATCH] snap: Don't pass NULL to g_date_time_to_unix
+
+As per API documentation, snapd_snap_get_install_date can return NULL. Passing
+NULL to g_date_time_to_unix results in a crash. When this happens we should pass
+GS_APP_INSTALL_DATE_UNKNOWN to gs_app_set_install_date.
+
+Fixes: https://bugs.launchpad.net/bugs/1781996
+---
+ plugins/snap/gs-plugin-snap.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c
+index 14571efe..6323f6ca 100644
+--- a/plugins/snap/gs-plugin-snap.c
++++ b/plugins/snap/gs-plugin-snap.c
+@@ -823,9 +823,11 @@ gs_plugin_refine_app (GsPlugin *plugin,
+ 	/* add information specific to installed snaps */
+ 	if (local_snap != NULL) {
+ 		SnapdApp *snap_app;
++		GDateTime *install_date;
+ 
++		install_date = snapd_snap_get_install_date (local_snap);
+ 		gs_app_set_size_installed (app, snapd_snap_get_installed_size (local_snap));
+-		gs_app_set_install_date (app, g_date_time_to_unix (snapd_snap_get_install_date (local_snap)));
++		gs_app_set_install_date (app, install_date != NULL ? g_date_time_to_unix (install_date) : GS_APP_INSTALL_DATE_UNKNOWN);
+ 
+ 		snap_app = get_primary_app (local_snap);
+ 		if (snap_app != NULL) {
+
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 @@
+<<<<<<< debian/patches/0003-Sort-snaps-before-other-apps.patch
 From 93554bae8d7de73ad56532abc0b4d28a8bc8290b Mon Sep 17 00:00:00 2001
 From: Robert Ancell <[email protected]>
 Date: Wed, 30 Mar 2016 15:55:47 +1300
 Subject: [PATCH 03/26] Sort snaps before other apps
+=======
+From d11180688c730f3f27edbb6f374858b33144ee42 Mon Sep 17 00:00:00 2001
+From: Robert Ancell <[email protected]>
+Date: Wed, 30 Mar 2016 15:55:47 +1300
+Subject: [PATCH 03/28] Sort snaps before other apps
+>>>>>>> debian/patches/0003-Sort-snaps-before-other-apps.patch
 
 ---
  plugins/snap/gs-plugin-snap.c | 1 +
@@ -9,10 +16,17 @@ Subject: [PATCH 03/26] Sort snaps before other apps
  2 files changed, 7 insertions(+)
 
 diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c
+<<<<<<< debian/patches/0003-Sort-snaps-before-other-apps.patch
 index d34948fe..f9c6a347 100644
 --- a/plugins/snap/gs-plugin-snap.c
 +++ b/plugins/snap/gs-plugin-snap.c
 @@ -585,6 +585,7 @@ gs_plugin_add_search (GsPlugin *plugin,
+=======
+index 510a02a7..45f65bda 100644
+--- a/plugins/snap/gs-plugin-snap.c
++++ b/plugins/snap/gs-plugin-snap.c
+@@ -590,6 +590,7 @@ gs_plugin_add_search (GsPlugin *plugin,
+>>>>>>> debian/patches/0003-Sort-snaps-before-other-apps.patch
  
  	for (i = 0; i < snaps->len; i++) {
  		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 @@
+<<<<<<< debian/patches/0006-packagekit-Disable-updates.patch
 From 5117239ec132fc976ae9cc74e8f40a310221e602 Mon Sep 17 00:00:00 2001
 From: Olivier Tilloy <[email protected]>
 Date: Tue, 7 Aug 2018 19:03:23 +0200
 Subject: [PATCH 06/26] packagekit: Disable updates
 
 In Ubuntu we use Update Manager for this currently. The long term plan is to use Software, but we're not there yet.
+=======
+Description: [PATCH 06/20] packagekit: Disable updates
+ In Ubuntu we use Update Manager for this currently. The long term plan
+ is to use Software, but we're not there yet.
+Author: Iain Lane <[email protected]>
+Author: Olivier Tilloy <[email protected]>
+Date: Thu, 20 Jul 2017 10:12:58 +0100
+Last-Update: 2018-08-01
+>>>>>>> debian/patches/0006-packagekit-Disable-updates.patch
 ---
  plugins/packagekit/gs-plugin-packagekit-refresh.c | 3 +++
  plugins/packagekit/gs-plugin-packagekit.c         | 3 +++
  plugins/packagekit/gs-plugin-systemd-updates.c    | 3 +++
  3 files changed, 9 insertions(+)
 
+<<<<<<< debian/patches/0006-packagekit-Disable-updates.patch
 diff --git a/plugins/packagekit/gs-plugin-packagekit-refresh.c b/plugins/packagekit/gs-plugin-packagekit-refresh.c
 index 2b8ce27c..a6002d5d 100644
 --- a/plugins/packagekit/gs-plugin-packagekit-refresh.c
@@ -40,6 +51,8 @@ index 8d7eb551..db3cc49d 100644
  	results = pk_client_get_updates (PK_CLIENT (priv->task),
 diff --git a/plugins/packagekit/gs-plugin-systemd-updates.c b/plugins/packagekit/gs-plugin-systemd-updates.c
 index 449a9726..320af255 100644
+=======
+>>>>>>> debian/patches/0006-packagekit-Disable-updates.patch
 --- a/plugins/packagekit/gs-plugin-systemd-updates.c
 +++ b/plugins/packagekit/gs-plugin-systemd-updates.c
 @@ -253,6 +253,9 @@ gs_plugin_update (GsPlugin *plugin,
@@ -49,9 +62,27 @@ index 449a9726..320af255 100644
 +	/* In Ubuntu we're using Update Manager for this, for now. */
 +	return TRUE;
 +
+<<<<<<< debian/patches/0006-packagekit-Disable-updates.patch
  	/* any are us? */
  	for (guint i = 0; i < gs_app_list_length (list); i++) {
  		GsApp *app = gs_app_list_index (list, i);
 -- 
 2.17.1
 
+=======
+ 	/* get the id's if the file exists */
+ 	package_ids = pk_offline_get_prepared_ids (&error_local);
+ 	if (package_ids == NULL) {
+--- a/plugins/packagekit/gs-plugin-packagekit-refresh.c
++++ b/plugins/packagekit/gs-plugin-packagekit-refresh.c
+@@ -97,6 +97,9 @@ gs_plugin_refresh (GsPlugin *plugin,
+ 		}
+ 	}
+ 
++	/* In Ubuntu we're using Update Manager for this, for now (LP: #1775226) */
++	return TRUE;
++
+ 	/* download all the packages themselves */
+ 	if (flags & GS_PLUGIN_REFRESH_FLAGS_PAYLOAD) {
+ 		g_auto(GStrv) package_ids = NULL;
+>>>>>>> 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 @@
+<<<<<<< debian/patches/0011-Support-snap-channels.patch
 From ab6caf6eab44077952e18a88021bcba0b4867991 Mon Sep 17 00:00:00 2001
+=======
+From c2a9016780d84fcf7978c25c84a244bf169b4a99 Mon Sep 17 00:00:00 2001
+>>>>>>> debian/patches/0011-Support-snap-channels.patch
 From: Robert Ancell <[email protected]>
 Date: Thu, 23 Nov 2017 10:54:20 +1300
 Subject: [PATCH 11/24] Support snap channels
 
 ---
+<<<<<<< debian/patches/0011-Support-snap-channels.patch
  lib/gs-app.c                    |  91 ++++++++++++
  lib/gs-app.h                    |   7 +
  lib/gs-channel.c                | 116 +++++++++++++++
+=======
+ lib/gs-app.c                    | 108 +++++++++++++
+ lib/gs-app.h                    |   9 ++
+ lib/gs-channel.c                | 116 ++++++++++++++
+>>>>>>> debian/patches/0011-Support-snap-channels.patch
  lib/gs-channel.h                |  44 ++++++
  lib/gs-plugin-job-private.h     |   1 +
  lib/gs-plugin-job.c             |  31 ++++
@@ -20,16 +30,28 @@ Subject: [PATCH 11/24] Support snap channels
  lib/gs-utils.h                  |   2 +
  lib/meson.build                 |   2 +
  plugins/dummy/gs-plugin-dummy.c |  11 ++
+<<<<<<< debian/patches/0011-Support-snap-channels.patch
  plugins/snap/gs-plugin-snap.c   | 254 +++++++++++++++++++++++++++++---
  src/gs-details-page.c           | 199 ++++++++++++++++++++++++-
  src/gs-details-page.ui          | 104 ++++++++++---
  src/gtk-style.css               |  31 ++++
  20 files changed, 944 insertions(+), 43 deletions(-)
+=======
+ plugins/snap/gs-plugin-snap.c   | 264 +++++++++++++++++++++++++++++---
+ src/gs-details-page.c           | 200 +++++++++++++++++++++++-
+ src/gs-details-page.ui          | 104 ++++++++++---
+ src/gtk-style.css               |  31 ++++
+ 21 files changed, 968 insertions(+), 51 deletions(-)
+>>>>>>> debian/patches/0011-Support-snap-channels.patch
  create mode 100644 lib/gs-channel.c
  create mode 100644 lib/gs-channel.h
 
 diff --git a/lib/gs-app.c b/lib/gs-app.c
+<<<<<<< debian/patches/0011-Support-snap-channels.patch
 index 805c6894..41fe8039 100644
+=======
+index 3dde87c8..3967578e 100644
+>>>>>>> debian/patches/0011-Support-snap-channels.patch
 --- a/lib/gs-app.c
 +++ b/lib/gs-app.c
 @@ -126,6 +126,8 @@ typedef struct
@@ -60,7 +82,35 @@ index 805c6894..41fe8039 100644
  	keys = g_hash_table_get_keys (priv->metadata);
  	for (GList *l = keys; l != NULL; l = l->next) {
  		GVariant *val;
+<<<<<<< debian/patches/0011-Support-snap-channels.patch
 @@ -3985,6 +3999,80 @@ gs_app_get_priority (GsApp *app)
+=======
+@@ -3765,6 +3779,23 @@ gs_app_add_kudo (GsApp *app, GsAppKudo kudo)
+ 	priv->kudos |= kudo;
+ }
+ 
++/**
++ * gs_app_remove_kudo:
++ * @app: a #GsApp
++ * @kudo: a #GsAppKudo, e.g. %GS_APP_KUDO_MY_LANGUAGE
++ *
++ * Removes a kudo from an application.
++ *
++ * Since: 3.28
++ **/
++void
++gs_app_remove_kudo (GsApp *app, GsAppKudo kudo)
++{
++	GsAppPrivate *priv = gs_app_get_instance_private (app);
++	g_return_if_fail (GS_IS_APP (app));
++	priv->kudos &= ~kudo;
++}
++
+ /**
+  * gs_app_has_kudo:
+  * @app: a #GsApp
+@@ -4040,6 +4071,80 @@ gs_app_get_priority (GsApp *app)
+>>>>>>> debian/patches/0011-Support-snap-channels.patch
  	return priv->priority;
  }
  
@@ -141,7 +191,11 @@ index 805c6894..41fe8039 100644
  /**
   * gs_app_get_cancellable:
   * @app: a #GsApp
+<<<<<<< debian/patches/0011-Support-snap-channels.patch
 @@ -4166,6 +4254,8 @@ gs_app_dispose (GObject *object)
+=======
+@@ -4222,6 +4327,8 @@ gs_app_dispose (GObject *object)
+>>>>>>> debian/patches/0011-Support-snap-channels.patch
  	g_clear_pointer (&priv->reviews, g_ptr_array_unref);
  	g_clear_pointer (&priv->provides, g_ptr_array_unref);
  	g_clear_pointer (&priv->icons, g_ptr_array_unref);
@@ -150,7 +204,11 @@ index 805c6894..41fe8039 100644
  
  	G_OBJECT_CLASS (gs_app_parent_class)->dispose (object);
  }
+<<<<<<< debian/patches/0011-Support-snap-channels.patch
 @@ -4353,6 +4443,7 @@ gs_app_init (GsApp *app)
+=======
+@@ -4411,6 +4518,7 @@ gs_app_init (GsApp *app)
+>>>>>>> debian/patches/0011-Support-snap-channels.patch
  	priv->reviews = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
  	priv->provides = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
  	priv->icons = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
@@ -472,7 +530,11 @@ index fdca6868..cfd9af78 100644
  #define		 gs_plugin_job_newv(a,...)		GS_PLUGIN_JOB(g_object_new(GS_TYPE_PLUGIN_JOB, "action", a, __VA_ARGS__))
  
 diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
+<<<<<<< debian/patches/0011-Support-snap-channels.patch
 index ca327cdb..f3a83016 100644
+=======
+index 2fb02e3c..989f3264 100644
+>>>>>>> debian/patches/0011-Support-snap-channels.patch
 --- a/lib/gs-plugin-loader.c
 +++ b/lib/gs-plugin-loader.c
 @@ -135,6 +135,11 @@ typedef gboolean	 (*GsPluginPurchaseFunc)	(GsPlugin	*plugin,
@@ -487,7 +549,11 @@ index ca327cdb..f3a83016 100644
  typedef gboolean	 (*GsPluginReviewFunc)		(GsPlugin	*plugin,
  							 GsApp		*app,
  							 AsReview	*review,
+<<<<<<< debian/patches/0011-Support-snap-channels.patch
 @@ -618,6 +623,14 @@ gs_plugin_loader_call_vfunc (GsPluginLoaderHelper *helper,
+=======
+@@ -667,6 +672,14 @@ gs_plugin_loader_call_vfunc (GsPluginLoaderHelper *helper,
+>>>>>>> debian/patches/0011-Support-snap-channels.patch
  					   cancellable, &error_local);
  		}
  		break;
@@ -633,10 +699,17 @@ index 868d5a50..4a749182 100644
  
  static void
 diff --git a/lib/gs-utils.c b/lib/gs-utils.c
+<<<<<<< debian/patches/0011-Support-snap-channels.patch
 index 23d24995..0db55d84 100644
 --- a/lib/gs-utils.c
 +++ b/lib/gs-utils.c
 @@ -982,6 +982,41 @@ gs_utils_get_url_path (const gchar *url)
+=======
+index f59b8c9c..d648e240 100644
+--- a/lib/gs-utils.c
++++ b/lib/gs-utils.c
+@@ -983,6 +983,41 @@ gs_utils_get_url_path (const gchar *url)
+>>>>>>> debian/patches/0011-Support-snap-channels.patch
  	return g_strdup (path);
  }
  
@@ -709,8 +782,26 @@ index 7b11e72c..ae5ad87b 100644
      'gs-category.c',
 +    'gs-channel.c',
      'gs-debug.c',
+<<<<<<< debian/patches/0011-Support-snap-channels.patch
      'gs-ioprio.c',
      'gs-ioprio.h',
+=======
+     'gs-os-release.c',
+     'gs-plugin.c',
+diff --git a/meson.build b/meson.build
+index 9ded0971..3b2f726e 100644
+--- a/meson.build
++++ b/meson.build
+@@ -166,7 +166,7 @@ if get_option('enable-gudev')
+ endif
+ 
+ if get_option('enable-snap')
+-  snap = dependency('snapd-glib', version : '>= 1.19')
++  snap = dependency('snapd-glib', version : '>= 1.31')
+ endif
+ 
+ gnome = import('gnome')
+>>>>>>> debian/patches/0011-Support-snap-channels.patch
 diff --git a/plugins/dummy/gs-plugin-dummy.c b/plugins/dummy/gs-plugin-dummy.c
 index 6f739ff7..02301bec 100644
 --- a/plugins/dummy/gs-plugin-dummy.c
@@ -734,7 +825,11 @@ index 6f739ff7..02301bec 100644
  gs_plugin_app_upgrade_download (GsPlugin *plugin, GsApp *app,
  			        GCancellable *cancellable, GError **error)
 diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c
+<<<<<<< debian/patches/0011-Support-snap-channels.patch
 index 693f9c8a..064443d1 100644
+=======
+index d7957712..b5add5c1 100644
+>>>>>>> debian/patches/0011-Support-snap-channels.patch
 --- a/plugins/snap/gs-plugin-snap.c
 +++ b/plugins/snap/gs-plugin-snap.c
 @@ -36,6 +36,27 @@ struct GsPluginData {
@@ -875,7 +970,11 @@ index 693f9c8a..064443d1 100644
  	if (store_snap != NULL)
  		return load_store_icon (app, store_snap);
  
+<<<<<<< debian/patches/0011-Support-snap-channels.patch
 @@ -782,6 +812,102 @@ gs_plugin_snap_get_description_safe (SnapdSnap *snap)
+=======
+@@ -787,6 +819,102 @@ gs_plugin_snap_get_description_safe (SnapdSnap *snap)
+>>>>>>> debian/patches/0011-Support-snap-channels.patch
  	return g_string_free (str, FALSE);
  }
  
@@ -978,7 +1077,11 @@ index 693f9c8a..064443d1 100644
  gboolean
  gs_plugin_refine_app (GsPlugin *plugin,
  		      GsApp *app,
+<<<<<<< debian/patches/0011-Support-snap-channels.patch
 @@ -791,7 +917,7 @@ gs_plugin_refine_app (GsPlugin *plugin,
+=======
+@@ -796,7 +924,7 @@ gs_plugin_refine_app (GsPlugin *plugin,
+>>>>>>> debian/patches/0011-Support-snap-channels.patch
  {
  	GsPluginData *priv = gs_plugin_get_data (plugin);
  	g_autoptr(SnapdClient) client = NULL;
@@ -987,7 +1090,11 @@ index 693f9c8a..064443d1 100644
  	g_autoptr(SnapdSnap) local_snap = NULL;
  	g_autoptr(SnapdSnap) store_snap = NULL;
  	SnapdSnap *snap;
+<<<<<<< debian/patches/0011-Support-snap-channels.patch
 @@ -808,13 +934,52 @@ gs_plugin_refine_app (GsPlugin *plugin,
+=======
+@@ -818,13 +946,52 @@ gs_plugin_refine_app (GsPlugin *plugin,
+>>>>>>> debian/patches/0011-Support-snap-channels.patch
  
  	/* get information from local snaps and store */
  	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
  	else
  		gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
  
+<<<<<<< debian/patches/0011-Support-snap-channels.patch
 @@ -926,6 +1091,7 @@ gs_plugin_app_install (GsPlugin *plugin,
+=======
+@@ -929,6 +1096,7 @@ gs_plugin_app_install (GsPlugin *plugin,
+>>>>>>> debian/patches/0011-Support-snap-channels.patch
  {
  	g_autoptr(SnapdClient) client = NULL;
  	SnapdInstallFlags flags = SNAPD_INSTALL_FLAGS_NONE;
@@ -1051,7 +1162,11 @@ index 693f9c8a..064443d1 100644
  
  	/* We can only install apps we know of */
  	if (g_strcmp0 (gs_app_get_management_plugin (app), "snap") != 0)
+<<<<<<< debian/patches/0011-Support-snap-channels.patch
 @@ -935,10 +1101,39 @@ gs_plugin_app_install (GsPlugin *plugin,
+=======
+@@ -938,10 +1106,39 @@ gs_plugin_app_install (GsPlugin *plugin,
+>>>>>>> debian/patches/0011-Support-snap-channels.patch
  	if (client == NULL)
  		return FALSE;
  
@@ -1092,7 +1207,11 @@ index 693f9c8a..064443d1 100644
  		gs_app_set_state_recover (app);
  		snapd_error_convert (error);
  		return FALSE;
+<<<<<<< debian/patches/0011-Support-snap-channels.patch
 @@ -1027,6 +1222,31 @@ gs_plugin_launch (GsPlugin *plugin,
+=======
+@@ -1030,6 +1227,31 @@ gs_plugin_launch (GsPlugin *plugin,
+>>>>>>> debian/patches/0011-Support-snap-channels.patch
  	return g_app_info_launch (info, NULL, NULL, error);
  }
  
@@ -1124,8 +1243,35 @@ index 693f9c8a..064443d1 100644
  gboolean
  gs_plugin_app_remove (GsPlugin *plugin,
  		      GsApp *app,
+<<<<<<< debian/patches/0011-Support-snap-channels.patch
 diff --git a/src/gs-details-page.c b/src/gs-details-page.c
 index 3eafb32b..3d57a8af 100644
+=======
+@@ -1072,21 +1294,15 @@ gs_plugin_auth_login (GsPlugin *plugin, GsAuth *auth,
+ 	g_clear_object (&priv->auth_data);
+ 	if (priv->snapd_supports_polkit) {
+ 		g_autoptr(SnapdClient) client = NULL;
+-#ifdef SNAPD_GLIB_VERSION_1_26
+ 		g_autoptr(SnapdUserInformation) user_information = NULL;
+-#endif
+ 
+ 		client = get_client (plugin, error);
+ 		if (client == NULL)
+ 			return FALSE;
+ 
+-#ifdef SNAPD_GLIB_VERSION_1_26
+ 		user_information = snapd_client_login2_sync (client, gs_auth_get_username (auth), gs_auth_get_password (auth), gs_auth_get_pin (auth), NULL, error);
+ 		if (user_information != NULL)
+ 			priv->auth_data = g_object_ref (snapd_user_information_get_auth_data (user_information));
+-#else
+-		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);
+-#endif
+ 	}
+ 	else
+ 		priv->auth_data = snapd_login_sync (gs_auth_get_username (auth), gs_auth_get_password (auth), gs_auth_get_pin (auth), NULL, error);
+diff --git a/src/gs-details-page.c b/src/gs-details-page.c
+index 5380541c..d2132d3b 100644
+>>>>>>> debian/patches/0011-Support-snap-channels.patch
 --- a/src/gs-details-page.c
 +++ b/src/gs-details-page.c
 @@ -113,6 +113,8 @@ struct _GsDetailsPage
@@ -1218,7 +1364,11 @@ index 3eafb32b..3d57a8af 100644
  					 NULL);
  	gs_plugin_loader_job_process_async (self->plugin_loader, plugin_job,
  					    self->cancellable,
+<<<<<<< debian/patches/0011-Support-snap-channels.patch
 @@ -1932,6 +1949,165 @@ gs_details_page_app_cancel_button_cb (GtkWidget *widget, GsDetailsPage *self)
+=======
+@@ -1930,6 +1947,166 @@ gs_details_page_app_cancel_button_cb (GtkWidget *widget, GsDetailsPage *self)
+>>>>>>> debian/patches/0011-Support-snap-channels.patch
  		gs_details_page_remove_app (self);
  }
  
@@ -1384,7 +1534,11 @@ index 3eafb32b..3d57a8af 100644
  static void
  gs_details_page_app_install_button_cb (GtkWidget *widget, GsDetailsPage *self)
  {
+<<<<<<< debian/patches/0011-Support-snap-channels.patch
 @@ -2405,6 +2581,9 @@ gs_details_page_setup (GsPage *page,
+=======
+@@ -2398,6 +2575,9 @@ gs_details_page_setup (GsPage *page,
+>>>>>>> debian/patches/0011-Support-snap-channels.patch
  	g_signal_connect (self->button_donate, "clicked",
  			  G_CALLBACK (gs_details_page_donate_cb),
  			  self);
@@ -1394,7 +1548,11 @@ index 3eafb32b..3d57a8af 100644
  	g_signal_connect (self->button_details_license_free, "clicked",
  			  G_CALLBACK (gs_details_page_license_free_cb),
  			  self);
+<<<<<<< debian/patches/0011-Support-snap-channels.patch
 @@ -2505,6 +2684,10 @@ gs_details_page_class_init (GsDetailsPageClass *klass)
+=======
+@@ -2495,6 +2675,10 @@ gs_details_page_class_init (GsDetailsPageClass *klass)
+>>>>>>> debian/patches/0011-Support-snap-channels.patch
  	gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_details_size_installed_value);
  	gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_details_updated_title);
  	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 @@
+<<<<<<< debian/patches/0014-Add-a-basic-permissions-system.patch
 From f5fe307b183ae0517fb52157698bf0dbdb3364c3 Mon Sep 17 00:00:00 2001
 From: Robert Ancell <[email protected]>
 Date: Fri, 26 May 2017 16:30:56 +1200
 Subject: [PATCH 14/24] Add a basic permissions system
+=======
+From ca6ed906e2d9ee5f0116e708e369e32124a79cb0 Mon Sep 17 00:00:00 2001
+From: Robert Ancell <[email protected]>
+Date: Fri, 26 May 2017 16:30:56 +1200
+Subject: [PATCH 14/22] Add a basic permissions system
+>>>>>>> debian/patches/0014-Add-a-basic-permissions-system.patch
 
 ---
  lib/gs-app.c                     |  55 ++++++++
@@ -47,10 +54,17 @@ Subject: [PATCH 14/24] Add a basic permissions system
  create mode 100644 src/gs-permission-switch.h
 
 diff --git a/lib/gs-app.c b/lib/gs-app.c
+<<<<<<< debian/patches/0014-Add-a-basic-permissions-system.patch
 index 41fe8039..28ceb474 100644
 --- a/lib/gs-app.c
 +++ b/lib/gs-app.c
 @@ -92,6 +92,7 @@ typedef struct
+=======
+index 04617630..f342844b 100644
+--- a/lib/gs-app.c
++++ b/lib/gs-app.c
+@@ -91,6 +91,7 @@ typedef struct
+>>>>>>> debian/patches/0014-Add-a-basic-permissions-system.patch
  	gchar			*origin;
  	gchar			*origin_appstream;
  	gchar			*origin_hostname;
@@ -58,7 +72,11 @@ index 41fe8039..28ceb474 100644
  	gchar			*update_version;
  	gchar			*update_version_ui;
  	gchar			*update_details;
+<<<<<<< debian/patches/0014-Add-a-basic-permissions-system.patch
 @@ -448,6 +449,18 @@ gs_app_to_string_append (GsApp *app, GString *str)
+=======
+@@ -450,6 +451,18 @@ gs_app_to_string_append (GsApp *app, GString *str)
+>>>>>>> debian/patches/0014-Add-a-basic-permissions-system.patch
  			gs_app_kv_lpad (str, "icon-filename",
  					as_icon_get_filename (icon));
  	}
@@ -77,7 +95,11 @@ index 41fe8039..28ceb474 100644
  	if (priv->match_value != 0)
  		gs_app_kv_printf (str, "match-value", "%05x", priv->match_value);
  	if (priv->priority != 0)
+<<<<<<< debian/patches/0014-Add-a-basic-permissions-system.patch
 @@ -2599,6 +2612,46 @@ gs_app_set_origin_hostname (GsApp *app, const gchar *origin_hostname)
+=======
+@@ -2647,6 +2660,46 @@ gs_app_set_origin_hostname (GsApp *app, const gchar *origin_hostname)
+>>>>>>> debian/patches/0014-Add-a-basic-permissions-system.patch
  	priv->origin_hostname = g_strdup (origin_hostname);
  }
  
@@ -124,7 +146,11 @@ index 41fe8039..28ceb474 100644
  /**
   * gs_app_add_screenshot:
   * @app: a #GsApp
+<<<<<<< debian/patches/0014-Add-a-basic-permissions-system.patch
 @@ -4256,6 +4309,7 @@ gs_app_dispose (GObject *object)
+=======
+@@ -4327,6 +4380,7 @@ gs_app_dispose (GObject *object)
+>>>>>>> debian/patches/0014-Add-a-basic-permissions-system.patch
  	g_clear_pointer (&priv->icons, g_ptr_array_unref);
  	g_clear_pointer (&priv->channels, g_ptr_array_unref);
  	g_clear_object (&priv->active_channel);
@@ -132,7 +158,11 @@ index 41fe8039..28ceb474 100644
  
  	G_OBJECT_CLASS (gs_app_parent_class)->dispose (object);
  }
+<<<<<<< debian/patches/0014-Add-a-basic-permissions-system.patch
 @@ -4444,6 +4498,7 @@ gs_app_init (GsApp *app)
+=======
+@@ -4517,6 +4571,7 @@ gs_app_init (GsApp *app)
+>>>>>>> debian/patches/0014-Add-a-basic-permissions-system.patch
  	priv->provides = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
  	priv->icons = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
  	priv->channels = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
@@ -141,7 +171,11 @@ index 41fe8039..28ceb474 100644
  	                                        g_str_equal,
  	                                        g_free,
 diff --git a/lib/gs-app.h b/lib/gs-app.h
+<<<<<<< debian/patches/0014-Add-a-basic-permissions-system.patch
 index 225d8708..72636aa1 100644
+=======
+index 7f469fc0..72d723d7 100644
+>>>>>>> debian/patches/0014-Add-a-basic-permissions-system.patch
 --- a/lib/gs-app.h
 +++ b/lib/gs-app.h
 @@ -30,6 +30,7 @@
@@ -913,10 +947,17 @@ index ae5ad87b..ce019a47 100644
      'gs-plugin-event.c',
      'gs-plugin-job.c',
 diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c
+<<<<<<< debian/patches/0014-Add-a-basic-permissions-system.patch
 index 064443d1..bf5f42f3 100644
 --- a/plugins/snap/gs-plugin-snap.c
 +++ b/plugins/snap/gs-plugin-snap.c
 @@ -1062,6 +1062,170 @@ gs_plugin_refine_app (GsPlugin *plugin,
+=======
+index ad700be7..ecdfc48d 100644
+--- a/plugins/snap/gs-plugin-snap.c
++++ b/plugins/snap/gs-plugin-snap.c
+@@ -1044,6 +1044,170 @@ gs_plugin_refine_app (GsPlugin *plugin,
+>>>>>>> debian/patches/0014-Add-a-basic-permissions-system.patch
  	if (flags & GS_PLUGIN_REFINE_FLAGS_REQUIRE_ICON && gs_app_get_pixbuf (app) == NULL)
  		load_icon (plugin, client, app, gs_app_get_metadata_item (app, "snap::name"), local_snap, store_snap, cancellable);
  
@@ -1087,7 +1128,11 @@ index 064443d1..bf5f42f3 100644
  	return TRUE;
  }
  
+<<<<<<< debian/patches/0014-Add-a-basic-permissions-system.patch
 @@ -1273,6 +1437,55 @@ gs_plugin_app_remove (GsPlugin *plugin,
+=======
+@@ -1255,6 +1419,55 @@ gs_plugin_app_remove (GsPlugin *plugin,
+>>>>>>> debian/patches/0014-Add-a-basic-permissions-system.patch
  	return TRUE;
  }
  
@@ -1168,7 +1213,11 @@ index 5ce90429..b6c9916d 100644
    <file preprocess="xml-stripblanks">gs-prefs-dialog.ui</file>
    <file preprocess="xml-stripblanks">gs-removal-dialog.ui</file>
 diff --git a/src/gs-details-page.c b/src/gs-details-page.c
+<<<<<<< debian/patches/0014-Add-a-basic-permissions-system.patch
 index 3d57a8af..071f91e6 100644
+=======
+index 256881a9..8647bdfe 100644
+>>>>>>> debian/patches/0014-Add-a-basic-permissions-system.patch
 --- a/src/gs-details-page.c
 +++ b/src/gs-details-page.c
 @@ -39,6 +39,7 @@
@@ -1264,7 +1313,11 @@ index 3d57a8af..071f91e6 100644
  	gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, infobar_details_app_norepo);
  	gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, infobar_details_app_repo);
 diff --git a/src/gs-details-page.ui b/src/gs-details-page.ui
+<<<<<<< debian/patches/0014-Add-a-basic-permissions-system.patch
 index 154ce197..a3f2ccb5 100644
+=======
+index a9b1aad4..255617c4 100644
+>>>>>>> debian/patches/0014-Add-a-basic-permissions-system.patch
 --- a/src/gs-details-page.ui
 +++ b/src/gs-details-page.ui
 @@ -367,6 +367,22 @@
diff --git a/debian/patches/0020-Show-verified-developers.patch b/debian/patches/0020-Show-verified-developers.patch
new file mode 100644
index 0000000..582b49e
--- /dev/null
+++ b/debian/patches/0020-Show-verified-developers.patch
@@ -0,0 +1,217 @@
+From 4a94b04735a2ad8852a2a148e06a631f9aff334e Mon Sep 17 00:00:00 2001
+From: Robert Ancell <[email protected]>
+Date: Tue, 28 Aug 2018 12:15:09 +1200
+Subject: [PATCH 20/24] Show verified developers
+
+---
+ lib/gs-app.c                     | 17 +++++++++++++++++
+ lib/gs-app.h                     |  3 +++
+ meson.build                      |  2 +-
+ plugins/snap/gs-plugin-snap.c    |  8 +++++++-
+ src/developer-verified.svg       | 12 ++++++++++++
+ src/gnome-software.gresource.xml |  1 +
+ src/gs-details-page.c            |  3 +++
+ src/gs-details-page.ui           | 30 ++++++++++++++++++++++--------
+ 8 files changed, 66 insertions(+), 10 deletions(-)
+ create mode 100644 src/developer-verified.svg
+
+diff --git a/lib/gs-app.c b/lib/gs-app.c
+index c8c5876b..bc7d8d75 100644
+--- a/lib/gs-app.c
++++ b/lib/gs-app.c
+@@ -133,6 +133,7 @@ typedef struct
+ 	GsChannel		*active_channel;
+ 	GCancellable		*cancellable;
+ 	GsPluginAction		 pending_action;
++	gboolean		 developer_is_verified;
+ } GsAppPrivate;
+ 
+ enum {
+@@ -1657,6 +1658,22 @@ gs_app_set_developer_name (GsApp *app, const gchar *developer_name)
+ 	_g_set_str (&priv->developer_name, developer_name);
+ }
+ 
++gboolean
++gs_app_get_developer_is_verified (GsApp *app)
++{
++	GsAppPrivate *priv = gs_app_get_instance_private (app);
++	g_return_val_if_fail (GS_IS_APP (app), FALSE);
++	return priv->developer_is_verified;
++}
++
++void
++gs_app_set_developer_is_verified (GsApp *app, gboolean developer_is_verified)
++{
++	GsAppPrivate *priv = gs_app_get_instance_private (app);
++	g_return_if_fail (GS_IS_APP (app));
++	priv->developer_is_verified = developer_is_verified;
++}
++
+ /**
+  * gs_app_get_pixbuf:
+  * @app: a #GsApp
+diff --git a/lib/gs-app.h b/lib/gs-app.h
+index 72d723d7..ffccf5db 100644
+--- a/lib/gs-app.h
++++ b/lib/gs-app.h
+@@ -168,6 +168,9 @@ void		 gs_app_set_project_group	(GsApp		*app,
+ const gchar	*gs_app_get_developer_name	(GsApp		*app);
+ void		 gs_app_set_developer_name	(GsApp		*app,
+ 						 const gchar	*developer_name);
++gboolean	 gs_app_get_developer_is_verified	(GsApp		*app);
++void		 gs_app_set_developer_is_verified	(GsApp		*app,
++							 gboolean	 developer_is_verified);
+ const gchar	*gs_app_get_version		(GsApp		*app);
+ const gchar	*gs_app_get_version_ui		(GsApp		*app);
+ void		 gs_app_set_version		(GsApp		*app,
+diff --git a/meson.build b/meson.build
+index 3b2f726e..20fdd31a 100644
+--- a/meson.build
++++ b/meson.build
+@@ -166,7 +166,7 @@ if get_option('enable-gudev')
+ endif
+ 
+ if get_option('enable-snap')
+-  snap = dependency('snapd-glib', version : '>= 1.31')
++  snap = dependency('snapd-glib', version : '>= 1.42')
+ endif
+ 
+ gnome = import('gnome')
+diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c
+index 405ec8e1..fadb7866 100644
+--- a/plugins/snap/gs-plugin-snap.c
++++ b/plugins/snap/gs-plugin-snap.c
+@@ -934,6 +934,7 @@ gs_plugin_refine_app (GsPlugin *plugin,
+ 	g_autoptr(SnapdSnap) local_snap = NULL;
+ 	g_autoptr(SnapdSnap) store_snap = NULL;
+ 	SnapdSnap *snap;
++	const gchar *developer_name;
+ 	g_autofree gchar *description = NULL;
+ 
+ 	/* not us */
+@@ -1013,7 +1014,12 @@ gs_plugin_refine_app (GsPlugin *plugin,
+ 	if (description != NULL)
+ 		gs_app_set_description (app, GS_APP_QUALITY_NORMAL, description);
+ 	gs_app_set_license (app, GS_APP_QUALITY_NORMAL, snapd_snap_get_license (snap));
+-	gs_app_set_developer_name (app, snapd_snap_get_developer (snap));
++	developer_name = snapd_snap_get_publisher_display_name (snap);
++	if (developer_name == NULL)
++		developer_name = snapd_snap_get_publisher_username (snap);
++	gs_app_set_developer_name (app, developer_name);
++	if (snapd_snap_get_publisher_validation (snap) == SNAPD_PUBLISHER_VALIDATION_VERIFIED)
++		gs_app_set_developer_is_verified (app, TRUE);
+ 
+ 	snap = local_snap != NULL ? local_snap : store_snap;
+ 	gs_app_set_version (app, snapd_snap_get_version (snap));
+diff --git a/src/developer-verified.svg b/src/developer-verified.svg
+new file mode 100644
+index 00000000..57c0f11b
+--- /dev/null
++++ b/src/developer-verified.svg
+@@ -0,0 +1,12 @@
++<?xml version="1.0" encoding="UTF-8" standalone="no"?>
++<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 -->
++ <title>path6490</title>
++ <desc>Created with Sketch.</desc>
++ <g id="misc" fill-rule="evenodd" fill="none">
++  <g id="Artboard" fill-rule="nonzero" fill="#82BEA0" transform="translate(-419 -444)">
++   <g id="VALIDATED--SNAPCRAFTER-ICON" transform="translate(419 444)">
++    <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"/>
++   </g>
++  </g>
++ </g>
++</svg>
+\ No newline at end of file
+diff --git a/src/gnome-software.gresource.xml b/src/gnome-software.gresource.xml
+index 44e5a28a..46022303 100644
+--- a/src/gnome-software.gresource.xml
++++ b/src/gnome-software.gresource.xml
+@@ -38,5 +38,6 @@
+   <file preprocess="xml-stripblanks">org.freedesktop.PackageKit.xml</file>
+   <file>gtk-style.css</file>
+   <file>gtk-style-hc.css</file>
++  <file>developer-verified.svg</file>
+  </gresource>
+ </gresources>
+diff --git a/src/gs-details-page.c b/src/gs-details-page.c
+index 8647bdfe..16677d2a 100644
+--- a/src/gs-details-page.c
++++ b/src/gs-details-page.c
+@@ -101,6 +101,7 @@ struct _GsDetailsPage
+ 	GtkWidget		*label_details_category_value;
+ 	GtkWidget		*label_details_developer_title;
+ 	GtkWidget		*label_details_developer_value;
++	GtkWidget		*image_details_developer_verified;
+ 	GtkWidget		*button_details_license_free;
+ 	GtkWidget		*button_details_license_nonfree;
+ 	GtkWidget		*button_details_license_unknown;
+@@ -963,6 +964,7 @@ gs_details_page_refresh_all (GsDetailsPage *self)
+ 		gtk_label_set_label (GTK_LABEL (self->label_details_developer_value), tmp);
+ 		gtk_widget_set_visible (self->label_details_developer_value, TRUE);
+ 	}
++	gtk_widget_set_visible (self->image_details_developer_verified, gs_app_get_developer_is_verified (self->app));
+ 
+ 	/* set the license buttons */
+ 	tmp = gs_app_get_license (self->app);
+@@ -2702,6 +2704,7 @@ gs_details_page_class_init (GsDetailsPageClass *klass)
+ 	gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_details_category_value);
+ 	gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_details_developer_title);
+ 	gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_details_developer_value);
++	gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, image_details_developer_verified);
+ 	gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, button_details_license_free);
+ 	gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, button_details_license_nonfree);
+ 	gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, button_details_license_unknown);
+diff --git a/src/gs-details-page.ui b/src/gs-details-page.ui
+index 255617c4..bc03b421 100644
+--- a/src/gs-details-page.ui
++++ b/src/gs-details-page.ui
+@@ -1133,16 +1133,30 @@
+                                   </packing>
+                                 </child>
+                                 <child>
+-                                  <object class="GtkLabel" id="label_details_developer_value">
++                                  <object class="GtkBox" id="box_details_developer">
+                                     <property name="visible">True</property>
+                                     <property name="can_focus">False</property>
+                                     <property name="hexpand">True</property>
+-                                    <property name="label">Yorba</property>
+-                                    <property name="wrap">True</property>
+-                                    <property name="selectable">True</property>
+-                                    <property name="max_width_chars">10</property>
+-                                    <property name="xalign">0</property>
+-                                    <property name="yalign">0.5</property>
++                                    <property name="spacing">3</property>
++                                    <child>
++                                      <object class="GtkLabel" id="label_details_developer_value">
++                                        <property name="visible">True</property>
++                                        <property name="can_focus">False</property>
++                                        <property name="label">Yorba</property>
++                                        <property name="selectable">True</property>
++                                        <property name="max_width_chars">10</property>
++                                        <property name="xalign">0</property>
++                                        <property name="yalign">0.5</property>
++                                      </object>
++                                    </child>
++                                    <child>
++                                      <object class="GtkImage" id="image_details_developer_verified">
++                                        <property name="visible">True</property>
++                                        <property name="can_focus">False</property>
++                                        <property name="pixel_size">16</property>
++                                        <property name="resource">/org/gnome/Software/developer-verified.svg</property>
++                                      </object>
++                                    </child>
+                                   </object>
+                                   <packing>
+                                     <property name="left_attach">1</property>
+@@ -1455,7 +1469,7 @@
+       <widget name="label_details_category_value"/>
+       <widget name="label_details_size_installed_value"/>
+       <widget name="label_details_size_download_value"/>
+-      <widget name="label_details_developer_value"/>
++      <widget name="box_details_developer"/>
+       <widget name="button_details_license_free"/>
+     </widgets>
+   </object>
+-- 
+2.17.1
+
diff --git a/debian/patches/0021-snap-Use-wide-scope-when-searching.patch b/debian/patches/0021-snap-Use-wide-scope-when-searching.patch
new file mode 100644
index 0000000..221f8fe
--- /dev/null
+++ b/debian/patches/0021-snap-Use-wide-scope-when-searching.patch
@@ -0,0 +1,70 @@
+From 0c6077b03a2d31eaecc1ea8968ec395270585c9c Mon Sep 17 00:00:00 2001
+From: Robert Ancell <[email protected]>
+Date: Tue, 7 Aug 2018 16:49:35 +1200
+Subject: [PATCH 21/24] snap: Use wide scope when searching
+
+---
+ plugins/snap/gs-plugin-snap.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c
+index 509f7d0a..57fc7fa7 100644
+--- a/plugins/snap/gs-plugin-snap.c
++++ b/plugins/snap/gs-plugin-snap.c
+@@ -385,7 +385,7 @@ gs_plugin_url_to_app (GsPlugin *plugin,
+ 
+ 	/* create app */
+ 	path = gs_utils_get_url_path (url);
+-	snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_MATCH_NAME, NULL, path, cancellable, NULL);
++	snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_SCOPE_WIDE | SNAPD_FIND_FLAGS_MATCH_NAME, NULL, path, cancellable, NULL);
+ 	if (snaps == NULL || snaps->len < 1)
+ 		return TRUE;
+ 
+@@ -451,7 +451,7 @@ gs_plugin_add_featured (GsPlugin *plugin,
+ 	g_autoptr(GString) background_css = NULL;
+ 	g_autofree gchar *css = NULL;
+ 
+-	snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_NONE, "featured", NULL, cancellable, error);
++	snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_SCOPE_WIDE, "featured", NULL, cancellable, error);
+ 
+ 	if (snaps == NULL)
+ 		return FALSE;
+@@ -520,7 +520,7 @@ gs_plugin_add_popular (GsPlugin *plugin,
+ 	g_autoptr(GPtrArray) snaps = NULL;
+ 	guint i;
+ 
+-	snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_NONE, "featured", NULL, cancellable, error);
++	snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_SCOPE_WIDE, "featured", NULL, cancellable, error);
+ 	if (snaps == NULL)
+ 		return FALSE;
+ 
+@@ -578,7 +578,7 @@ gs_plugin_add_category_apps (GsPlugin *plugin,
+ 			g_autoptr(GPtrArray) snaps = NULL;
+ 			guint j;
+ 
+-			snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_NONE, tokens[i], NULL, cancellable, error);
++			snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_SCOPE_WIDE, tokens[i], NULL, cancellable, error);
+ 			if (snaps == NULL)
+ 				return FALSE;
+ 			for (j = 0; j < snaps->len; j++) {
+@@ -636,7 +636,7 @@ gs_plugin_add_search (GsPlugin *plugin,
+ 	guint i;
+ 
+ 	query = g_strjoinv (" ", values);
+-	snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_NONE, NULL, query, cancellable, error);
++	snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_SCOPE_WIDE, NULL, query, cancellable, error);
+ 	if (snaps == NULL)
+ 		return FALSE;
+ 
+@@ -659,7 +659,7 @@ get_store_snap (GsPlugin *plugin, const gchar *name, gboolean need_details, GCan
+ 	if (snap != NULL)
+ 		return g_object_ref (snap);
+ 
+-	snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_MATCH_NAME, NULL, name, cancellable, error);
++	snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_SCOPE_WIDE | SNAPD_FIND_FLAGS_MATCH_NAME, NULL, name, cancellable, error);
+ 	if (snaps == NULL || snaps->len < 1)
+ 		return NULL;
+ 
+-- 
+2.17.1
+
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
new 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 @@
+From 7932bac03d7d47011ee170dc2b31e9de1512812c Mon Sep 17 00:00:00 2001
+From: Jean-Baptiste Lallement <[email protected]>
+Date: Mon, 25 Jun 2018 16:14:38 +1200
+Subject: [PATCH 22/25] Delay startup of GNOME Software to allow the Shell to
+ load first.
+
+---
+ src/gnome-software-service.desktop.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/gnome-software-service.desktop.in b/src/gnome-software-service.desktop.in
+index dc4d4d90..fb47759b 100644
+--- a/src/gnome-software-service.desktop.in
++++ b/src/gnome-software-service.desktop.in
+@@ -1,6 +1,7 @@
+ [Desktop Entry]
+ Type=Application
+ Name=GNOME Software
++X-GNOME-Autostart-Delay=60
+ Exec=@bindir@/gnome-software --gapplication-service
+ OnlyShowIn=GNOME;Unity;
+ NoDisplay=true
+-- 
+2.17.1
+
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
new 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 @@
+From 3b71756838799497639163a637ef7120a756277e Mon Sep 17 00:00:00 2001
+From: Joaquim Rocha <[email protected]>
+Date: Wed, 23 May 2018 13:17:37 +0200
+Subject: [PATCH 23/28] Revert "Revert "flatpak: Use "list of related apps for
+ install" when updating an app""
+
+This reverts commit 79c14a2c67ec1ac459ace6c2e08dce74f78a9e16 and brings
+back the ae5c13cc39eae89ab261bab44ea2fd0fc941f9d5 and
+eb68607baea3b83b719acb739516b361a6758bcf.
+
+The mentioned functionality had been reverted in order for the release
+3.28 but it's necessary for getting the related apps when updating apps.
+---
+ plugins/flatpak/gs-flatpak.c | 53 +++++++++++++++++++++++++++---------
+ 1 file changed, 40 insertions(+), 13 deletions(-)
+
+diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
+index 6a424ed8..8f57eda6 100644
+--- a/plugins/flatpak/gs-flatpak.c
++++ b/plugins/flatpak/gs-flatpak.c
+@@ -2587,8 +2587,11 @@ gs_flatpak_refine_runtime_for_install (GsFlatpak *self,
+ }
+ 
+ static GsAppList *
+-gs_flatpak_get_list_for_install (GsFlatpak *self, GsApp *app,
+-				 GCancellable *cancellable, GError **error)
++gs_flatpak_get_list_for_install_or_update (GsFlatpak *self,
++					   GsApp *app,
++					   gboolean is_update,
++					   GCancellable *cancellable,
++					   GError **error)
+ {
+ 	GsApp *runtime;
+ 	g_autofree gchar *ref = NULL;
+@@ -2596,6 +2599,7 @@ gs_flatpak_get_list_for_install (GsFlatpak *self, GsApp *app,
+ 	g_autoptr(GPtrArray) xrefs_installed = NULL;
+ 	g_autoptr(GHashTable) hash_installed = NULL;
+ 	g_autoptr(GsAppList) list = gs_app_list_new ();
++	g_autofree gchar *app_ref = NULL;
+ 
+ 	/* get the list of installed apps */
+ 	xrefs_installed = flatpak_installation_list_installed_refs (self->installation,
+@@ -2658,26 +2662,49 @@ gs_flatpak_get_list_for_install (GsFlatpak *self, GsApp *app,
+ 		/* already installed? */
+ 		app_tmp = gs_flatpak_create_app (self, FLATPAK_REF (xref_related));
+ 		ref_display = gs_flatpak_app_get_ref_display (app_tmp);
+-		if (g_hash_table_contains (hash_installed, ref_display)) {
++		if (!is_update && g_hash_table_contains (hash_installed, ref_display)) {
+ 			g_debug ("not adding related %s as already installed", ref_display);
+-		} else {
+-			gs_app_set_origin (app_tmp, gs_app_get_origin (app));
+-			g_debug ("adding related %s for install", ref_display);
+-
+-			if (!gs_plugin_refine_item_state (self, app_tmp, cancellable, error))
+-				return NULL;
++			continue;
++		}
+ 
+-			gs_app_list_add (list, app_tmp);
++		gs_app_set_origin (app_tmp, gs_app_get_origin (app));
++		if (!gs_plugin_refine_item_state (self, app_tmp, cancellable, error))
++			return FALSE;
++		if (is_update && !gs_app_is_updatable (app_tmp)) {
++			g_debug ("not adding related %s as it's not updatable", ref_display);
++			continue;
+ 		}
++		g_debug ("adding related %s for install/update", ref_display);
++		gs_app_list_add (list, app_tmp);
+ 	}
+ 
+-	/* add the original app last unless it's a proxy app */
+-	if (!gs_app_has_quirk (app, AS_APP_QUIRK_IS_PROXY))
++	/* add the original app last unless it's already installed or is a proxy app */
++	app_ref = gs_flatpak_app_get_ref_display (app);
++	if (!gs_app_has_quirk (app, AS_APP_QUIRK_IS_PROXY) &&
++	    !g_hash_table_contains (hash_installed, app_ref))
+ 		gs_app_list_add (list, app);
+ 
+ 	return g_steal_pointer (&list);
+ }
+ 
++static GsAppList *
++gs_flatpak_get_list_for_install (GsFlatpak *self,
++				 GsApp *app,
++				 GCancellable *cancellable,
++				 GError **error)
++{
++	return gs_flatpak_get_list_for_install_or_update (self, app, FALSE, cancellable, error);
++}
++
++static GsAppList *
++gs_flatpak_get_list_for_update (GsFlatpak *self,
++				GsApp *app,
++				GCancellable *cancellable,
++				GError **error)
++{
++	return gs_flatpak_get_list_for_install_or_update (self, app, TRUE, cancellable, error);
++}
++
+ gboolean
+ gs_flatpak_app_remove (GsFlatpak *self,
+ 		       GsApp *app,
+@@ -3065,7 +3092,7 @@ gs_flatpak_update_app (GsFlatpak *self,
+ 	}
+ 
+ 	/* get the list of apps to process */
+-	list = gs_flatpak_get_list_for_install (self, app, cancellable, error);
++	list = gs_flatpak_get_list_for_update (self, app, cancellable, error);
+ 	if (list == NULL) {
+ 		g_prefix_error (error, "failed to get related refs: ");
+ 		gs_app_set_state_recover (app);
+-- 
+2.19.1
+
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
new 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 @@
+From 54e1bbc547a52485cec6d2de32ff02205e9c5917 Mon Sep 17 00:00:00 2001
+From: Joaquim Rocha <[email protected]>
+Date: Wed, 13 Dec 2017 00:48:13 +0000
+Subject: [PATCH 24/28] flatpak: Check if a related app is installed even when
+ dealing with updates
+
+When dealing with updates, gs-flatpak gets the list of related apps
+(usually runtime extensions) that should be updated together with the
+main app. However, if one of those related apps is not installed, the
+gs_app_is_updatable call will return FALSE and the app will not be
+installed.
+This is a problem when e.g. a runtime extension has been mistakenly
+removed, or when an app is updated and needs a new runtime extension.
+
+This patch simply adds a further test for whether the app is installed,
+together with the logic mentioned above.
+---
+ plugins/flatpak/gs-flatpak.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
+index 8f57eda6..d8781206 100644
+--- a/plugins/flatpak/gs-flatpak.c
++++ b/plugins/flatpak/gs-flatpak.c
+@@ -2670,7 +2670,8 @@ gs_flatpak_get_list_for_install_or_update (GsFlatpak *self,
+ 		gs_app_set_origin (app_tmp, gs_app_get_origin (app));
+ 		if (!gs_plugin_refine_item_state (self, app_tmp, cancellable, error))
+ 			return FALSE;
+-		if (is_update && !gs_app_is_updatable (app_tmp)) {
++		if (gs_app_is_installed (app_tmp) && is_update &&
++		    !gs_app_is_updatable (app_tmp)) {
+ 			g_debug ("not adding related %s as it's not updatable", ref_display);
+ 			continue;
+ 		}
+-- 
+2.19.1
+
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
new 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 @@
+From 04977409f7f5179f7ce17ab894fd51e3c539f4d6 Mon Sep 17 00:00:00 2001
+From: Joaquim Rocha <[email protected]>
+Date: Wed, 23 May 2018 13:02:20 +0200
+Subject: [PATCH 25/28] flatpak: Include related refs to the app's runtime on
+ install/update
+
+When installing/updating an app, if its related refs and its runtime
+need to be installed as well, then they do. However, refs that are
+related to the runtime itself do not get installed, and this is a
+problem because some apps may need them (besides being a discrepancy
+between using the Flatpak CLI and GNOME Software for installing Flatpak
+apps).
+
+Thus, these changes add any refs related to an app's runtime to the
+list of refs that should be installed when installing or updating an
+app. Note that it deliberately doesn't update refs related to the
+runtime though, just as it doesn't update the runtime when updating an
+app. Thus, refs that are related to the runtime get updated together
+with it.
+---
+ plugins/flatpak/gs-flatpak.c | 124 +++++++++++++++++++++++++----------
+ 1 file changed, 88 insertions(+), 36 deletions(-)
+
+diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
+index d8781206..a820918c 100644
+--- a/plugins/flatpak/gs-flatpak.c
++++ b/plugins/flatpak/gs-flatpak.c
+@@ -2586,6 +2586,68 @@ gs_flatpak_refine_runtime_for_install (GsFlatpak *self,
+ 	return TRUE;
+ }
+ 
++static GPtrArray *
++gs_flatpak_get_app_remote_related_refs (GsFlatpak *self,
++					GsApp *app,
++					GCancellable *cancellable,
++					GError **error)
++{
++	g_autofree gchar *ref = NULL;
++
++	/* lookup any related refs for this ref */
++	ref = g_strdup_printf ("%s/%s/%s/%s",
++			       gs_flatpak_app_get_ref_kind_as_str (app),
++			       gs_flatpak_app_get_ref_name (app),
++			       gs_flatpak_app_get_ref_arch (app),
++			       gs_flatpak_app_get_ref_branch (app));
++	return flatpak_installation_list_remote_related_refs_sync (self->installation,
++								   gs_app_get_origin (app),
++								   ref, cancellable, error);
++}
++
++static gboolean
++gs_flatpak_add_related_refs_to_list (GsFlatpak *self,
++				     GsApp *app,
++				     GPtrArray *related_refs,
++				     GHashTable *hash_installed,
++				     gboolean is_update,
++				     GsAppList *list,
++				     GCancellable *cancellable,
++				     GError **error)
++{
++	for (guint i = 0; i < related_refs->len; i++) {
++		FlatpakRelatedRef *xref_related = g_ptr_array_index (related_refs, i);
++		g_autofree gchar *ref_display = NULL;
++		g_autoptr(GsApp) app_tmp = NULL;
++
++		/* not included */
++		if (!gs_flatpak_related_should_download (self, app, xref_related))
++			continue;
++
++		/* already installed? */
++		app_tmp = gs_flatpak_create_app (self, FLATPAK_REF (xref_related));
++		ref_display = gs_flatpak_app_get_ref_display (app_tmp);
++		if (!is_update && g_hash_table_contains (hash_installed, ref_display)) {
++			g_debug ("not adding related %s as already installed", ref_display);
++			continue;
++		}
++
++		if (gs_app_get_origin (app_tmp) == NULL)
++			gs_app_set_origin (app_tmp, gs_app_get_origin (app));
++
++		if (!gs_plugin_refine_item_state (self, app_tmp, cancellable, error))
++			return FALSE;
++		if (gs_app_is_installed (app_tmp) && is_update &&
++		    !gs_app_is_updatable (app_tmp)) {
++			g_debug ("not adding related %s as it's not updatable", ref_display);
++			continue;
++		}
++		g_debug ("adding related %s for install/update", ref_display);
++		gs_app_list_add (list, app_tmp);
++	}
++	return TRUE;
++}
++
+ static GsAppList *
+ gs_flatpak_get_list_for_install_or_update (GsFlatpak *self,
+ 					   GsApp *app,
+@@ -2596,6 +2658,7 @@ gs_flatpak_get_list_for_install_or_update (GsFlatpak *self,
+ 	GsApp *runtime;
+ 	g_autofree gchar *ref = NULL;
+ 	g_autoptr(GPtrArray) related = NULL;
++	g_autoptr(GPtrArray) runtime_related = NULL;
+ 	g_autoptr(GPtrArray) xrefs_installed = NULL;
+ 	g_autoptr(GHashTable) hash_installed = NULL;
+ 	g_autoptr(GsAppList) list = gs_app_list_new ();
+@@ -2621,6 +2684,7 @@ gs_flatpak_get_list_for_install_or_update (GsFlatpak *self,
+ 		return NULL;
+ 	runtime = gs_app_get_update_runtime (app);
+ 	if (runtime != NULL) {
++		g_autoptr(GError) local_error = NULL;
+ 		g_autofree gchar *ref_display = NULL;
+ 		ref_display = gs_flatpak_app_get_ref_display (runtime);
+ 		if (g_hash_table_contains (hash_installed, ref_display)) {
+@@ -2632,52 +2696,40 @@ gs_flatpak_get_list_for_install_or_update (GsFlatpak *self,
+ 				 gs_flatpak_app_get_ref_branch (runtime));
+ 			gs_app_list_add (list, runtime);
+ 		}
++
++		/* add refs related to the runtime */
++		runtime_related = gs_flatpak_get_app_remote_related_refs (self, runtime,
++									  cancellable,
++									  &local_error);
++		if (runtime_related == NULL)
++			g_debug ("Failed to get related refs for runtime %s when "
++				 "installing/updating %s: %s; continuing nonetheless...",
++				 gs_app_get_unique_id (runtime),
++				 gs_app_get_unique_id (app),
++				 local_error->message);
+ 	}
+ 
+ 	/* lookup any related refs for this ref */
+-	ref = g_strdup_printf ("%s/%s/%s/%s",
+-			       gs_flatpak_app_get_ref_kind_as_str (app),
+-			       gs_flatpak_app_get_ref_name (app),
+-			       gs_flatpak_app_get_ref_arch (app),
+-			       gs_flatpak_app_get_ref_branch (app));
+-	related = flatpak_installation_list_remote_related_refs_sync (self->installation,
+-								      gs_app_get_origin (app),
+-								      ref, cancellable, error);
++	related = gs_flatpak_get_app_remote_related_refs (self, app, cancellable, error);
+ 	if (related == NULL) {
+ 		g_prefix_error (error, "using origin %s: ", gs_app_get_origin (app));
+ 		gs_flatpak_error_convert (error);
+ 		return NULL;
+ 	}
+ 
+-	/* any extra bits */
+-	for (guint i = 0; i < related->len; i++) {
+-		FlatpakRelatedRef *xref_related = g_ptr_array_index (related, i);
+-		g_autofree gchar *ref_display = NULL;
+-		g_autoptr(GsApp) app_tmp = NULL;
+-
+-		/* not included */
+-		if (!gs_flatpak_related_should_download (self, app, xref_related))
+-			continue;
+-
+-		/* already installed? */
+-		app_tmp = gs_flatpak_create_app (self, FLATPAK_REF (xref_related));
+-		ref_display = gs_flatpak_app_get_ref_display (app_tmp);
+-		if (!is_update && g_hash_table_contains (hash_installed, ref_display)) {
+-			g_debug ("not adding related %s as already installed", ref_display);
+-			continue;
+-		}
++	/* add refs related to the app */
++	if (!gs_flatpak_add_related_refs_to_list (self, app, related, hash_installed,
++						  is_update, list, cancellable, error))
++		return FALSE;
+ 
+-		gs_app_set_origin (app_tmp, gs_app_get_origin (app));
+-		if (!gs_plugin_refine_item_state (self, app_tmp, cancellable, error))
+-			return FALSE;
+-		if (gs_app_is_installed (app_tmp) && is_update &&
+-		    !gs_app_is_updatable (app_tmp)) {
+-			g_debug ("not adding related %s as it's not updatable", ref_display);
+-			continue;
+-		}
+-		g_debug ("adding related %s for install/update", ref_display);
+-		gs_app_list_add (list, app_tmp);
+-	}
++	/* add refs related to the runtime; however, we're only adding them if they
++	 * need to be installed, as their update should be performed together with
++	 * the runtime instead */
++	if (runtime_related != NULL &&
++	    !gs_flatpak_add_related_refs_to_list (self, runtime, runtime_related,
++						  hash_installed, FALSE, list,
++						  cancellable, error))
++		return FALSE;
+ 
+ 	/* add the original app last unless it's already installed or is a proxy app */
+ 	app_ref = gs_flatpak_app_get_ref_display (app);
+-- 
+2.19.1
+
diff --git a/debian/patches/0026-shell-search-provider-implement-XUbuntuCancel.patch b/debian/patches/0026-shell-search-provider-implement-XUbuntuCancel.patch
new file mode 100644
index 0000000..f914b22
--- /dev/null
+++ b/debian/patches/0026-shell-search-provider-implement-XUbuntuCancel.patch
@@ -0,0 +1,176 @@
+From 2ac5ea28829ecaff2f8a180f2ef7eefbb07602d9 Mon Sep 17 00:00:00 2001
+From: Andrea Azzarone <[email protected]>
+Date: Fri, 7 Sep 2018 19:58:00 +0200
+Subject: [PATCH 24/26] shell-search-provider: implement XUbuntuCancel
+
+Implement XUbuntuCancel to request search cancellation. This is used by
+gnome-shell to cancel the current search e.g. if the search overview is
+closed.
+---
+ src/gs-shell-search-provider.c                | 74 +++++++++++++++----
+ src/shell-search-provider-dbus-interfaces.xml |  1 +
+ 2 files changed, 60 insertions(+), 15 deletions(-)
+
+diff --git a/src/gs-shell-search-provider.c b/src/gs-shell-search-provider.c
+index c01d72cb..8c1e0fda 100644
+--- a/src/gs-shell-search-provider.c
++++ b/src/gs-shell-search-provider.c
+@@ -45,6 +45,8 @@ struct _GsShellSearchProvider {
+ 	GsPluginLoader *plugin_loader;
+ 	GCancellable *cancellable;
+ 
++	PendingSearch *current_search;
++
+ 	GHashTable *metas_cache;
+ 	GsAppList *search_results;
+ };
+@@ -58,6 +60,17 @@ pending_search_free (PendingSearch *search)
+ 	g_slice_free (PendingSearch, search);
+ }
+ 
++static void
++cancel_current_search (GsShellSearchProvider *self)
++{
++	g_debug ("*** Cancel current search");
++
++	if (self->cancellable != NULL) {
++		g_cancellable_cancel (self->cancellable);
++		g_clear_object (&self->cancellable);
++	}
++}
++
+ static gint
+ search_sort_by_kudo_cb (GsApp *app1, GsApp *app2, gpointer user_data)
+ {
+@@ -71,6 +84,23 @@ search_sort_by_kudo_cb (GsApp *app1, GsApp *app2, gpointer user_data)
+ 	return 0;
+ }
+ 
++static void
++pending_search_finish (PendingSearch         *search,
++		       GDBusMethodInvocation *invocation,
++		       GVariant              *result)
++{
++	GsShellSearchProvider *self = search->provider;
++
++	g_dbus_method_invocation_return_value (invocation, result);
++
++	if (search == self->current_search) {
++		self->current_search = NULL;
++	}
++
++	pending_search_free (search);
++	g_application_release (g_application_get_default ());
++}
++
+ static void
+ search_done_cb (GObject *source,
+ 		GAsyncResult *res,
+@@ -87,10 +117,9 @@ search_done_cb (GObject *source,
+ 
+ 	list = gs_plugin_loader_job_process_finish (self->plugin_loader, res, NULL);
+ 	if (list == NULL) {
+-		g_dbus_method_invocation_return_value (search->invocation, g_variant_new ("(as)", NULL));
+-		pending_search_free (search);
+-		g_application_release (g_application_get_default ());
+-		return;	
++		pending_search_finish (search, search->invocation,
++				       g_variant_new ("(as)", NULL));
++		return;
+ 	}
+ 
+ 	/* sort by kudos, as there is no ratings data by default */
+@@ -106,10 +135,8 @@ search_done_cb (GObject *source,
+ 		/* cache this in case we need the app in GetResultMetas */
+ 		gs_app_list_add (self->search_results, app);
+ 	}
+-	g_dbus_method_invocation_return_value (search->invocation, g_variant_new ("(as)", &builder));
+ 
+-	pending_search_free (search);
+-	g_application_release (g_application_get_default ());
++	pending_search_finish (search, search->invocation, g_variant_new ("(as)", &builder));
+ }
+ 
+ static gchar *
+@@ -167,10 +194,7 @@ execute_search (GsShellSearchProvider  *self,
+ 
+ 	value = g_strjoinv (" ", terms);
+ 
+-	if (self->cancellable != NULL) {
+-		g_cancellable_cancel (self->cancellable);
+-		g_clear_object (&self->cancellable);
+-	}
++	cancel_current_search (self);
+ 
+ 	/* don't attempt searches for a single character */
+ 	if (g_strv_length (terms) == 1 &&
+@@ -183,6 +207,7 @@ execute_search (GsShellSearchProvider  *self,
+ 	pending_search->provider = self;
+ 	pending_search->invocation = g_object_ref (invocation);
+ 
++	self->current_search = pending_search;
+ 	g_application_hold (g_application_get_default ());
+ 	self->cancellable = g_cancellable_new ();
+ 
+@@ -334,6 +359,26 @@ handle_launch_search (GsShellSearchProvider2 	   *skeleton,
+ 	return TRUE;
+ }
+ 
++static gboolean
++handle_xubuntu_cancel (GsShellSearchProvider2 *skeleton,
++		       GDBusMethodInvocation  *invocation,
++		       gpointer                user_data)
++{
++	GsShellSearchProvider *self = GS_SHELL_SEARCH_PROVIDER (user_data);
++
++	g_debug ("*** XUbuntuCancel called");
++
++	if (self->current_search != NULL &&
++	    g_strcmp0 (g_dbus_method_invocation_get_sender (self->current_search->invocation),
++		       g_dbus_method_invocation_get_sender (invocation)) == 0) {
++		cancel_current_search (self);
++	}
++
++	gs_shell_search_provider2_complete_xubuntu_cancel (skeleton, invocation);
++
++	return TRUE;
++}
++
+ gboolean
+ gs_shell_search_provider_register (GsShellSearchProvider *self,
+                                    GDBusConnection       *connection,
+@@ -355,10 +400,7 @@ search_provider_dispose (GObject *obj)
+ {
+ 	GsShellSearchProvider *self = GS_SHELL_SEARCH_PROVIDER (obj);
+ 
+-	if (self->cancellable != NULL) {
+-		g_cancellable_cancel (self->cancellable);
+-		g_clear_object (&self->cancellable);
+-	}
++	cancel_current_search (self);
+ 
+ 	if (self->metas_cache != NULL) {
+ 		g_hash_table_destroy (self->metas_cache);
+@@ -393,6 +435,8 @@ gs_shell_search_provider_init (GsShellSearchProvider *self)
+ 			G_CALLBACK (handle_activate_result), self);
+ 	g_signal_connect (self->skeleton, "handle-launch-search",
+ 			G_CALLBACK (handle_launch_search), self);
++	g_signal_connect (self->skeleton, "handle-xubuntu-cancel",
++			G_CALLBACK (handle_xubuntu_cancel), self);
+ }
+ 
+ static void
+diff --git a/src/shell-search-provider-dbus-interfaces.xml b/src/shell-search-provider-dbus-interfaces.xml
+index f6840e2c..4529c1e8 100644
+--- a/src/shell-search-provider-dbus-interfaces.xml
++++ b/src/shell-search-provider-dbus-interfaces.xml
+@@ -40,5 +40,6 @@
+       <arg type='as' name='Terms' direction='in' />
+       <arg type='u' name='Timestamp' direction='in' />
+     </method>
++    <method name = 'XUbuntuCancel' />
+   </interface>
+ </node>
+-- 
+2.17.1
+
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 @@
 # Patches from upstream
+<<<<<<< debian/patches/series
 0001-details-page-Add-support-for-verified-developers.patch
 0002-snap-Set-verified-developer-flag.patch
 0001-lib-Allow-opening-CAB-files-that-resolve-more-than-o.patch
 0001-Use-correct-boolean-type-for-GsPluginJob-interactive.patch
 0001-Revert-ef15f51d.patch
+=======
+0001-snap-Scale-embedded-snap-icons-to-64x64.patch
+0001-snap-Only-load-icons-once.patch
+0001-Fix-gs_app_set_state_recover-not-working-during-purc.patch
+0001-snap-plugin-segfault.patch
+0001-Set-reboot-notifications-as-urgent-to-avoid-them-tim.patch
+0001-lib-Allow-opening-CAB-files-that-resolve-more-than-o.patch
+>>>>>>> debian/patches/series
 
 # Patches from the ubuntu* branch
 0001-Construct-the-Software-Sources-menu-item-dynamically.patch
@@ -20,6 +29,7 @@
 0012-Don-t-use-colour-to-differentiate-between-free-and-p.patch
 0013-overview-page-Rotate-featured-apps.patch
 0014-Add-a-basic-permissions-system.patch
+<<<<<<< debian/patches/series
 0015-build-Translate-Ubuntu-s-.desktop-file.patch
 0016-snap-Use-default-icon-if-none-provided.patch
 0017-snap-Make-snaps-purchasable.patch
@@ -30,3 +40,17 @@
 0022-snap-Use-wide-scope-when-searching.patch
 0023-snap-Don-t-treat-auth-cancellation-as-an-error.patch
 0024-shell-search-provider-implement-XUbuntuCancel.patch
+=======
+0015-Don-t-reject-unexpected-state-changes-external-event.patch
+0016-build-Translate-Ubuntu-s-.desktop-file.patch
+0017-snap-Use-default-icon-if-none-provided.patch
+0018-snap-Make-snaps-purchasable.patch
+0019-Disable-paid-snap-support-unless-env-variable-GNOME_.patch
+0020-Show-verified-developers.patch
+0021-snap-Use-wide-scope-when-searching.patch
+0022-Delay-startup-of-GNOME-Software-to-allow-the-Shell-t.patch
+0023-Revert-Revert-flatpak-Use-list-of-related-apps-for-i.patch
+0024-flatpak-Check-if-a-related-app-is-installed-even-whe.patch
+0025-flatpak-Include-related-refs-to-the-app-s-runtime-on.patch
+0026-shell-search-provider-implement-XUbuntuCancel.patch
+>>>>>>> debian/patches/series
-- 
ubuntu-desktop mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop

Reply via email to