This is really just to link with the bug I filed at gphoto2 (https://sourceforge.net/tracker/?func=detail&atid=108874&aid=3109848&group_id=8874). The crux of the matter is that the rules that gphoto2's print-camera-list utility and the rules provided by media-player-info overlap in terms of devices (there are currently 14 devices matched by both sets of rules) and both sets of rules set ID_MEDIA_PLAYER, but to different values (gphoto2 always sets it to "1"). If the rules are run the right way around, this will actually work. But it's very fragile. Some decision really needs to be made about it, and that decision made public (in the README files at the very least).
Perhaps the media-player-info rules should use := to set ID_MEDIA_PLAYER in such a way that it won't be overridden.
Alex, I just tried :=, but it does not actually work for me. Does it for you? Which udev version are you using? I tested this by creating a file /lib/udev/rules.d/90-test.rules with -------- ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="0bb4" , ATTRS{idProduct}=="0c01|0c02" , ENV{ID_MEDIA_PLAYER}="1" SUBSYSTEM=="block", ATTRS{idVendor}=="0bb4" , ATTRS{idProduct}=="0c01|0c02" , ENV{ID_MEDIA_PLAYER}="1" --------- and now plugging in my G1 causes $ udevadm info --export-db|grep MEDIA_PLAYER E: ID_MEDIA_PLAYER=1 E: ID_MEDIA_PLAYER=1 even if I use := in /lib/udev/rules.d/40-usb-media-players.rules.
I can't think of a way how to fix this in the m-p-i rules. A better fix for this would be to change the libgphoto2 rules to only set ID_MEDIA_PLAYER if it isn't set already; I realize that this is a bit fiddly, but it could e. g. set ID_MEDIA_PLAYER_MTP=1, and then have a rule like ENV{ID_MEDIA_PLAYER_MTP}=="1", ENV{ID_MEDIA_PLAYER}=="", ENV{ID_MEDIA_PLAYER}="1"
Sorry, I can't forward the comment to the sourceforge bug, it seems their recent password recovery broke my account.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.