r21737 - in /desktop/unstable/brasero/debian: changelog patches/030_fd_leak.patch patches/series

joss at users.alioth.debian.org joss at users.alioth.debian.org
Thu Oct 1 11:44:37 UTC 2009


Author: joss
Date: Thu Oct  1 11:44:36 2009
New Revision: 21737

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=21737
Log:
030_fd_leak.patch: stolen upstream. Don’t keep a FD open on the CD 
device. It avoids nautilus preventing CDs from being ejected when 
the brasero extension is installed.

Added:
    desktop/unstable/brasero/debian/patches/030_fd_leak.patch
Modified:
    desktop/unstable/brasero/debian/changelog
    desktop/unstable/brasero/debian/patches/series

Modified: desktop/unstable/brasero/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/brasero/debian/changelog?rev=21737&op=diff
==============================================================================
--- desktop/unstable/brasero/debian/changelog [utf-8] (original)
+++ desktop/unstable/brasero/debian/changelog [utf-8] Thu Oct  1 11:44:36 2009
@@ -1,9 +1,12 @@
-brasero (2.28.0-2) UNRELEASED; urgency=low
+brasero (2.28.0-2) unstable; urgency=low
 
   * Don’t recommend gnome-mount, gvfs does it if needed.
     Closes: #549132.
-
- -- Josselin Mouette <joss at debian.org>  Thu, 01 Oct 2009 09:50:53 +0200
+  * 030_fd_leak.patch: stolen upstream. Don’t keep a FD open on the CD 
+    device. It avoids nautilus preventing CDs from being ejected when 
+    the brasero extension is installed.
+
+ -- Josselin Mouette <joss at debian.org>  Thu, 01 Oct 2009 13:44:30 +0200
 
 brasero (2.28.0-1) unstable; urgency=low
 

Added: desktop/unstable/brasero/debian/patches/030_fd_leak.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/brasero/debian/patches/030_fd_leak.patch?rev=21737&op=file
==============================================================================
--- desktop/unstable/brasero/debian/patches/030_fd_leak.patch (added)
+++ desktop/unstable/brasero/debian/patches/030_fd_leak.patch [utf-8] Thu Oct  1 11:44:36 2009
@@ -1,0 +1,152 @@
+From 3af0a55b9c9888d68054c851e14861acfdb51453 Mon Sep 17 00:00:00 2001
+From: Philippe Rouquier <bonfire-app at wanadoo.fr>
+Date: Sat, 26 Sep 2009 12:49:40 +0000
+Subject: Don't leak file descriptors
+
+This could be the reason why media did not get ejected
+---
+diff --git a/libbrasero-media/brasero-drive.c b/libbrasero-media/brasero-drive.c
+index 08ab4e7..f3a7136 100644
+--- a/libbrasero-media/brasero-drive.c
++++ b/libbrasero-media/brasero-drive.c
+@@ -810,7 +810,7 @@ brasero_drive_probe_inside_thread (gpointer data)
+ 	const gchar *device;
+ 	BraseroScsiErrCode code;
+ 	BraseroDrivePrivate *priv;
+-	BraseroDeviceHandle *handle;
++	BraseroDeviceHandle *handle = NULL;
+ 	BraseroDrive *drive = BRASERO_DRIVE (data);
+ 
+ 	priv = BRASERO_DRIVE_PRIVATE (drive);
+@@ -833,13 +833,15 @@ brasero_drive_probe_inside_thread (gpointer data)
+ 		handle = brasero_device_handle_open (device, FALSE, &code);
+ 	}
+ 
+-	if (priv->probe_cancelled) {
+-		BRASERO_MEDIA_LOG ("Open () cancelled");
++	if (!handle) {
++		BRASERO_MEDIA_LOG ("Open () failed: medium busy");
+ 		goto end;
+ 	}
+ 
+-	if (!handle) {
+-		BRASERO_MEDIA_LOG ("Open () failed: medium busy");
++	if (priv->probe_cancelled) {
++		BRASERO_MEDIA_LOG ("Open () cancelled");
++
++		brasero_device_handle_close (handle);
+ 		goto end;
+ 	}
+ 
+@@ -848,20 +850,24 @@ brasero_drive_probe_inside_thread (gpointer data)
+ 			BRASERO_MEDIA_LOG ("No medium inserted");
+ 
+ 			priv->has_medium = FALSE;
++
++			brasero_device_handle_close (handle);
+ 			goto end;
+ 		}
+ 
+ 		if (code != BRASERO_SCSI_NOT_READY) {
+-			brasero_device_handle_close (handle);
+ 			BRASERO_MEDIA_LOG ("Device does not respond");
++
++			brasero_device_handle_close (handle);
+ 			goto end;
+ 		}
+ 
+ 		sleep (2);
+ 
+ 		if (priv->probe_cancelled) {
+-			brasero_device_handle_close (handle);
+ 			BRASERO_MEDIA_LOG ("Device probing cancelled");
++
++			brasero_device_handle_close (handle);
+ 			goto end;
+ 		}
+ 	}
+diff --git a/libbrasero-media/brasero-medium.c b/libbrasero-media/brasero-medium.c
+index 46762d4..88a801d 100644
+--- a/libbrasero-media/brasero-medium.c
++++ b/libbrasero-media/brasero-medium.c
+@@ -2978,43 +2978,49 @@ brasero_medium_probe_thread (gpointer self)
+ 		handle = brasero_device_handle_open (device, FALSE, &code);
+ 	}
+ 
+-	if (priv->probe_cancelled)
++	if (!handle) {
++		BRASERO_MEDIA_LOG ("Open () failed: medium busy");
+ 		goto end;
++	}
+ 
+-	if (handle) {
+-		BRASERO_MEDIA_LOG ("Open () succeeded");
+-
+-		/* NOTE: if we wanted to know the status we'd need to read the 
+-		 * error code variable which is currently NULL */
+-		while (brasero_spc1_test_unit_ready (handle, &code) != BRASERO_SCSI_OK) {
+-			if (code == BRASERO_SCSI_NO_MEDIUM) {
+-				brasero_device_handle_close (handle);
+-				BRASERO_MEDIA_LOG ("No medium inserted");
+-				priv->info = BRASERO_MEDIUM_NONE;
+-				goto end;
+-			}
+-			else if (code != BRASERO_SCSI_NOT_READY) {
+-				brasero_device_handle_close (handle);
+-				BRASERO_MEDIA_LOG ("Device does not respond");
+-				goto end;
+-			}
++	if (priv->probe_cancelled) {
++		brasero_device_handle_close (handle);
++		goto end;
++	}
+ 
+-			sleep (2);
++	BRASERO_MEDIA_LOG ("Open () succeeded");
+ 
+-			if (priv->probe_cancelled) {
+-				brasero_device_handle_close (handle);
+-				BRASERO_MEDIA_LOG ("Device probing cancelled");
+-				goto end;
+-			}
++	/* NOTE: if we wanted to know the status we'd need to read the 
++	 * error code variable which is currently NULL */
++	while (brasero_spc1_test_unit_ready (handle, &code) != BRASERO_SCSI_OK) {
++		if (code == BRASERO_SCSI_NO_MEDIUM) {
++			BRASERO_MEDIA_LOG ("No medium inserted");
++			priv->info = BRASERO_MEDIUM_NONE;
++
++			brasero_device_handle_close (handle);
++			goto end;
+ 		}
++		else if (code != BRASERO_SCSI_NOT_READY) {
++			BRASERO_MEDIA_LOG ("Device does not respond");
+ 
+-		BRASERO_MEDIA_LOG ("Device ready");
++			brasero_device_handle_close (handle);
++			goto end;
++		}
+ 
+-		brasero_medium_init_real (BRASERO_MEDIUM (self), handle);
+-		brasero_device_handle_close (handle);
++		sleep (2);
++
++		if (priv->probe_cancelled) {
++			BRASERO_MEDIA_LOG ("Device probing cancelled");
++
++			brasero_device_handle_close (handle);
++			goto end;
++		}
+ 	}
+-	else
+-		BRASERO_MEDIA_LOG ("Open () failed: medium busy");
++
++	BRASERO_MEDIA_LOG ("Device ready");
++
++	brasero_medium_init_real (BRASERO_MEDIUM (self), handle);
++	brasero_device_handle_close (handle);
+ 
+ end:
+ 
+--
+cgit v0.8.2

Modified: desktop/unstable/brasero/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/brasero/debian/patches/series?rev=21737&op=diff
==============================================================================
--- desktop/unstable/brasero/debian/patches/series [utf-8] (original)
+++ desktop/unstable/brasero/debian/patches/series [utf-8] Thu Oct  1 11:44:36 2009
@@ -1,1 +1,2 @@
 011_nautilus_menu_no_display.patch
+030_fd_leak.patch




More information about the pkg-gnome-commits mailing list