rpms/xfburn/F-12 xfburn-0.4.2-fix-unmount.patch, NONE, 1.1 xfburn.spec, 1.7, 1.8
Christoph Wickert
cwickert at fedoraproject.org
Fri Jan 29 12:22:12 UTC 2010
Author: cwickert
Update of /cvs/pkgs/rpms/xfburn/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv30181/F-12
Modified Files:
xfburn.spec
Added Files:
xfburn-0.4.2-fix-unmount.patch
Log Message:
* Fri Jan 31 2010 Christoph Wickert <cwickert at fedoraproject.org> - 0.4.2-3
- Properly unmount drive before burning (#525514)
xfburn-0.4.2-fix-unmount.patch:
xfburn-device.c | 39 ++++++++++++++-------------------------
xfburn-hal-manager.c | 3 ++-
2 files changed, 16 insertions(+), 26 deletions(-)
--- NEW FILE xfburn-0.4.2-fix-unmount.patch ---
>From 4bf5494c29d3fa87657c99251e57bd5a999d1285 Mon Sep 17 00:00:00 2001
From: David Mohr <squisher at xfce.org>
Date: Fri, 29 Jan 2010 04:45:35 +0000
Subject: Remove accessible attribute of xfburn_device, since this can change
pretty much at any time. Now check for unmount whenever we try to grab
the drive.
---
diff --git a/xfburn/xfburn-device.c b/xfburn/xfburn-device.c
index 18cc275..73727db 100644
--- a/xfburn/xfburn-device.c
+++ b/xfburn/xfburn-device.c
@@ -70,7 +70,7 @@ typedef struct _XfburnDevicePrivate XfburnDevicePrivate;
struct _XfburnDevicePrivate {
gchar *name;
gchar *addr;
- gboolean accessible;
+ gboolean details_known;
gint buffer_size;
gboolean dummy_write;
@@ -107,9 +107,6 @@ xfburn_device_get_property (GObject *object, guint property_id,
case PROP_ADDRESS:
g_value_set_string (value, priv->addr);
break;
- case PROP_ACCESSIBLE:
- g_value_set_boolean (value, priv->accessible);
- break;
case PROP_SUPPORTED_SPEEDS:
g_value_set_pointer (value, priv->supported_speeds);
break;
@@ -170,9 +167,6 @@ xfburn_device_set_property (GObject *object, guint property_id,
case PROP_ADDRESS:
priv->addr = g_value_dup_string (value);
break;
- case PROP_ACCESSIBLE:
- priv->accessible = g_value_get_boolean (value);
- break;
case PROP_SUPPORTED_SPEEDS:
priv->supported_speeds = g_value_get_pointer (value);
break;
@@ -250,9 +244,6 @@ xfburn_device_class_init (XfburnDeviceClass *klass)
g_object_class_install_property (object_class, PROP_ADDRESS,
g_param_spec_string ("address", _("Device address"),
_("Device address"), "", G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_ACCESSIBLE,
- g_param_spec_string ("accessible", _("Is the device accessible"),
- _("Is the device accessible"), FALSE, G_PARAM_READABLE));
g_object_class_install_property (object_class, PROP_SUPPORTED_SPEEDS,
g_param_spec_pointer ("supported-speeds", _("Burn speeds supported by the device"),
_("Burn speeds supported by the device"), G_PARAM_READABLE));
@@ -411,7 +402,7 @@ xfburn_device_fillin_libburn_info (XfburnDevice *device, struct burn_drive_info
{
XfburnDevicePrivate *priv = GET_PRIVATE (device);
- priv->accessible = TRUE;
+ priv->details_known = TRUE;
priv->cdr = drive->write_cdr;
priv->cdrw = drive->write_cdrw;
@@ -439,6 +430,9 @@ xfburn_device_grab (XfburnDevice * device, struct burn_drive_info **drive_info)
gchar drive_addr[BURN_DRIVE_ADR_LEN];
int i;
const int max_checks = 4;
+#ifdef HAVE_HAL
+ XfburnHalManager *halman = xfburn_hal_manager_get_global ();
+#endif
ret = burn_drive_convert_fs_adr (priv->addr, drive_addr);
if (ret <= 0) {
@@ -453,8 +447,14 @@ xfburn_device_grab (XfburnDevice * device, struct burn_drive_info **drive_info)
//DBG ("grab (%s)-> %d", drive_addr, ret);
if (ret > 0)
break;
- else if (i < max_checks)
+ else if (i < max_checks) {
+#ifdef HAVE_HAL
+ if (!xfburn_hal_manager_check_ask_umount (halman, device))
+ usleep(i*100001);
+#else
usleep(i*100001);
+#endif
+ }
}
if (ret <= 0) {
@@ -472,9 +472,6 @@ xfburn_device_refresh_info (XfburnDevice * device, gboolean get_speed_info)
struct burn_drive_info *drive_info = NULL;
gboolean ret;
-#ifdef HAVE_HAL
- XfburnHalManager *halman = xfburn_hal_manager_get_global ();
-#endif
if (G_UNLIKELY (device == NULL)) {
g_warning ("Hmm, why can we refresh when there is no drive?");
@@ -490,22 +487,14 @@ xfburn_device_refresh_info (XfburnDevice * device, gboolean get_speed_info)
g_slist_free (priv->supported_speeds);
priv->supported_speeds = NULL;
- if (!priv->accessible) {
-#ifdef HAVE_HAL
- if (!xfburn_hal_manager_check_ask_umount (halman, device))
- return FALSE;
-#else
- return FALSE;
-#endif
- }
-
if (!xfburn_device_grab (device, &drive_info)) {
ret = FALSE;
g_warning ("Couldn't grab drive in order to update speed list.");
priv->disc_status = BURN_DISC_UNGRABBED;
} else {
- if (!priv->accessible)
+ if (!priv->details_known)
xfburn_device_fillin_libburn_info (device, drive_info);
+
ret = TRUE;
refresh_disc (device, drive_info);
if (get_speed_info)
diff --git a/xfburn/xfburn-hal-manager.c b/xfburn/xfburn-hal-manager.c
index 803ce11..3d64cad 100644
--- a/xfburn/xfburn-hal-manager.c
+++ b/xfburn/xfburn-hal-manager.c
@@ -483,6 +483,8 @@ is_a_device:
return n_devices;
}
+/* @Return TRUE if the drive is now accessible, FALSE if not.
+ */
gboolean
xfburn_hal_manager_check_ask_umount (XfburnHalManager *halman, XfburnDevice *device)
{
--
cgit v0.8.2.1
Index: xfburn.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xfburn/F-12/xfburn.spec,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -p -r1.7 -r1.8
--- xfburn.spec 29 Oct 2009 23:33:35 -0000 1.7
+++ xfburn.spec 29 Jan 2010 12:22:12 -0000 1.8
@@ -1,6 +1,6 @@
Name: xfburn
Version: 0.4.2
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Simple CD burning tool for Xfce
Group: Applications/Archiving
@@ -14,6 +14,9 @@ Patch0: xfburn-0.4.2-mark-constr
# created from several upstream commits as described in
# http://bugzilla.xfce.org/show_bug.cgi?id=5678#c23
Patch1: xfburn-0.4.2-fix-crash-on-iso-burning.patch
+# fix for https://bugzilla.redhat.com/show_bug.cgi?id=525514
+# http://git.xfce.org/apps/xfburn/commit/?id=4bf5494c29d3fa87657c99251e57bd5a999d1285
+Patch2: xfburn-0.4.2-fix-unmount.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libxfcegui4-devel >= 4.4.0 Thunar-devel >= 0.3.0
@@ -33,6 +36,7 @@ compositions of data to either CD or DVD
%setup -q
%patch0 -p1 -b .mark-constructor-properties
%patch1 -p1 -b .crash-on-iso-burning
+%patch2 -p1 -b .unmount
%build
@@ -86,6 +90,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Fri Jan 31 2010 Christoph Wickert <cwickert at fedoraproject.org> - 0.4.2-3
+- Properly unmount drive before burning (#525514)
+
* Thu Oct 30 2009 Christoph Wickert <cwickert at fedoraproject.org> - 0.4.2-2
- Fix infinite loop in blank disk dialog (#525515)
- Don't crash on burning ISO image (#525518)
More information about the scm-commits
mailing list