On 11/08/11 19:21 , Jason alavaliant wrote: > > > On Tue, Aug 9, 2011 at 11:38 PM, Peter Hutterer > <[email protected] <mailto:[email protected]>> wrote: > > On Tue, Aug 09, 2011 at 09:54:59PM +1200, Jason alavaliant wrote: > > > Now I remembered why I started and discarded previous attempts > at this: > > > The main issue with getting the driver version is that it does not > > > accommodate for backported patches. Upstream version x.y may have a > > > required > > > new feature (or bugfix) but if a distribution backports those > patches > > > without bumping the version, your client may reduce > functionality. e.g. > > > the > > > wacom driver in RHEL6 is quite different to 0.10.5, even though > > > that is the version it would report. Distributions can work > around that at > > > build-time but a client shouldn't do any run-time driver > version detection. > > > > > > Thus, it is usually better to focus on the feature you need and > determine > > > how to find out if that feature is available or not rather than > relying on > > > a single version. > > > > > > > > Fair enough, I was trying to avoid dealing with version numbers > myself but > > there is one thing I couldn't think of a way to work out without > using > > driver versions. > > > > http://linuxwacom.git.sourceforge.net/git/gitweb.cgi?p=linuxwacom/xf86-input-wacom;a=commit;h=e0354b9fde1e489bd0c87aa7f34b827ce3e27778 > > (xsetwacom: add PROP_FLAG_INVERTED for Hover Click/TPCButton) > > How would one detect if 'Wacom Hover Click' is turned on or off > by setting > > 1/0 except by checking the driver version since the behavior > changes between > > versions but the property name stays the same? > > short answer, you don't. this was a bug, it has been fixed and is > now sorted > (the PROP_INVERT addition was the reason this is actually fixed now, > unlike > the previous change in f1ecd11). > > the best choice for you is to assume correct behaviour in your > application > and pester distribution maintainers to backport bugfixes where needed. > Software has bugs, trying to work around them in your code > (especially when > they're already fixed in a released version) is a path to umaintainable > code. You'll end up with version checks, ifdefs, if (special > behaviour foo) > all over the place. > > for your own sanity, the best choice is to simply document the bug > in your > application. say something "wacom driver pre 0.11 had a bug causing the > Hover click to appear inverted" and let the user deal with > checkboxes (or whatever else) being inverted too for that version. > > Cheers, > Peter > > > Not really practical in my case, I support several hundred users at my > work and it's expected that their software works. Even though I've > installed 0.11.1 on our workstations it will take up to a few months for > everybody to reboot and and apply the update. So for now it's required > that I cover both cases.
right, so in this case you're your own distribution maintainer :) if you control the environment anyway, I'd go with xsetwacom -v and parse that output. Cheers, Peter ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-dev2dev _______________________________________________ Linuxwacom-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
