Summary: | add hotplug support for sane-backends 1.0.14 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | jochen <jochen.eisinger> |
Component: | Current packages | Assignee: | Patrick Kursawe (RETIRED) <phosphan> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | m.debruijne, radek |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
jochen
2004-05-03 01:44:35 UTC
1.0.14 is in portage since yesterday - about the hotplug support, I will have some trouble testing this since I don't have a scanner. Can you help me testing if I manage to make some ebuild from the README and your hints? (summary line adjusted) Sure. In my local ebuild, I have added this to src_compile: cd tools/hotplug cat libsane.usermap | grep -v '^$' > libsane.usermap.new mv libsane.usermap.new libsane.usermap and this to src_install: cd tools/hotplug insinto /etc/hotplug/usb doins libsane.usermap libusbscanner newdoc README README.hotplug cd ../.. both times right after the make invocation Did like you said, seems to do everything necessary in -r1. Please give it a try, re-open if there's a problem. Thanks! the ebuild works nice, however there is a small detail missing: the file /etc/hotplug/usb/libusbscanner should be executable There is another issue with libusbscanner: The script does not work with the latest versions of hotplug (20040401) and 2.6.x kernels. Hotplug uses the information in /sys/bus/usb/devices/* and leaves the $DEVICE variable (which should identify the device in /proc/bus/usb/*) empty. A workaround for this problem: if [ -z "$DEVICE" ] ; then IF=`echo $DEVPATH | sed 's/\(bus\/usb\/devices\/\)\(.*\)-\(.*\)/\2/'` DEV=`echo $DEVPATH | sed 's/\(bus\/usb\/devices\/\)\(.*\)-\(.*\)/\3/'` DEV=`expr $DEV + 1` DEVICE=`printf '/proc/bus/usb/%.03d/%.03d' $IF $DEV` fi oh, cool thanks for the tip, I fixed it in SANE's cvs there's another problem: gentoo doesn't have group scanner, so either you add group scanner or change root:scanner to root:whatever in libusbscanner -r2 should fix these issues. Thanks for your help. |