The udev rules generated by print-camera-list (in 136 mode) unconditionally set ID_MEDIA_PLAYER to 1. This is fragile in the presence of media-player-info, which also sets ID_MEDIA_PLAYER for the devices it recognises, but sets it to the name of the associated mpi file.
I'm not sure what the solution for this is (it may well be that distros must make sure these rules are processed before media-player-info's, although this is clearly something that's easy to get wrong: Archlinux, for example, has the rules files the wrong way around). But I think there needs to be a decision made in conjunction with the media-player-info project.
Corresponding media-player-info bug: https://bugs.freedesktop.org/show_bug.cgi?id=31641
Well, the GVFS and Ubuntu developers told us to mark all the MTP Music players known to us with this tag.
Hmm... perhaps the media-player-info rules should use := to set ID_MEDIA_PLAYER in such a way that it won't be overridden.
correct me if i am wrong, but media-player-infocould just have a higher udev rule priority, so it gets to overwrite the tag all the time.
That's true, but this is largely down to the distros, and hence needs to be documented somewhere for them.
It is still beneficial that the libgphoto rules tag known music players, then rhythmbox, banshee, and friends will pick them up automatically.
So as already explained, this could be fixed in the arch linux etc. packages, to generate udev rules which sort before 40-usb-media-players.rules (unfortunately libgphoto2 upstream does not have a predefined name for the rules, so different distros just picked different names).
However, I like the idea with using := in m-p-i, I'll do that (and track it in the referenced bug).
So as far as I can see, we can close this upstream ticket.
Thanks! Martin
then close
On second thought, we shouldn't use :=, because that would prevent users from locally fixing their media-player-info data (which is eternally prone to being incomplete and incorrect, so that people use local customizations all the time).
Also, it doesn't even work for me with udev 164 (see fd.o bug); I'll have a look why, but I think the best answer here is to fix the arch linux packages.
I've already reported the issue to the arch packager, and it will be fixed in the next release of the libgphoto2 package.
Sticking with the status quo is fine, as long as it's documented for packagers. I think maybe m-p-i's README and print-camera-list's help should note the potential ordering issues here.
Copying Martin Pitt's comment from the m-p-i bug:
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"