rpms/brasero/F-12 eject.patch,NONE,1.1 brasero.spec,1.64,1.65
Matthias Clasen
mclasen at fedoraproject.org
Fri Oct 2 13:56:34 UTC 2009
- Previous message: rpms/libyaml/devel .cvsignore, 1.2, 1.3 libyaml.spec, 1.4, 1.5 sources, 1.2, 1.3
- Next message: rpms/PyYAML/devel .cvsignore, 1.4, 1.5 PyYAML.spec, 1.9, 1.10 sources, 1.5, 1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: mclasen
Update of /cvs/pkgs/rpms/brasero/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv12043
Modified Files:
brasero.spec
Added Files:
eject.patch
Log Message:
Fix inability to eject after burn
eject.patch:
brasero-drive.c | 20 +++++++++++------
brasero-medium.c | 64 ++++++++++++++++++++++++++++++-------------------------
2 files changed, 48 insertions(+), 36 deletions(-)
--- NEW FILE eject.patch ---
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:
Index: brasero.spec
===================================================================
RCS file: /cvs/pkgs/rpms/brasero/F-12/brasero.spec,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -p -r1.64 -r1.65
--- brasero.spec 22 Sep 2009 05:54:30 -0000 1.64
+++ brasero.spec 2 Oct 2009 13:56:34 -0000 1.65
@@ -1,6 +1,6 @@
Name: brasero
Version: 2.28.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Gnome CD/DVD burning application
Group: Applications/Multimedia
License: GPLv2+
@@ -45,6 +45,8 @@ Requires(pre): GConf2
Requires(post): GConf2
Requires(preun): GConf2
+# from upstream
+Patch0: eject.patch
%description
Simple and easy to use CD/DVD burning application for the Gnome
@@ -87,7 +89,7 @@ developing brasero applications.
%prep
%setup -q
-
+%patch0 -p1 -b .eject
%build
%configure \
@@ -205,6 +207,9 @@ fi
%changelog
+* Fri Oct 2 2009 Matthias Clasen <mclasen at redhat.com> - 2.28.0-2
+- Fix ejecting after burning
+
* Tue Sep 22 2009 Matthias Clasen <mclasen at redhat.com> - 2.28.0-1
- Update to 2.28.0
- Previous message: rpms/libyaml/devel .cvsignore, 1.2, 1.3 libyaml.spec, 1.4, 1.5 sources, 1.2, 1.3
- Next message: rpms/PyYAML/devel .cvsignore, 1.4, 1.5 PyYAML.spec, 1.9, 1.10 sources, 1.5, 1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list