|
Bugzilla – Full Text Bug Listing |
| Summary: | add a test to yast2-scanner if HAL knows about a configured scanner | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 11.1 | Reporter: | Johannes Meixner <jsmeix> |
| Component: | YaST2 | Assignee: | Johannes Meixner <jsmeix> |
| Status: | RESOLVED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Enhancement | ||
| Priority: | P5 - None | CC: | kontakt |
| Version: | Alpha 0 | ||
| Target Milestone: | Beta 1 | ||
| Hardware: | All | ||
| OS: | SUSE Other | ||
| Whiteboard: | |||
| Found By: | Development | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: | test_and_set_scanner_access_permissions | ||
|
Description
Johannes Meixner
2007-11-08 13:20:46 UTC
A first idea: for d in $( scanimage -L \ | grep -o 'libusb:[0-9][0-9][0-9]:[0-9][0-9][0-9]' \ | cut -s -d ':' -f2- | tr ':' '/' ) do lshal \ | egrep 'info.capabilities.*scanner|linux.device_file' \ | grep -q "linux.device_file.*/dev/bus/usb/$d" \ && echo $d ok \ || echo $d failed done Created attachment 209590 [details]
test_and_set_scanner_access_permissions
Added tests to test_and_set_scanner_access_permissions
if HAL knows about the scanner and show an explanatory
error message if not. Because of the YaST 'text freeze'
this message cannot be translated for openSUSE 11.0
so that currently it is only a simple stderr message.
Fixed as good as possible for openSUSE 11.0. Will make it an enhancement for openSUSE 11.1 to move the explanatory error message into the YCP source so that it will be translated. Reopened as enhancement for openSUSE 11.1 to move the explanatory error message into the YCP source so that it will be translated. There is an interesting side effect of bug #347943 (full automated USB scanner setup via udev): When the SANE driver was set up full automated via udev there is of course no access permission test as in test_and_set_scanner_access_permissions because such a test would be useless because as far as I know there is no method in udev to notify the user when something failed (in particular when udev runs during system boot when no user is logged in). I fear that most scanners which exist out there in the real world are listed in /etc/udev/rules.d/56-sane-backends-autoconfig.rules so that they would be set up full automated so that for most users out there in the real world there cannot be any notification when the access permissions are insufficient. In those cases scanning just does not work and a normal user has no information at all what is wrong. Welcome to the hell of full automated setup... I think I found a solution for the problem in comment #5: I will add the access permission test also to /usr/lib/YaST2/bin/test_scanner_backend which is run when clicking [Test] in yast2-scanner. Then the workflow is as follows: 1) The full automated USB scanner setup via udev activates the matching scanner driver but it cannot do an access permissions test as described in comment #5 2) If access permissions are sufficient (the normal case) the user can use his scanner out-of-the-box. 3) If access permissions are not sufficient, the user cannot use the scanner and because of this he runs the YaST scanner setup module. 4) The YaST scanner setup module runs as root and therefore it can access the the scanner and reports it as "configured". Now the user hopefully finds the "Other" -> "Test" function. Because root can access the the scanner, the actual scanning test will be successful but the new additional access permissions test would notice insufficient permissions for normal users so that YaST can report an appropriate message to the user to inform him what is actually wrong. Fix for next openSUSE version. Fixed in yast2-scanner-2.17.1 (submited to FACTORY right now) which should appear in openSUSE 11.1 beta1 |