rpms/gvfs/F-11 gvfs-1.2.4-fix-gphoto2-for-canon-5d.patch, NONE, 1.1 gvfs.spec, 1.138, 1.139
Tomas Bzatek
tbzatek at fedoraproject.org
Thu Jun 25 12:39:51 UTC 2009
Author: tbzatek
Update of /cvs/extras/rpms/gvfs/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv21143
Modified Files:
gvfs.spec
Added Files:
gvfs-1.2.4-fix-gphoto2-for-canon-5d.patch
Log Message:
* Thu Jun 25 2009 Tomas Bzatek <tbzatek at redhat.com> - 1.2.3-8
- Fix gphoto2 backend to work with Canon EOS 5D
gvfs-1.2.4-fix-gphoto2-for-canon-5d.patch:
--- NEW FILE gvfs-1.2.4-fix-gphoto2-for-canon-5d.patch ---
>From a04faf346426a9016ba5de85e3d6b8c93f7066e9 Mon Sep 17 00:00:00 2001
From: David Zeuthen <davidz at redhat.com>
Date: Fri, 05 Jun 2009 22:51:45 +0000
Subject: gphoto2: Fix gphoto2 backend to work with Canon EOS 5D
This bug was introduced during the 2.25 cycle as part of supporting
multiple storage heads. Previously we didn't use basedir, now we
do. And we failed to check if the basedir is actually set.
---
diff --git a/daemon/gvfsbackendgphoto2.c b/daemon/gvfsbackendgphoto2.c
index a21df89..9cc3851 100644
--- a/daemon/gvfsbackendgphoto2.c
+++ b/daemon/gvfsbackendgphoto2.c
@@ -56,7 +56,7 @@
#include "gvfsicon.h"
/* showing debug traces */
-#if 0
+#if 1
#define DEBUG_SHOW_TRACES 1
#endif
@@ -627,7 +627,7 @@ static void
_gphoto2_logger_func (GPLogLevel level, const char *domain, const char *format, va_list args, void *data)
{
g_fprintf (stderr, "libgphoto2: %s: ", domain);
- g_vfprintf (stderr, message, args);
+ g_vfprintf (stderr, format, args);
va_end (args);
g_fprintf (stderr, "\n");
}
@@ -1340,7 +1340,9 @@ ensure_ignore_prefix (GVfsBackendGphoto2 *gphoto2_backend, GVfsJob *job)
head = &storage_info[i];
}
- prefix = g_strdup_printf ("%s/", head->basedir);
+ /* Some cameras, such as the Canon 5D, won't report the basedir */
+ if (head->fields & GP_STORAGEINFO_BASE)
+ prefix = g_strdup_printf ("%s/", head->basedir);
out:
@@ -1349,6 +1351,8 @@ ensure_ignore_prefix (GVfsBackendGphoto2 *gphoto2_backend, GVfsJob *job)
else
gphoto2_backend->ignore_prefix = prefix;
+ DEBUG ("Using ignore_prefix='%s'", gphoto2_backend->ignore_prefix);
+
return TRUE;
}
@@ -1992,7 +1996,7 @@ do_enumerate (GVfsBackend *backend,
using_cached_file_list = FALSE;
filename = add_ignore_prefix (gphoto2_backend, given_filename);
- DEBUG ("enumerate (%s)", given_filename);
+ DEBUG ("enumerate ('%s', with_prefix='%s')", given_filename, filename);
split_filename_with_ignore_prefix (gphoto2_backend, given_filename, &as_dir, &as_name);
if (!is_directory (gphoto2_backend, as_dir, as_name))
diff --git a/monitor/gphoto2/ggphoto2volumemonitor.c b/monitor/gphoto2/ggphoto2volumemonitor.c
index 89a7f0b..b5ec0ec 100644
--- a/monitor/gphoto2/ggphoto2volumemonitor.c
+++ b/monitor/gphoto2/ggphoto2volumemonitor.c
@@ -452,11 +452,20 @@ get_stores_for_camera (int bus_num, int device_num)
/* Append the data to the list */
for (i = 0; i < num_storage_info; i++)
{
+ const gchar *basedir;
+
/* Ignore storage with no capacity (see bug 570888) */
if ((storage_info[i].fields & GP_STORAGEINFO_MAXCAPACITY) &&
storage_info[i].capacitykbytes == 0)
continue;
- l = g_list_prepend (l, g_strdup (storage_info[i].basedir));
+
+ /* Some cameras, such as the Canon 5D, won't report the basedir */
+ if (storage_info[i].fields & GP_STORAGEINFO_BASE)
+ basedir = storage_info[i].basedir;
+ else
+ basedir = "/";
+
+ l = g_list_prepend (l, g_strdup (basedir));
}
out:
--
cgit v0.8.2
Index: gvfs.spec
===================================================================
RCS file: /cvs/extras/rpms/gvfs/F-11/gvfs.spec,v
retrieving revision 1.138
retrieving revision 1.139
diff -u -p -r1.138 -r1.139
--- gvfs.spec 22 Jun 2009 14:46:02 -0000 1.138
+++ gvfs.spec 25 Jun 2009 12:39:20 -0000 1.139
@@ -1,7 +1,7 @@
Summary: Backends for the gio framework in GLib
Name: gvfs
Version: 1.2.3
-Release: 7%{?dist}
+Release: 8%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
URL: http://www.gtk.org
@@ -87,6 +87,7 @@ Patch122: gvfs-1.3.1-audiocd-automount.p
# http://bugzilla.gnome.org/show_bug.cgi?id=582373
Patch200: webdav-username.patch
+Patch201: gvfs-1.2.4-fix-gphoto2-for-canon-5d.patch
%description
The gvfs package provides backend implementations for the gio
@@ -194,6 +195,7 @@ media players (Media Transfer Protocol)
%patch122 -p1 -b .audiocd-automount
%patch200 -p1 -b .webdav-username
+%patch201 -p1 -b .gphoto2-basedir
%build
@@ -337,6 +339,9 @@ update-desktop-database &> /dev/null ||:
%changelog
+* Thu Jun 25 2009 Tomas Bzatek <tbzatek at redhat.com> - 1.2.3-8
+- Fix gphoto2 backend to work with Canon EOS 5D
+
* Mon Jun 22 2009 Tomas Bzatek <tbzatek at redhat.com> - 1.2.3-7
- Fix Audio CD isn't automounting when inserted (#500341)
More information about the fedora-extras-commits
mailing list