Bug 630572 - gvfs-gphoto2 needs a patch to work properly with libgphoto2 >= 2.4.10
Summary: gvfs-gphoto2 needs a patch to work properly with libgphoto2 >= 2.4.10
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gvfs
Version: 14
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Tomáš Bžatek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-09-06 08:56 UTC by Hans de Goede
Modified: 2015-03-03 22:52 UTC (History)
6 users (show)

Fixed In Version: gvfs-1.6.4-3.fc14
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-04 23:36:05 UTC
Type: ---


Attachments (Terms of Use)
suggested patch (609 bytes, patch)
2010-10-11 13:49 UTC, Fabrice Bellet
no flags Details | Diff

Description Hans de Goede 2010-09-06 08:56:25 UTC
Hi,

The below mail was send to the gphoto2 mailinglist a couple of days ago, I've not checked but F-14 has the involved gvfs and libgphoto2 versions so this likely needs to be fixed in F-14 too:

###

Hello list!

As you probably know, GVFS has its gphoto2 backend which detects USB
cameras by listening to (g)udev events having ID_GPHOTO2 property set.
When a camera gets plugged in, it runs this exact code:

#v+
port = g_strdup_printf ("usb:%d,%d", bus_num, device_num);

/* Connect to the camera */
context = gp_context_new ();
if (gp_camera_new (&camera) != 0)
  goto out;
if (gp_port_info_list_new (&il) != 0)
  goto out;
if (gp_port_info_list_load (il) != 0)
  goto out;
n = gp_port_info_list_lookup_path (il, port);
if (n == GP_ERROR_UNKNOWN_PORT)
  goto out;
if (gp_port_info_list_get_info (il, n, &info) != 0)
  goto out;
if (gp_camera_set_port_info (camera, info) != 0)
  goto out;
gp_port_info_list_free (il);
il = NULL;
if (gp_camera_init (camera, context) != 0)
  goto out;
#v-

I've just spent quite some time investigating why gp_camera_init()
fails. Boy, that was fun! It turns out that since svn revision 13242 and
13245 libgphoto2 doesn't like when the specified port string differs in
format from what libgphoto2 autodetects: "usb:3,21" vs "usb:003,021".

Do you think it's a GVFS "bug" or not necessarily? My current workaround
is to patch gvfs ("usb:%03d,%03d").

BTW, I find it ugly that libgphoto2 autodetects what was already
autodetected by udev (rules generated by gphoto's own
`print-camera-list`).

Cheers.

PS. GNOME users running libgphoto2 >= 2.4.10 and gvfs <= 1.6.3 are going
    to be PISSED :)

###

Regards,

Hans

Comment 1 Fabrice Bellet 2010-10-11 13:49:14 UTC
Created attachment 452712 [details]
suggested patch

I confirm that this patch works for me.

Comment 2 Fedora Update System 2010-11-01 15:40:42 UTC
gvfs-1.6.4-3.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/gvfs-1.6.4-3.fc14

Comment 3 Fedora Update System 2010-11-02 22:15:34 UTC
gvfs-1.6.4-3.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update gvfs'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/gvfs-1.6.4-3.fc14

Comment 4 Fedora Update System 2010-11-04 23:35:56 UTC
gvfs-1.6.4-3.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.