diff --git a/banshee-2.6.2-sqlite-hints.patch b/banshee-2.6.2-sqlite-hints.patch index 71e605b..22ae023 100644 --- a/banshee-2.6.2-sqlite-hints.patch +++ b/banshee-2.6.2-sqlite-hints.patch @@ -1,6 +1,6 @@ diff -up banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseAlbumArtistListModel.cs.sqlite-hints banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseAlbumArtistListModel.cs ---- banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseAlbumArtistListModel.cs.sqlite-hints 2014-12-10 09:37:49.872483455 -0500 -+++ banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseAlbumArtistListModel.cs 2014-12-10 09:38:12.417302999 -0500 +--- banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseAlbumArtistListModel.cs.sqlite-hints 2014-02-18 15:35:23.000000000 -0500 ++++ banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseAlbumArtistListModel.cs 2016-02-12 13:49:54.560806549 -0500 @@ -46,7 +46,7 @@ namespace Banshee.Collection.Database ReloadFragmentFormat = @" FROM CoreArtists WHERE CoreArtists.ArtistID IN @@ -11,8 +11,8 @@ diff -up banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/Dat EXISTS (SELECT 1 FROM CoreArtists WHERE ArtistID = CoreAlbums.ArtistID) AND CoreCache.ItemID = {2} {3}) diff -up banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseAlbumListModel.cs.sqlite-hints banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseAlbumListModel.cs ---- banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseAlbumListModel.cs.sqlite-hints 2014-12-10 09:38:30.161160971 -0500 -+++ banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseAlbumListModel.cs 2014-12-10 09:38:54.591965964 -0500 +--- banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseAlbumListModel.cs.sqlite-hints 2014-02-18 15:40:14.000000000 -0500 ++++ banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseAlbumListModel.cs 2016-02-12 13:49:54.560806549 -0500 @@ -56,7 +56,7 @@ namespace Banshee.Collection.Database ReloadFragmentFormat = @" FROM CoreAlbums WHERE CoreAlbums.AlbumID IN @@ -23,8 +23,8 @@ diff -up banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/Dat ORDER BY CoreAlbums.TitleSortKey, CoreAlbums.ArtistNameSortKey"; } diff -up banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseArtistListModel.cs.sqlite-hints banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseArtistListModel.cs ---- banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseArtistListModel.cs.sqlite-hints 2014-12-10 09:39:04.591887197 -0500 -+++ banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseArtistListModel.cs 2014-12-10 09:39:25.215724751 -0500 +--- banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseArtistListModel.cs.sqlite-hints 2014-02-18 15:35:23.000000000 -0500 ++++ banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseArtistListModel.cs 2016-02-12 13:49:54.560806549 -0500 @@ -49,7 +49,7 @@ namespace Banshee.Collection.Database ReloadFragmentFormat = @" FROM CoreArtists WHERE CoreArtists.ArtistID IN @@ -35,24 +35,52 @@ diff -up banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/Dat ORDER BY NameSortKey"; } diff -up banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseFilterListModel.cs.sqlite-hints banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseFilterListModel.cs ---- banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseFilterListModel.cs.sqlite-hints 2014-12-10 09:39:37.711626326 -0500 -+++ banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseFilterListModel.cs 2014-12-10 09:40:48.288063715 -0500 -@@ -124,7 +124,10 @@ namespace Banshee.Collection.Database +--- banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseFilterListModel.cs.sqlite-hints 2014-02-18 15:35:23.000000000 -0500 ++++ banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseFilterListModel.cs 2016-02-12 13:54:24.530444339 -0500 +@@ -57,10 +57,10 @@ namespace Banshee.Collection.Database + } + + protected readonly U select_all_item; +- private HyenaSqliteConnection connection; ++ private BansheeDbConnection connection; + + public DatabaseFilterListModel (string name, string label, Banshee.Sources.DatabaseSource source, +- DatabaseTrackListModel trackModel, HyenaSqliteConnection connection, SqliteModelProvider provider, U selectAllItem, string uuid) ++ DatabaseTrackListModel trackModel, BansheeDbConnection connection, SqliteModelProvider provider, U selectAllItem, string uuid) + : base (trackModel) + { + this.source = source; +@@ -124,7 +124,8 @@ namespace Banshee.Collection.Database "{0}.{1} AND CoreTracks.TrackID = {0}.{2}", FilteredModel.JoinTable, FilteredModel.JoinPrimaryKey, FilteredModel.JoinColumn) : "CoreTracks.TrackID", - filtered ? GetFilterFragment () : "" + filtered ? GetFilterFragment () : "", -+ connection.LikelihoodSupport -+ ? "UNLIKELY" -+ : "" ++ connection.LikelihoodSupport ? "UNLIKELY" : "" ); } diff -up banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseQueryFilterModel.cs.sqlite-hints banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseQueryFilterModel.cs ---- banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseQueryFilterModel.cs.sqlite-hints 2014-12-10 09:41:01.623957094 -0500 -+++ banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseQueryFilterModel.cs 2014-12-10 09:41:23.190785407 -0500 -@@ -59,7 +59,7 @@ namespace Banshee.Collection.Database +--- banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseQueryFilterModel.cs.sqlite-hints 2014-02-18 15:35:23.000000000 -0500 ++++ banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseQueryFilterModel.cs 2016-02-12 13:52:27.749466163 -0500 +@@ -37,6 +37,7 @@ using Hyena.Data.Sqlite; + using Mono.Unix; + + using Banshee.ServiceStack; ++using Banshee.Database; + + namespace Banshee.Collection.Database + { +@@ -51,7 +52,7 @@ namespace Banshee.Collection.Database + private string select_all_fmt; + + public DatabaseQueryFilterModel (Banshee.Sources.DatabaseSource source, DatabaseTrackListModel trackModel, +- HyenaSqliteConnection connection, string select_all_fmt, string uuid, QueryField field, string filter_column) ++ BansheeDbConnection connection, string select_all_fmt, string uuid, QueryField field, string filter_column) + : base (field.Name, field.Label, source, trackModel, connection, QueryFilterInfo.CreateProvider (filter_column, field), new QueryFilterInfo (), String.Format ("{0}-{1}", uuid, field.Name)) + { + this.field = field; +@@ -59,7 +60,7 @@ namespace Banshee.Collection.Database ReloadFragmentFormat = @" FROM CoreTracks, CoreCache{0} @@ -62,8 +90,8 @@ diff -up banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/Dat QueryFields = new QueryFieldSet (query_filter_field); diff -up banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseYearListModel.cs.sqlite-hints banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseYearListModel.cs ---- banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseYearListModel.cs.sqlite-hints 2014-12-10 09:41:32.695709740 -0500 -+++ banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseYearListModel.cs 2014-12-10 09:41:57.127515245 -0500 +--- banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseYearListModel.cs.sqlite-hints 2014-02-18 15:35:23.000000000 -0500 ++++ banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseYearListModel.cs 2016-02-12 13:49:54.561806540 -0500 @@ -47,7 +47,7 @@ namespace Banshee.Collection.Database FROM (SELECT MIN(CoreTracks.TrackID) AS TrackID, CoreTracks.Year FROM CoreTracks GROUP BY CoreTracks.Year) AS CoreTracks WHERE CoreTracks.Year IN @@ -73,24 +101,27 @@ diff -up banshee-2.6.2/src/Core/Banshee.Services/Banshee.Collection.Database/Dat CoreCache.ItemID = {2} {3}) ORDER BY Year"; } -diff -up banshee-2.6.2/src/Hyena/Hyena.Data.Sqlite/Hyena.Data.Sqlite/HyenaSqliteConnection.cs.sqlite-hints banshee-2.6.2/src/Hyena/Hyena.Data.Sqlite/Hyena.Data.Sqlite/HyenaSqliteConnection.cs ---- banshee-2.6.2/src/Hyena/Hyena.Data.Sqlite/Hyena.Data.Sqlite/HyenaSqliteConnection.cs.sqlite-hints 2014-12-10 09:43:41.246692119 -0500 -+++ banshee-2.6.2/src/Hyena/Hyena.Data.Sqlite/Hyena.Data.Sqlite/HyenaSqliteConnection.cs 2014-12-10 09:44:24.646354018 -0500 -@@ -107,6 +107,17 @@ namespace Hyena.Data.Sqlite - - public string ServerVersion { get { return Query ("SELECT sqlite_version ()"); } } +diff -up banshee-2.6.2/src/Core/Banshee.Services/Banshee.Database/BansheeDbConnection.cs.sqlite-hints banshee-2.6.2/src/Core/Banshee.Services/Banshee.Database/BansheeDbConnection.cs +--- banshee-2.6.2/src/Core/Banshee.Services/Banshee.Database/BansheeDbConnection.cs.sqlite-hints 2016-02-12 13:50:42.853383993 -0500 ++++ banshee-2.6.2/src/Core/Banshee.Services/Banshee.Database/BansheeDbConnection.cs 2016-02-12 13:56:29.789348335 -0500 +@@ -52,6 +52,20 @@ namespace Banshee.Database + get { return configuration; } + } + private bool? likelihood_support = null; -+ public bool LikelihoodSupport { ++ public bool LikelihoodSupport { + get { -+ if (likelihood_support.HasValue) { -+ return likelihood_support.Value; -+ } else { -+ likelihood_support = Query ("SELECT sqlite_version () >= '3.8.1'"); -+ return likelihood_support.Value; ++ if (!likelihood_support.HasValue) { ++ // emulate the SQLITE_VERSION_NUMBER macro ++ string[] v = Query ("SELECT sqlite_version ()").Split ('.'); ++ likelihood_support = (Int32.Parse (v[0]) * 1000000 + ++ Int32.Parse (v[1]) * 1000 + ++ Int32.Parse (v[2])) >= 3008001; + } -+ } } ++ return likelihood_support.Value; ++ } ++ } + - public HyenaSqliteConnection(string dbpath) + public BansheeDbConnection () : this (DatabaseFile) { - this.dbpath = dbpath; + validate_schema = ApplicationContext.CommandLine.Contains ("validate-db-schema"); diff --git a/banshee.spec b/banshee.spec index 20d868e..de261a7 100644 --- a/banshee.spec +++ b/banshee.spec @@ -1,6 +1,6 @@ Name: banshee Version: 2.6.2 -Release: 14%{?dist} +Release: 15%{?dist} Summary: Easily import, manage, and play selections from your music collection License: MIT @@ -205,6 +205,9 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : %{_libdir}/pkgconfig/banshee-*.pc %changelog +* Fri Feb 12 2016 Tom Callaway - 2.6.2-15 +- fixup sqlite hints patch to do proper version checking and match upstream commit + * Wed Feb 03 2016 Fedora Release Engineering - 2.6.2-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild