[sane-devel] As instructed by /etc/udev/rules.d/libsane.rules

Richard Ryniker ryniker at alum.mit.edu
Thu Nov 19 22:40:20 UTC 2009


Udev rules are never likely to be a "stable interface".  Hardware
devices and connection mechanisms change over time, therefore new and
different information will be produced; the events recognized and
reported may change as the kernel's structure evolves; additional
function in the applications that interpret udev rules in response to
events may demand different udev semantics.

Your suggestion to have a user-oriented application that manipulates
udev rules is sensible, though the same factors that force changes in
udev semantics will likely mean this application also changes, albeit
in a more controlled way from the perspective of the user.  There are
lots of examples where this sort of application has been written for
other facilities.  One example: the init scripts in /etc/rc.d were
messy to manipulate, so "chkconfig" was written to allow one to see
and change a service's configuration without the need to manipulate a
raft of symlinks in half a dozen directories. "ntsysv" was written to
provide an interactive alternative to the command-line chkconfig
program.  Some distributions have even fancier, graphical userfaces,
such as system-config-services in Fedora.

I think SANE is not the right place to develop a udev
rules-manipulation application.  SANE may assist some other effort
with scanner specifics, but we recognize that udev rules is a
complicated business: an applicaiton to create and manipulate these
rules will be a serious piece of work, will need to address the needs
of diverse sets of users and devices, and will require some
organization to maintain it as udev changes below and user needs
change above it.

It is surprising that such an application has not already been
written.  Maybe it has, and I simply have not heard of it.  Perhaps
some have tried, but failed because udev information and requirements
changed faster than they could adapt their code.



More information about the sane-devel mailing list