After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 588786 - 1.3.2 regression: wrong usb host/port
1.3.2 regression: wrong usb host/port
Status: RESOLVED NOTABUG
Product: gvfs
Classification: Core
Component: gphoto backend
1.3.x
Other Linux
: Normal major
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2009-07-16 15:14 UTC by Martin Pitt
Modified: 2009-07-16 16:14 UTC
See Also:
GNOME target: ---
GNOME version: 2.27/2.28



Description Martin Pitt 2009-07-16 15:14:50 UTC
The recent Interaction when unmounting mounts and misc fixes"
commit (8af5a558) in 1.3.2 causes the gphoto backend to use wrong USB host/port numbers. When I plug in my camera, I get this device:

Bus 001 Device 018: ID 04a9:3073 Canon, Inc. PowerShot A70 (ptp)

$ gphoto2 --auto-detect
[...]
Canon PowerShot A70 (PTP)      usb:001,018     

However, gvfsd-gphoto2 gets:

initing 0x96d0e0
try_mount 0x96d0e0
  host=[usb:001,001]
do_mount 0x96d0e0
  host='[usb:001,001]'
  decoded host='usb:001,001'
Parsed 'usb:001,001' into bus=1 device=1
looking at usb device '/org/freedesktop/Hal/devices/usb_device_413c_58_noserial_if0_0' with bus=1, device=3
  gphoto2_port='usb:001,001'
  'Generischer Port' 'usb:001,001' '/usr/lib/libgphoto2_port/0.8.0/usb'
Using ignore_prefix='/store_00010001/'
  can_write = 1
  mounted 0x96d0e0

I. e. thinks that the device is number 001. This causes device names to look like "

  Mount(0): Digitalkamera (usb:001,001) -> gphoto2://[usb:001,001]/

(since it cannot read the hal properties) and also causes them to not get auto-unmounted any more (since the port doesn't match). The same problem occurs with the gudev port (bug 586410).

If I revert above commit, things start to work perfectly again.
Comment 1 Martin Pitt 2009-07-16 16:14:31 UTC
Ah, please ignore me, this was apparently a red herring:

    g_debug ("gudev_add_camera: %s %i", 
            g_udev_device_get_property(device, "DEVNUM"), 
            g_udev_device_get_property_as_int (device, "DEVNUM"));

(process:19482): GVFS-GPhoto2-DEBUG: gudev_add_camera: 022 18

Seems that g_udev_device_get_property_as_int() is clever about octal numbers, and the previous tries just happened to have invalid octal numbers (such as '8').

I'm sorry for the noise!