Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 301887 - sci-geosciences/gpsd loses udev remove events
Summary: sci-geosciences/gpsd loses udev remove events
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Steve Arnold
URL:
Whiteboard:
Keywords: Inclusion
Depends on:
Blocks:
 
Reported: 2010-01-23 08:28 UTC by Sam Revitch
Modified: 2010-02-13 20:06 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Revitch 2010-01-23 08:28:35 UTC
The gpsd program, and its bundled 99-gpsd-usb.rules file, are handling udev "add" events correctly for me.  However, for some reason, the "remove" events are not being matched correctly by the rules file.  After two suspend/resume cycles with a GPS device left plugged in, this problem causes gpsd to become inoperable.

This problem was seen with gpsd-2.39-r1, udev-146-r1, and a kernel built from gentoo-sources-2.6.31-r6.

The working "add" line from the Gentoo rules file goes like this:

ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", SUBSYSTEM=="tty", ACTION=="add", KERNEL=="ttyUSB[0-9]*", SYMLINK="gps%n", RUN+="/etc/hotplug/usb/gpsd.hotplug add $root/%k"

The non-working "remove" line is very similar:

ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", SUBSYSTEM=="tty", ACTION=="remove", KERNEL=="ttyUSB[0-9]*", RUN+="/etc/hotplug/usb/gpsd.hotplug remove $root/%k"

The following remove line seems to do the job:

ENV{ID_VENDOR_ID}=="067b", ENV{ID_MODEL_ID}=="2303", SUBSYSTEM=="tty", ACTION=="remove", KERNEL=="ttyUSB[0-9]*", RUN+="/etc/hotplug/usb/gpsd.hotplug remove $root/%k"
Comment 1 Steve Arnold archtester gentoo-dev 2010-02-13 20:06:52 UTC
Fixed in portage.  Thanks; I just love how udev and kernel behavior changes over time with respect to custom rules...