[arch-commits] Commit in udisks/trunk (PKGBUILD no-floppy.patch)

Ionut Biru ibiru at archlinux.org
Tue Aug 10 12:03:49 UTC 2010


    Date: Tuesday, August 10, 2010 @ 08:03:48
  Author: ibiru
Revision: 87055

upgpkg: udisks 1.0.1-5
fix avoiding probing floppies

Added:
  udisks/trunk/no-floppy.patch
Modified:
  udisks/trunk/PKGBUILD

-----------------+
 PKGBUILD        |    9 ++++++---
 no-floppy.patch |   30 ++++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2010-08-10 10:58:02 UTC (rev 87054)
+++ PKGBUILD	2010-08-10 12:03:48 UTC (rev 87055)
@@ -3,7 +3,7 @@
 
 pkgname=udisks
 pkgver=1.0.1
-pkgrel=4
+pkgrel=5
 pkgdesc="Disk Management Service"
 arch=('i686' 'x86_64')
 url="http://www.freedesktop.org/wiki/Software/udisks"
@@ -13,13 +13,16 @@
 options=(!libtool)
 replaces=('devicekit-disks')
 source=(http://hal.freedesktop.org/releases/${pkgname}-${pkgver}.tar.gz
-        lvm2_api_support.patch)
+        lvm2_api_support.patch
+        no-floppy.patch)
 sha256sums=('d9bf1ab56667dfa12e99461c503736e3964cf94dd41f30a1229a0e173429b841'
-            'bf090cbc51b497a3af9c732d1a382f5a2363ac7235cddbc9355584135e17ce1b')
+            'bf090cbc51b497a3af9c732d1a382f5a2363ac7235cddbc9355584135e17ce1b'
+            '14965d91ade4eb9ea3165edffe83c9446c7a9048e97f6fae937c87e60fda9135')
 
 build() {
   cd "${srcdir}/${pkgname}-${pkgver}"
   patch -Np1 -i "${srcdir}/lvm2_api_support.patch"
+  patch -Np1 -i "${srcdir}/no-floppy.patch"
   export CFLAGS="$CFLAGS -fno-strict-aliasing"
   ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
       --libexecdir=/usr/lib/udisks --disable-static

Added: no-floppy.patch
===================================================================
--- no-floppy.patch	                        (rev 0)
+++ no-floppy.patch	2010-08-10 12:03:48 UTC (rev 87055)
@@ -0,0 +1,30 @@
+From ca93d4e2d9e7f483b2fde1725da086e2cca44164 Mon Sep 17 00:00:00 2001
+From: Martin Pitt <martin.pitt at ubuntu.com>
+Date: Wed, 02 Jun 2010 13:56:07 +0000
+Subject: Fix long hangs on probing nonexistant floppy drives
+
+A lot of modern machines do not have a floppy drive any more, but still have a
+floppy controller somewhere (or at least the BIOS pretends to). Trying to
+open(/dev/fd0) on these machines causes long hangs, which lead to long desktop
+startup times.
+
+To fix this, avoid probing floppies for media in update_info().
+
+https://launchpad.net/bugs/539515
+---
+diff --git a/src/device.c b/src/device.c
+index 763385c..0e87f1d 100644
+--- a/src/device.c
++++ b/src/device.c
+@@ -4471,7 +4471,8 @@ update_info (Device *device)
+     {
+       media_available = FALSE;
+ 
+-      if (!g_udev_device_get_property_as_boolean (device->priv->d, "ID_CDROM"))
++      if (!g_udev_device_get_property_as_boolean (device->priv->d, "ID_CDROM") &&
++          !g_udev_device_get_property_as_boolean (device->priv->d, "ID_DRIVE_FLOPPY"))
+         {
+           int fd;
+           fd = open (device->priv->device_file, O_RDONLY);
+--
+cgit v0.8.3-6-g21f6




More information about the arch-commits mailing list