[Pkg-phototools-devel] Bug#859695: libgphoto: detects mounted file system as camera if dcim dir exists
Greg Schmidt
g_w_schmidt at yahoo.com
Thu Apr 6 06:06:22 UTC 2017
Package: libgphoto2-6
Version: 2.5.12-1
Severity: normal
File: libgphoto
Dear Maintainer,
Camera auto detection [libgphoto2_port/disk/disk.c gp_port_library_list()] will detect a mount point as a camera if a dcim directory exists. Although some mount points are excluded if a certain name or type is seen. This strategy allows other mount points to become cameras if a dcim directory is created.
This was confusing. Since autodetect is a default. I just expected that it would detect my camera and get files from there. But it found this other disk partition and was manipulating its files. Since I was using darktable it was scattering sidecar files all over my HOME directory and putting a bunch of cruft in its database.
Wouldn't it be better if the user/admin had to specify what disks could be treated as cameras. I renamed the dcim directory. The mount point was no longer a camera! Now I just need to clean up darktable.
Home directories on my system are lvm partitions, and are listed in /etc/fstab and /etc/mtab if a user creates a dcim directory at his home gphoto will detect his home directory as a camera.
greg at desk1:~$ mount | grep greg
/dev/mapper/blue-greg on /home/greg type ext4 (rw,relatime,data=ordered)
greg at desk1:~$ ls -ld dcim
drwx------ 3 greg greg 4096 Dec 4 00:45 dcim
greg at desk1:~$ gphoto2 --auto-detect
Model Port
----------------------------------------------------------
Mass Storage Camera disk:/home/greg
greg at desk1:~$ gphoto2 --camera "Canon EOS 6D" --list-files |& sed -n '1,20p'
There is 1 file in folder '/'.
#1 18_thumbnail_transparency_cover_2line.jpgrd 151 KB image/jpeg
There is no file in folder '/2galaxy'.
There are 74 files in folder '/2galaxy/Movies'.
#2 20160921172251_000.mp4 r- 47998 KB video/mpeg
#3 20160921172332_000.mp4 r- 117527 KB video/mpeg
#4 20160923180316_000.mp4 r- 68226 KB video/mpeg
#5 20160923180442_000.mp4 r- 143261 KB video/mpeg
#6 20160923180747_000.mp4 r- 74846 KB video/mpeg
#7 20160923180935_000.mp4 r- 36521 KB video/mpeg
#8 20160923181044_000.mp4 r- 225977 KB video/mpeg
#9 20160923181256_000.mp4 r- 58056 KB video/mpeg
#10 20160923190051_000.mp4 r- 140511 KB video/mpeg
#11 20160923190201_000.mp4 r- 106950 KB video/mpeg
#12 20160923191509_000.mp4 r- 132658 KB video/mpeg
#13 20160923191848_000.mp4 r- 82084 KB video/mpeg
#14 20160923192707_000.mp4 r- 32796 KB video/mpeg
#15 20160923193003_000.mp4 r- 87834 KB video/mpeg
#16 20160923193911_000.mp4 r- 119231 KB video/mpeg
#17 20160923194307_000.mp4 r- 40583 KB video/mpeg
I didn't test the --delete-all-files option :)
-- System Information:
Debian Release: 9.0
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 4.9.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages libgphoto2-6:amd64 depends on:
ii libc6 2.24-9
ii libexif12 0.6.21-2+b2
ii libgd3 2.2.4-2
ii libgphoto2-port12 2.5.12-1
ii libjpeg62-turbo 1:1.5.1-2
ii libltdl7 2.4.6-2
ii libxml2 2.9.4+dfsg1-2.2
Versions of packages libgphoto2-6:amd64 recommends:
ii libgphoto2-l10n 2.5.12-1
Versions of packages libgphoto2-6:amd64 suggests:
ii gphoto2 2.5.11-1
-- no debconf information
More information about the Pkg-phototools-devel
mailing list