[Pkg-cli-apps-commits] [SCM] banshee branch, master, updated. debian/1.5.1-1-10-gb95d441

Chow Loong Jin hyperair at gmail.com
Wed Dec 9 19:53:52 UTC 2009


The following commit has been merged in the master branch:
commit b95d4412a57278d1c1b990c99ff738ccca3bdd0a
Author: Chow Loong Jin <hyperair at gmail.com>
Date:   Thu Dec 10 03:53:31 2009 +0800

    Backport fix from upstream for DAP support with Devkit
    
    * debian/patches/01_devkit-fix.patch:
      + Backport fix from upstream for DAP support with Devkit

diff --git a/debian/changelog b/debian/changelog
index eec9e19..a8578be 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -45,8 +45,10 @@ banshee (1.5.2-1) UNRELEASED; urgency=low
     + Build-depend on -dev packages for libipod{,ui}-cil
   * debian/patches/01_fix-ipod-sharp-ftbfs:
     + Dropped, applied upstream
+  * debian/patches/01_devkit-fix.patch:
+    + Backport fix from upstream for DAP support with Devkit
 
- -- Chow Loong Jin <hyperair at ubuntu.com>  Thu, 03 Dec 2009 00:40:41 +0800
+ -- Chow Loong Jin <hyperair at ubuntu.com>  Thu, 10 Dec 2009 03:53:04 +0800
 
 banshee (1.5.1-1) unstable; urgency=low
 
diff --git a/debian/control b/debian/control
index 2735342..0b18bdf 100644
--- a/debian/control
+++ b/debian/control
@@ -55,7 +55,7 @@ Depends: ${shlibs:Depends},
          hal,
          gnome-icon-theme (>= 2.16)
 Recommends: gstreamer0.10-plugins-bad,
-            podsleuth (>= 0.6.0),
+            podsleuth (>= 0.6.5-2~),
             brasero,
             avahi-daemon
 Suggests: gstreamer0.10-plugins-ugly,
diff --git a/debian/patches/01_devkit-fix.patch b/debian/patches/01_devkit-fix.patch
new file mode 100644
index 0000000..072ecc0
--- /dev/null
+++ b/debian/patches/01_devkit-fix.patch
@@ -0,0 +1,260 @@
+commit 3aac4c2f77b30de378065222b4261bcb9fcf12bd
+Author: Gabriel Burt <gabriel.burt at gmail.com>
+Date:   Tue Dec 8 18:44:12 2009 -0800
+
+    Fix DAP support on distros shipping DeviceKit
+    
+    Check DK for whether the DAP's drive is mounted and where.  For iPods,
+    requires latest podsleuth (what will be 0.6.6).
+
+Index: banshee/NEWS
+===================================================================
+--- banshee.orig/NEWS	2009-12-10 03:43:09.973274805 +0800
++++ banshee/NEWS	2009-12-10 03:43:11.913272834 +0800
+@@ -121,7 +121,7 @@
+       * boo >= 0.8.1
+ 
+     * Run-time requirements for default feature stack:
+-      * PodSleuth (0.6.4)
++      * PodSleuth (0.6.6 recommended)
+       * Brasero   (0.8.1)
+       * Avahi
+       * gst-plugins-bad (providing the bpmdetect GStreamer plugin)
+Index: banshee/src/Backends/Banshee.Hal/Banshee.HalBackend/DkDisk.cs
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ banshee/src/Backends/Banshee.Hal/Banshee.HalBackend/DkDisk.cs	2009-12-10 03:43:11.913272834 +0800
+@@ -0,0 +1,128 @@
++//
++// DkDisk.cs
++//
++// Author:
++//   Gabriel Burt <gburt at novell.com>
++//
++// Copyright (C) 2009 Novell, Inc.
++//
++// Permission is hereby granted, free of charge, to any person obtaining
++// a copy of this software and associated documentation files (the
++// "Software"), to deal in the Software without restriction, including
++// without limitation the rights to use, copy, modify, merge, publish,
++// distribute, sublicense, and/or sell copies of the Software, and to
++// permit persons to whom the Software is furnished to do so, subject to
++// the following conditions:
++//
++// The above copyright notice and this permission notice shall be
++// included in all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++//
++
++using System;
++
++using NDesk.DBus;
++
++namespace Banshee.HalBackend
++{
++    public class DkDisk
++    {
++        public static DkDisk FindByDevice (string device_path)
++        {
++            if (device_path == null)
++                return null;
++
++            if (disks == null)
++                return null;
++
++
++            string disk_path = null;
++            try {
++                disk_path = disks.FindDeviceByDeviceFile (device_path);
++            } catch {}
++
++            if (disk_path == null)
++                return null;
++
++            try {
++                return new DkDisk (disk_path);
++            } catch {}
++
++            return null;
++        }
++
++        private IDkDisk disk;
++        private org.freedesktop.DBus.Properties props;
++
++        private DkDisk (string obj_path)
++        {
++            disk = Bus.System.GetObject<IDkDisk>("org.freedesktop.DeviceKit.Disks",
++                new ObjectPath(obj_path));
++
++            props = Bus.System.GetObject<org.freedesktop.DBus.Properties>("org.freedesktop.DeviceKit.Disks",
++                new ObjectPath(obj_path));
++        }
++
++        public bool IsMounted {
++            get {
++                return (bool) props.Get ("org.freedesktop.DeviceKit.Disks.Device", "DeviceIsMounted");
++            }
++        }
++
++        public bool IsReadOnly {
++            get {
++                return (bool) props.Get ("org.freedesktop.DeviceKit.Disks.Device", "DeviceIsReadOnly");
++            }
++        }
++
++        public string MountPoint {
++            get {
++                var ary = (string[])props.Get ("org.freedesktop.DeviceKit.Disks.Device", "DeviceMountPaths");
++                return ary != null && ary.Length > 0 ? ary[0] : null;
++            }
++        }
++
++        public void Eject ()
++        {
++            disk.DriveEject (new string [0]);
++        }
++
++        public void Unmount ()
++        {
++            disk.FilesystemUnmount (new string [0]);
++        }
++
++        private static IDkDisks disks;
++
++        static DkDisk ()
++        {
++            try {
++                disks = Bus.System.GetObject<IDkDisks>("org.freedesktop.DeviceKit.Disks",
++                    new ObjectPath("/org/freedesktop/DeviceKit/Disks"));
++            } catch {}
++        }
++
++        [Interface("org.freedesktop.DeviceKit.Disks")]
++        internal interface IDkDisks
++        {
++            string FindDeviceByDeviceFile (string deviceFile);
++        }
++
++    }
++
++    [Interface("org.freedesktop.DeviceKit.Disks.Device")]
++    public interface IDkDisk
++    {
++        bool DeviceIsMounted { get; }
++        string [] DeviceMountPaths { get; }
++        void DriveEject (string [] options);
++        void FilesystemUnmount (string [] options);
++    }
++}
+Index: banshee/src/Backends/Banshee.Hal/Banshee.HalBackend/Volume.cs
+===================================================================
+--- banshee.orig/src/Backends/Banshee.Hal/Banshee.HalBackend/Volume.cs	2009-12-10 03:43:09.923256417 +0800
++++ banshee/src/Backends/Banshee.Hal/Banshee.HalBackend/Volume.cs	2009-12-10 03:43:11.913272834 +0800
+@@ -61,12 +61,14 @@
+             return null;
+         }
+ 
++        private DkDisk dk_disk;
+         private BlockDevice parent;
+         private string [] method_names;
+ 
+         protected Volume (BlockDevice parent, Hal.Manager manager, Hal.Device device) : base (manager, device)
+         {
+             this.parent = parent ?? BlockDevice.Resolve<IBlockDevice> (manager, device.Parent);
++            dk_disk = DkDisk.FindByDevice (DeviceNode);
+ 
+             method_names = HalDevice.PropertyExists (method_names_property)
+                 ? device.GetPropertyStringList (method_names_property)
+@@ -78,7 +80,13 @@
+         }
+ 
+         public string MountPoint {
+-            get { return HalDevice["volume.mount_point"]; }
++            get {
++                if (dk_disk != null && dk_disk.MountPoint != null) {
++                    return dk_disk.MountPoint;
++                } else {
++                    return HalDevice["volume.mount_point"];
++                }
++            }
+         }
+ 
+         public string FileSystem {
+@@ -99,7 +107,7 @@
+         }*/
+ 
+         public bool IsMounted {
+-            get { return HalDevice.GetPropertyBoolean ("volume.is_mounted"); }
++            get { return (dk_disk != null && dk_disk.IsMounted) || HalDevice.GetPropertyBoolean ("volume.is_mounted"); }
+         }
+ 
+         public bool ShouldIgnore {
+@@ -107,7 +115,7 @@
+         }
+ 
+         public bool IsReadOnly {
+-            get { return HalDevice.GetPropertyBoolean ("volume.is_mounted_read_only"); }
++            get { return (dk_disk != null && dk_disk.IsReadOnly) || HalDevice.GetPropertyBoolean ("volume.is_mounted_read_only"); }
+         }
+ 
+         public ulong Capacity {
+@@ -156,7 +164,11 @@
+         public void Unmount ()
+         {
+             if (CanUnmount && HalDevice.IsVolume) {
+-                HalDevice.Volume.Unmount ();
++                if (dk_disk != null) {
++                    dk_disk.Unmount ();
++                } else {
++                    HalDevice.Volume.Unmount ();
++                }
+             }
+         }
+ 
+Index: banshee/src/Backends/Banshee.Hal/Makefile.am
+===================================================================
+--- banshee.orig/src/Backends/Banshee.Hal/Makefile.am	2009-12-10 03:43:09.943255559 +0800
++++ banshee/src/Backends/Banshee.Hal/Makefile.am	2009-12-10 03:43:11.913272834 +0800
+@@ -10,6 +10,7 @@
+ 	Banshee.HalBackend/DeviceMediaCapabilities.cs \
+ 	Banshee.HalBackend/DiscVolume.cs \
+ 	Banshee.HalBackend/DiskDevice.cs \
++	Banshee.HalBackend/DkDisk.cs \
+ 	Banshee.HalBackend/HardwareManager.cs \
+ 	Banshee.HalBackend/UsbDevice.cs \
+ 	Banshee.HalBackend/Volume.cs \
+Index: banshee/src/Dap/Banshee.Dap.Ipod/Banshee.Dap.Ipod/PodSleuthDevice.cs
+===================================================================
+--- banshee.orig/src/Dap/Banshee.Dap.Ipod/Banshee.Dap.Ipod/PodSleuthDevice.cs	2009-12-10 03:43:09.953256108 +0800
++++ banshee/src/Dap/Banshee.Dap.Ipod/Banshee.Dap.Ipod/PodSleuthDevice.cs	2009-12-10 03:43:11.913272834 +0800
+@@ -60,9 +60,9 @@
+             {
+                 this.volume = volume;
+ 
+-                MountPoint = volume.GetPropertyString ("volume.mount_point");
++                MountPoint = volume.MountPoint;
+                 Label = volume.GetPropertyString ("volume.label");
+-                IsMountedReadOnly = volume.GetPropertyBoolean ("volume.is_mounted_read_only");
++                IsMountedReadOnly = volume.IsReadOnly;
+                 Uuid = volume.GetPropertyString ("volume.uuid");
+             }
+ 
+Index: banshee/src/Backends/Banshee.Hal/Makefile.in
+===================================================================
+--- banshee.orig/src/Backends/Banshee.Hal/Makefile.in	2009-12-10 03:49:38.033281437 +0800
++++ banshee/src/Backends/Banshee.Hal/Makefile.in	2009-12-10 03:49:54.263259339 +0800
+@@ -361,6 +361,7 @@
+ 	Banshee.HalBackend/DeviceMediaCapabilities.cs \
+ 	Banshee.HalBackend/DiscVolume.cs \
+ 	Banshee.HalBackend/DiskDevice.cs \
++    Banshee.HalBackend/DkDevice.cs \
+ 	Banshee.HalBackend/HardwareManager.cs \
+ 	Banshee.HalBackend/UsbDevice.cs \
+ 	Banshee.HalBackend/Volume.cs \
diff --git a/debian/patches/series b/debian/patches/series
index 2497acb..2470c71 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
+01_devkit-fix.patch
 99_ltmain_as-needed.patch

-- 
banshee



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