Bug 630572

Summary: gvfs-gphoto2 needs a patch to work properly with libgphoto2 >= 2.4.10
Product: [Fedora] Fedora Reporter: Hans de Goede <hdegoede>
Component: gvfsAssignee: Tomáš Bžatek <tbzatek>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: alexl, bnocera, fabrice, gene-redhat, tbzatek, tsmetana
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: gvfs-1.6.4-3.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-04 23:36:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
suggested patch none

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.