[Pkg-cli-apps-commits] [SCM] banshee-community-extensions branch, master, updated. upstream/1.5.4-9-gcfcaceb

Chow Loong Jin hyperair at ubuntu.com
Tue Mar 2 13:58:00 UTC 2010


The following commit has been merged in the master branch:
commit c6af4a12d9b391b4c92d3d4922064445d6556753
Author: Chow Loong Jin <hyperair at ubuntu.com>
Date:   Tue Mar 2 18:39:54 2010 +0800

    Add random-by-similar.patch which fixes a crash

diff --git a/debian/README.source b/debian/README.source
new file mode 100644
index 0000000..8646078
--- /dev/null
+++ b/debian/README.source
@@ -0,0 +1,57 @@
+This package uses quilt to manage all modifications to the upstream
+source.  Changes are stored in the source package as diffs in
+debian/patches and applied during the build.
+
+To configure quilt to use debian/patches instead of patches, you want
+either to export QUILT_PATCHES=debian/patches in your environment
+or use this snippet in your ~/.quiltrc:
+
+    for where in ./ ../ ../../ ../../../ ../../../../ ../../../../../; do
+        if [ -e ${where}debian/rules -a -d ${where}debian/patches ]; then
+                export QUILT_PATCHES=debian/patches
+        fi
+    done
+
+To get the fully patched source after unpacking the source package, cd to
+the root level of the source package and run:
+
+    quilt push -a
+
+The last patch listed in debian/patches/series will become the current
+patch.
+
+To add a new set of changes, first run quilt push -a, and then run:
+
+    quilt new <patch>
+
+where <patch> is a descriptive name for the patch, used as the filename in
+debian/patches.  Then, for every file that will be modified by this patch,
+run:
+
+    quilt add <file>
+
+before editing those files.  You must tell quilt with quilt add what files
+will be part of the patch before making changes or quilt will not work
+properly.  After editing the files, run:
+
+    quilt refresh
+
+to save the results as a patch.
+
+Alternately, if you already have an external patch and you just want to
+add it to the build system, run quilt push -a and then:
+
+    quilt import -P <patch> /path/to/patch
+    quilt push -a
+
+(add -p 0 to quilt import if needed). <patch> as above is the filename to
+use in debian/patches.  The last quilt push -a will apply the patch to
+make sure it works properly.
+
+To remove an existing patch from the list of patches that will be applied,
+run:
+
+    quilt delete <patch>
+
+You may need to run quilt pop -a to unapply patches first before running
+this command.
diff --git a/debian/control b/debian/control
index a9e7289..41b4c72 100644
--- a/debian/control
+++ b/debian/control
@@ -6,6 +6,7 @@ Uploaders: Chow Loong Jin <hyperair at ubuntu.com>
 Build-Depends: debhelper (>= 7.0.50),
                cli-common-dev (>= 0.5.7),
                mono-devel (>= 2.4.2.3),
+               quilt (>= 0.46-7~),
                autotools-dev,
                banshee (>= 1.5.4),
                pkg-config,
diff --git a/debian/patches/01_random-by-similar.patch b/debian/patches/01_random-by-similar.patch
new file mode 100644
index 0000000..6f04b13
--- /dev/null
+++ b/debian/patches/01_random-by-similar.patch
@@ -0,0 +1,54 @@
+commit 5bdefae63d8613d6969ab681a3839813c8d759e8
+Author: Alexander Kojevnikov <alexander at kojevnikov.com>
+Date:   Fri Feb 26 11:10:18 2010 +1100
+
+    [Mirage.RandomBySimilar] Fix an exception (bgo#611066)
+
+diff --git a/src/Mirage/Banshee.Mirage/RandomBySimilar.cs b/src/Mirage/Banshee.Mirage/RandomBySimilar.cs
+index 16d58e4..58e991b 100644
+--- a/src/Mirage/Banshee.Mirage/RandomBySimilar.cs
++++ b/src/Mirage/Banshee.Mirage/RandomBySimilar.cs
+@@ -80,7 +80,12 @@ namespace Banshee.Mirage
+ 
+         public override TrackInfo GetPlaybackTrack (DateTime after)
+         {
+-            using (var seed = GetSeed ()) {
++            var seed = GetSeed ();
++            if (seed == null) {
++                return null;
++            }
++
++            using (seed) {
+                 var track = Cache.GetSingle (Select, From, cache_condition, seed.Id, after, after) as DatabaseTrackInfo;
+                 if (track != null) {
+                     last_track_id = track.TrackId;
+@@ -91,7 +96,12 @@ namespace Banshee.Mirage
+ 
+         public override DatabaseTrackInfo GetShufflerTrack (DateTime after)
+         {
+-            using (var seed = GetSeed ()) {
++            var seed = GetSeed ();
++            if (seed == null) {
++                return null;
++            }
++
++            using (seed) {
+                 var track = GetTrack (ShufflerQuery, seed.Id, after) as DatabaseTrackInfo;
+                 if (track != null) {
+                     last_track_id = track.TrackId;
+@@ -102,12 +112,13 @@ namespace Banshee.Mirage
+ 
+         private BaseSeed GetSeed ()
+         {
+-            return new SingleSeed (Scms.FromBytes (ServiceManager.DbConnection.Query<byte[]> (String.Format (
++            var buf = ServiceManager.DbConnection.Query<byte[]> (String.Format (
+                 "SELECT ScmsData FROM MirageTrackAnalysis WHERE Status = 0 {0} LIMIT 1",
+                 last_track_id == 0
+                     ? "ORDER BY RANDOM ()"
+                     : String.Format ("AND TrackID = {0}", last_track_id)
+-            ))));
++            ));
++            return buf == null ? null : new SingleSeed (Scms.FromBytes (buf));
+         }
+     }
+ }
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..0c2b1e4
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+01_random-by-similar.patch
diff --git a/debian/rules b/debian/rules
index 6865cfc..61b6959 100755
--- a/debian/rules
+++ b/debian/rules
@@ -31,4 +31,4 @@ override_dh_gencontrol:
 	dh_gencontrol
 
 %:
-	dh $@
+	dh --with=quilt $@

-- 
banshee-community-extensions



More information about the Pkg-cli-apps-commits mailing list