Author: jsmeix Date: Tue Apr 6 17:56:00 2010 New Revision: 61594 URL: http://svn.opensuse.org/viewcvs/yast?rev=61594&view=rev Log: - V 2.19.2 - HAL is deprecated and does no longer support to grant read/write device access permissions for scanners to the currently logged in "desktop" user. Therefore the HAL related code was removed (see Novell/Suse Bugzilla bnc#593946). - Implemented Novell/Suse Bugzilla bnc#578203 enhancement to show in the model selection list "unmaintained driver" and added info to the help text so that the user knows in advance whether or not he could expect some help if there are issues with an unmaintained driver. - In case of the "net" meta-backend, the [Edit] button in the OverviewDialog now also launches the "Scanning via Network" dialog even when the "net" meta-backend did not recognize a scanner (see Novell/Suse Bugzilla bnc#578104). Removed: trunk/scanner/tools/test_and_set_scanner_access_permissions Modified: trunk/scanner/package/yast2-scanner.changes trunk/scanner/src/Scanner.ycp trunk/scanner/tools/Makefile.am Modified: trunk/scanner/package/yast2-scanner.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/scanner/package/yast2-scanner.changes?rev=61594&r1=61593&r2=61594&view=diff ============================================================================== --- trunk/scanner/package/yast2-scanner.changes (original) +++ trunk/scanner/package/yast2-scanner.changes Tue Apr 6 17:56:00 2010 @@ -1,4 +1,22 @@ ------------------------------------------------------------------- +Tue Apr 6 17:43:24 CEST 2010 - jsmeix@suse.de + +- V 2.19.2 +- HAL is deprecated and does no longer support to grant read/write + device access permissions for scanners to the currently logged + in "desktop" user. Therefore the HAL related code was removed + (see Novell/Suse Bugzilla bnc#593946). +- Implemented Novell/Suse Bugzilla bnc#578203 enhancement + to show in the model selection list "unmaintained driver" + and added info to the help text so that the user knows + in advance whether or not he could expect some help + if there are issues with an unmaintained driver. +- In case of the "net" meta-backend, the [Edit] button in the + OverviewDialog now also launches the "Scanning via Network" + dialog even when the "net" meta-backend did not recognize + a scanner (see Novell/Suse Bugzilla bnc#578104). + +------------------------------------------------------------------- Thu Jan 21 17:36:27 CET 2010 - jsmeix@suse.de - V 2.19.1 Modified: trunk/scanner/src/Scanner.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/scanner/src/Scanner.ycp?rev=61594&r1=61593&r2=61594&view=diff ============================================================================== --- trunk/scanner/src/Scanner.ycp (original) +++ trunk/scanner/src/Scanner.ycp Tue Apr 6 17:56:00 2010 @@ -656,31 +656,6 @@ } /** - * Test and set scanner access permissions for USB scanners and SCSI scanners - * for resmgr via HAL by calling a bash script which does all the work. - * @return true on success - */ -boolean SetScannerAccessPermissions() -{ // Build the command line parameter: - string sane_devices = ""; - foreach( map< string, string > active_scanner, - active_scanners, - { sane_devices = sane_devices + active_scanner["sane_device"]:"unknown" + ";"; - } - ); - // Execute the command line: - if( ! ExecuteBashCommand( test_and_set_scanner_access_permissions_commandline - + " '" - + sane_devices - + "'" - ) - ) - { return false; - } - return true; -} - -/** * Test whether there exist a print queue which depends on the specified SANE backend. * Examples: * hpaio (package hplip): @@ -1853,37 +1828,6 @@ Instead use hpaio to set up the scanner. Alternatively proceed and change the printer configuration to use the ptal service. "); - string hal_does_not_know_scanner_message = - // Message of a Popup::Error when HAL does not know a scanner. - // Do not change or translate "udev", it is a subsystem name. - // Do not change or translate "HAL", it is a subsystem name. - // Do not change or translate "hal-resmgr", it is a service name. - // Do not change or translate "lshal", it is a command name. - // Do not change or translate "saned", it is a program (sane daemon) name. - // Do not confuse "scanning via network" (i.e. use a remote scanner via another host in the network) - // with "scanning the network" (i.e. scan the network for other hosts or services). - // Translate the entry "Scanning via Network" in the "Other" drop down menue - // and the button label "Local Host Configuration" so that it matches - // exactly to what is actually shown in your language in your dialogs. -_("A scanner is not known to HAL. -To access the scanner as normal user, -udev, HAL, and hal-resmgr are needed to grant -appropriate access permissions automatically. -Therefore the scanner model must be known to HAL. -If the scanner is not known to HAL, a re-plug -of a USB scanner should help. -Otherwise a reboot should be done to restart -the whole udev/HAL/hal-resmgr machinery. -Check if the scanner is listed in the lshal output. -If a SCSI scanner which was switched on during boot -is not listed in the lshal output, the usual reason -is that the kernel module for the scanner's SCSI host -adapter does not notify HAL about the scanner device. -If even a reboot does not help, you could access -the scanner via the saned as a workaround. -For this workaround choose 'Scanning via Network' -and select the 'Local Host Configuration'. -"); // Here the real code starts with proper indentation: if( backend_name == "" ) { if( database_index < 0 ) @@ -1906,7 +1850,7 @@ backend_name ), " ", - 6, + 5, [ // 1. progress stage name of a Progress::New: _("Check whether additional packages must be installed"), // 2. progress stage name of a Progress::New: @@ -1916,9 +1860,7 @@ // 4. progress stage name of a Progress::New: _("Activate the driver"), // 5. progress stage name of a Progress::New: - _("Determine active scanners"), - // 6. progress stage name of a Progress::New: - _("Test and set USB and SCSI scanner access permissions") + _("Determine active scanners") ], [ // 1. progress step progress bar title of a Progress::New: _("Checking whether additional packages must be installed..."), @@ -1930,8 +1872,6 @@ _("Activating the driver..."), // 5. progress step progress bar title of a Progress::New: _("Determining active scanners..."), - // 6. progress step progress bar title of a Progress::New: - _("Testing and setting USB and SCSI scanner access permissions..."), // Last progress step progress bar title of a Progress::New: _("Finished") ], @@ -2094,37 +2034,6 @@ Progress::NextStage(); if( ! DetermineActiveScanners() ) { active_scanners = []; - // This Progress::NextStage makes sure that - // the stage "Test and set USB and SCSI scanner access permissions" - // is shown to the user even if it is not actually executed. - // But because of the word "Test" it is not wrong to show it. - Progress::NextStage(); - } - else - { Progress::NextStage(); - if( ! SetScannerAccessPermissions() - && user_confirmation - ) - { if( 10 == result["exit"]:9999 ) - { // Special handling when the exit code is 10 which indicates - // that HAL does not know all active scanners. - Popup::ErrorDetails( hal_does_not_know_scanner_message, - // Only the stderr message shows exact information - // which scanners are unknown to HAL which is of interest - // when there is more than one scanner connected: - result["stderr"]:"" - ); - } - else - { // Whatever other error: - Popup::WarningDetails( // Message of a Popup::WarningDetails when setting scanner access permissions failed. - // Only a simple message because this error does not happen on a normal system - // (i.e. a system which is not totally broken or totally messed up). - _("Failed to set scanner access permissions.\n%1"), - result["stderr"]:"" - ); - } - } } if( ! DetermineActiveBackends() ) { active_backends = []; @@ -2280,9 +2189,6 @@ if( ! DetermineActiveScanners() ) { active_scanners = []; } - else - { SetScannerAccessPermissions(); - } if( ! DetermineActiveBackends() ) { active_backends = []; } @@ -2295,39 +2201,7 @@ * @return true on success */ global boolean TestBackend( string backend_name ) -{ // First of all the multi-line strings because such strings cannot be indented: - string hal_does_not_know_scanner_message = - // Message of a Popup::Error when HAL does not know a scanner. - // Do not change or translate "udev", it is a subsystem name. - // Do not change or translate "HAL", it is a subsystem name. - // Do not change or translate "hal-resmgr", it is a service name. - // Do not change or translate "lshal", it is a command name. - // Do not change or translate "saned", it is a program (sane daemon) name. - // Do not confuse "scanning via network" (i.e. use a remote scanner via another host in the network) - // with "scanning the network" (i.e. scan the network for other hosts or services). - // Translate the entry "Scanning via Network" in the "Other" drop down menue - // and the button label "Local Host Configuration" so that it matches - // exactly to what is actually shown in your language in your dialogs. -_("The scanner is not known to HAL. -To access the scanner as normal user, -udev, HAL, and hal-resmgr are needed to grant -appropriate access permissions automatically. -Therefore the scanner model must be known to HAL. -If the scanner is not known to HAL, a re-plug -of a USB scanner should help. -Otherwise a reboot should be done to restart -the whole udev/HAL/hal-resmgr machinery. -Check if the scanner is listed in the lshal output. -If a SCSI scanner which was switched on during boot -is not listed in the lshal output, the usual reason -is that the kernel module for the scanner's SCSI host -adapter does not notify HAL about the scanner device. -If even a reboot does not help, you could access -the scanner via the saned as a workaround. -For this workaround choose 'Scanning via Network' -and select the 'Local Host Configuration'. -"); - string sane_device = ""; +{ string sane_device = ""; // It is not possible to test a backend without a matching active scanner. // Build the table of active scanners of the backend (see ModelItems above): list< term > scanners_to_be_tested = []; @@ -2433,29 +2307,6 @@ result["stderr"]:_("(no results available)") ) ); - // Test if HAL knows the particular SANE device. - // This writes also /etc/hal/fdi/information/20thirdparty/80-scanner.fdi - // if the scanner is not listed in /usr/share/hal/fdi/information/20thirdparty/70-scanner.fdi - // (compare https://bugzilla.novell.com/show_bug.cgi?id=438867) - // which is perfectly o.k. because this could solve access permission issues - // automatically only by testing the device: - if( ! ExecuteBashCommand( test_and_set_scanner_access_permissions_commandline + " " + sane_device ) ) - { if( 10 == result["exit"]:9999 ) - { // Special handling when the exit code is 10 which indicates - // that HAL does not know the scanner. - // Show only the error message but return true nevertheless - // because the actual test via "scanimage" was successful. - Popup::ErrorDetails( hal_does_not_know_scanner_message, - sformat( // Popup::ErrorDetails details where - // %1 will be replaced by the SANE device identifier: - _("The following SANE device is not know to HAL: '%1'"), - sane_device - ) - ); - } - // Ignore any other errors of test_and_set_scanner_access_permissions - // e.g. when it fails because HAL stuff is not installed or whatever. - } return true; } Modified: trunk/scanner/tools/Makefile.am URL: http://svn.opensuse.org/viewcvs/yast/trunk/scanner/tools/Makefile.am?rev=61594&r1=61593&r2=61594&view=diff ============================================================================== --- trunk/scanner/tools/Makefile.am (original) +++ trunk/scanner/tools/Makefile.am Tue Apr 6 17:56:00 2010 @@ -11,8 +11,7 @@ setup_ptal_scanner_service \ setup_hplip_scanner_service \ determine_network_scanner_config \ - setup_network_scanner_config \ - test_and_set_scanner_access_permissions + setup_network_scanner_config EXTRA_DIST = $(ybin_SCRIPTS) -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org