r50172 - in /desktop/unstable/gnome-photos/debian: changelog patches/git_fix-tracker-1.patch patches/git_fix-tracker-2.patch patches/git_fix-tracker-3.patch patches/series

jbicha-guest at users.alioth.debian.org jbicha-guest at users.alioth.debian.org
Tue Sep 6 22:28:49 UTC 2016


Author: jbicha-guest
Date: Tue Sep  6 22:28:49 2016
New Revision: 50172

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=50172
Log:
Add 3 patches from git to fix syntax errors with Tracker 1.9.1

Added:
    desktop/unstable/gnome-photos/debian/patches/git_fix-tracker-1.patch
    desktop/unstable/gnome-photos/debian/patches/git_fix-tracker-2.patch
    desktop/unstable/gnome-photos/debian/patches/git_fix-tracker-3.patch
Modified:
    desktop/unstable/gnome-photos/debian/changelog
    desktop/unstable/gnome-photos/debian/patches/series

Modified: desktop/unstable/gnome-photos/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-photos/debian/changelog?rev=50172&op=diff
==============================================================================
--- desktop/unstable/gnome-photos/debian/changelog	[utf-8] (original)
+++ desktop/unstable/gnome-photos/debian/changelog	[utf-8] Tue Sep  6 22:28:49 2016
@@ -1,3 +1,10 @@
+gnome-photos (3.21.91-2) UNRELEASED; urgency=medium
+
+  * Add debian/patches/git_fix-tracker*.patch:
+    - Add 3 patches from git to fix syntax errors with Tracker 1.9.1
+
+ -- Jeremy Bicha <jbicha at ubuntu.com>  Tue, 06 Sep 2016 12:57:05 -0400
+
 gnome-photos (3.21.91-1) unstable; urgency=low
 
   * New upstream beta release.

Added: desktop/unstable/gnome-photos/debian/patches/git_fix-tracker-1.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-photos/debian/patches/git_fix-tracker-1.patch?rev=50172&op=file
==============================================================================
--- desktop/unstable/gnome-photos/debian/patches/git_fix-tracker-1.patch	(added)
+++ desktop/unstable/gnome-photos/debian/patches/git_fix-tracker-1.patch	[utf-8] Tue Sep  6 22:28:49 2016
@@ -0,0 +1,37 @@
+From 5f2f62833e3cd5cc0482a0d02ddebc5956fdb397 Mon Sep 17 00:00:00 2001
+From: Debarshi Ray <debarshir at gnome.org>
+Date: Tue, 6 Sep 2016 18:10:29 +0200
+Subject: search-type-manager: Only look for nmm:Photos inside collections
+
+... not nie:InformationElements. Since we don't want nested collections
+(see commit be7553dbb4db), we are only interested in the nmm:Photo
+objects that a nfo:DataContainer might have. So, let's tighten the net
+a bit.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=770782
+---
+ src/photos-search-type-manager.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/photos-search-type-manager.c b/src/photos-search-type-manager.c
+index 73cd8d8..d2ad1c9 100644
+--- a/src/photos-search-type-manager.c
++++ b/src/photos-search-type-manager.c
+@@ -111,7 +111,7 @@ photos_search_type_manager_init (PhotosSearchTypeManager *self)
+   search_type = photos_search_type_new_full (PHOTOS_SEARCH_TYPE_STOCK_ALL,
+                                              _("All"),
+                                              "?urn a rdfs:Resource. "
+-                                             "OPTIONAL {?item a nie:InformationElement; nie:isPartOf ?urn}",
++                                             "OPTIONAL {?item a nmm:Photo; nie:isPartOf ?urn}",
+                                              all_filter);
+   photos_base_manager_add_object (PHOTOS_BASE_MANAGER (self), G_OBJECT (search_type));
+   g_object_unref (search_type);
+@@ -119,7 +119,7 @@ photos_search_type_manager_init (PhotosSearchTypeManager *self)
+   search_type = photos_search_type_new_full (PHOTOS_SEARCH_TYPE_STOCK_COLLECTIONS,
+                                              _("Albums"),
+                                              "?urn a nfo:DataContainer. "
+-                                             "?item a nie:InformationElement; nie:isPartOf ?urn.",
++                                             "?item a nmm:Photo; nie:isPartOf ?urn.",
+                                              col_filter);
+   photos_base_manager_add_object (PHOTOS_BASE_MANAGER (self), G_OBJECT (search_type));
+   g_object_unref (search_type);

Added: desktop/unstable/gnome-photos/debian/patches/git_fix-tracker-2.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-photos/debian/patches/git_fix-tracker-2.patch?rev=50172&op=file
==============================================================================
--- desktop/unstable/gnome-photos/debian/patches/git_fix-tracker-2.patch	(added)
+++ desktop/unstable/gnome-photos/debian/patches/git_fix-tracker-2.patch	[utf-8] Tue Sep  6 22:28:49 2016
@@ -0,0 +1,38 @@
+From af79e7546c7ca5ce5f22b4a1842b044ab8f6721e Mon Sep 17 00:00:00 2001
+From: Debarshi Ray <debarshir at gnome.org>
+Date: Tue, 6 Sep 2016 18:12:27 +0200
+Subject: query-builder: Split out the COUNT into a separate variable
+
+This will make the subsequent commit easier to read.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=770782
+---
+ src/photos-query-builder.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/photos-query-builder.c b/src/photos-query-builder.c
+index a16bc8e..a0edb12 100644
+--- a/src/photos-query-builder.c
++++ b/src/photos-query-builder.c
+@@ -106,6 +106,7 @@ photos_query_builder_inner_where (PhotosSearchContextState *state, gboolean glob
+ static gchar *
+ photos_query_builder_where (PhotosSearchContextState *state, gboolean global, gint flags)
+ {
++  const gchar *count_items = "COUNT (?item) AS ?count";
+   gchar *filter = NULL;
+   gchar *optional;
+   gchar *sparql;
+@@ -118,10 +119,11 @@ photos_query_builder_where (PhotosSearchContextState *state, gboolean global, gi
+     filter = photos_query_builder_filter (state, flags);
+ 
+   sparql = g_strdup_printf ("WHERE {{"
+-                            "    SELECT ?urn rdf:type (?urn) AS ?type COUNT (?item) AS ?count %s GROUP BY (?urn)"
++                            "    SELECT ?urn rdf:type (?urn) AS ?type %s %s GROUP BY (?urn)"
+                             "  }"
+                             "  %s %s"
+                             "}",
++                            count_items,
+                             where_sparql,
+                             optional,
+                             (filter != NULL) ? filter : "");
+

Added: desktop/unstable/gnome-photos/debian/patches/git_fix-tracker-3.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-photos/debian/patches/git_fix-tracker-3.patch?rev=50172&op=file
==============================================================================
--- desktop/unstable/gnome-photos/debian/patches/git_fix-tracker-3.patch	(added)
+++ desktop/unstable/gnome-photos/debian/patches/git_fix-tracker-3.patch	[utf-8] Tue Sep  6 22:28:49 2016
@@ -0,0 +1,52 @@
+From 723eeb5bfe3aa5c1dc1d1997e67724165f5c6e22 Mon Sep 17 00:00:00 2001
+From: Debarshi Ray <debarshir at gnome.org>
+Date: Tue, 6 Sep 2016 18:27:33 +0200
+Subject: query-builder: Don't use an undefined ?item variable
+
+We can only use COUNT (?item), if ?item is defined in the WHERE clause.
+Tracker has recently started being strict about this.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=770782
+---
+ src/photos-query-builder.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/src/photos-query-builder.c b/src/photos-query-builder.c
+index a0edb12..5b84b54 100644
+--- a/src/photos-query-builder.c
++++ b/src/photos-query-builder.c
+@@ -25,6 +25,8 @@
+ 
+ #include "config.h"
+ 
++#include <string.h>
++
+ #include <gio/gio.h>
+ 
+ #include "photos-base-manager.h"
+@@ -107,12 +109,15 @@ static gchar *
+ photos_query_builder_where (PhotosSearchContextState *state, gboolean global, gint flags)
+ {
+   const gchar *count_items = "COUNT (?item) AS ?count";
++  gboolean item_defined;
+   gchar *filter = NULL;
+   gchar *optional;
+   gchar *sparql;
+   gchar *where_sparql;
+ 
+   where_sparql = photos_query_builder_inner_where (state, global, flags);
++  item_defined = strstr (where_sparql, "?item") != NULL;
++
+   optional = photos_query_builder_optional ();
+ 
+   if (!(flags & PHOTOS_QUERY_FLAGS_UNFILTERED))
+@@ -123,7 +128,7 @@ photos_query_builder_where (PhotosSearchContextState *state, gboolean global, gi
+                             "  }"
+                             "  %s %s"
+                             "}",
+-                            count_items,
++                            item_defined ? count_items : "",
+                             where_sparql,
+                             optional,
+                             (filter != NULL) ? filter : "");
+

Modified: desktop/unstable/gnome-photos/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-photos/debian/patches/series?rev=50172&op=diff
==============================================================================
--- desktop/unstable/gnome-photos/debian/patches/series	[utf-8] (original)
+++ desktop/unstable/gnome-photos/debian/patches/series	[utf-8] Tue Sep  6 22:28:49 2016
@@ -1,2 +1,5 @@
 90_drop-onlyshowin.patch
 drop-jp2-gegl-check.patch
+git_fix-tracker-1.patch
+git_fix-tracker-2.patch
+git_fix-tracker-3.patch




More information about the pkg-gnome-commits mailing list