Author: jsmeix Date: Tue Feb 16 17:26:13 2010 New Revision: 60828 URL: http://svn.opensuse.org/viewcvs/yast?rev=60828&view=rev Log: In CUPS version 1.5 SCSI printer support will be dropped, see bnc#580121 and http://www.cups.org/str.php?L3500 i.e. the CUPS scsi backend will be dropped. Therefore in yast2-printer SCSI printer support is also dropped in connectionwizard.ycp and also in helps.ycp (no need to mention SCSI printers in help because almost nobody uses them). Nevertheless because of the dropped scsi backend there is at least a user notification Popup::ErrorDetails if the scsi backend is used for a queue but there is no /usr/lib*/cups/backend/scsi Modified: trunk/printer/src/connectionwizard.ycp trunk/printer/src/helps.ycp Modified: trunk/printer/src/connectionwizard.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/src/connectionwizard.ycp?rev=60828&r1=60827&r2=60828&view=diff ============================================================================== --- trunk/printer/src/connectionwizard.ycp (original) +++ trunk/printer/src/connectionwizard.ycp Tue Feb 16 17:26:13 2010 @@ -1093,90 +1093,6 @@ model_content ); break; - case(`scsi): - // Fallback message what the user may run manually when it fails - // to generate the current list of SCSI generic device nodes: - string scsi_device_list = _("It seems there are no SCSI generic devices (/dev/sg...).\nRun 'lsscsi -g' to get a list of SCSI generic devices."); - // Let the whole pipe fail if any of its commands fail (requires bash): - if( ! Printerlib::ExecuteBashCommand( "set -o pipefail ; lsscsi -g | tr -s ' ' | cut -s -d ' ' -f 3- | grep '/dev/sg' || echo 'no SCSI generic device found' 1>&2" ) ) - { Popup::ErrorDetails( // Popup::ErrorDetails message: - _("Failed to get a list of SCSI generic devices."), - "lsscsi -g" + "\n" + Printerlib::result["stderr"]:"" - ); - } - else - { if( "" != Printerlib::result["stdout"]:"" ) - { scsi_device_list = Printerlib::result["stdout"]:""; - } - } - y2milestone( "scsi_device_list '%1'", scsi_device_list ); - current_device_uri = getCurrentDeviceURI(); - string current_scsi_device_node = ""; - list <term> scsi_device_node_items = []; - if( "scsi:/" == substring( current_device_uri, 0, size( "scsi:/" ) ) ) - { // The Device URI has the form: - // scsi:/dev/sg... - // remove the scheme 'scsi:' so that only the '/dev/sg...' is left: - current_scsi_device_node = mergestring( sublist( splitstring( current_device_uri, ":" ), 1 ), "" ); - - } - boolean current_scsi_device_node_found = false; - foreach( string device_node, - [ "/dev/sg0", "/dev/sg1", "/dev/sg2", "/dev/sg3", "/dev/sg4", "/dev/sg5", "/dev/sg6", "/dev/sg7" ], - { if( current_scsi_device_node == device_node ) - { current_scsi_device_node_found = true; - // Have the current scsi device node preselected: - scsi_device_node_items = add( scsi_device_node_items, - `item( `id( device_node ), device_node, true ) - ); - } - else - { scsi_device_node_items = add( scsi_device_node_items, - `item( `id( device_node ), device_node ) - ); - } - } - ); - - if( ! current_scsi_device_node_found ) - { if( "" == current_scsi_device_node ) - { // Have an empty entry topmost and preselected to be on the safe side because - // the CUPS scsi backend may blindly write to any device, - // (see backend/scsi-linux.c in the CUPS 1.3.9 sources): - scsi_device_node_items = prepend( scsi_device_node_items, `item( `id(""), "", true ) ); - } - else - { // Have the current_scsi_device_node topmost and preselected: - scsi_device_node_items = prepend( scsi_device_node_items, - `item( `id( current_scsi_device_node ), current_scsi_device_node, true ) - ); - } - } - model_content = getContentFromCurrentModel( true ); - content = `VBox - ( `Left - ( `ComboBox - ( `id(`scsi_device_node), - `opt(`editable), - // Label for an editable ComboBox where - // a SCSI generic device node (e.g. /dev/sg0 or /dev/sg1) - // can be selected or entered: - _("&SCSI generic device"), - scsi_device_node_items - ) - ), - `Left - ( `Frame - ( // TRANSLATORS: Frame label for a list of SCSI generic devices: - _("Currently available SCSI generic devices"), - // The RichText widget is required here to get scroll bars if needed - // (a Label cuts the content because it does not provide scroll bars): - `RichText( "<pre>" + scsi_device_list + "</pre>" ) - ) - ), - model_content - ); - break; // network printer case(`tcp): hostname = ""; @@ -1988,9 +1904,7 @@ // TRANSLATORS: Tree widget item `item( `id(`serial), _("Serial Port") ), // TRANSLATORS: Tree widget item - `item( `id(`bluetooth), _("Bluetooth") ), - // TRANSLATORS: Tree widget item - `item( `id(`scsi), _("SCSI") ) + `item( `id(`bluetooth), _("Bluetooth") ) ] ), `item @@ -2108,8 +2022,22 @@ changeSettingsDialog( `bluetooth ); } else if( "scsi:/" == substring( current_device_uri, 0, size( "scsi:/" ) ) ) - { UI::ChangeWidget( `tree_selection, `CurrentItem, `scsi ); - changeSettingsDialog( `scsi ); + { // In CUPS 1.5 SCSI printer support will be dropped, + // see https://bugzilla.novell.com/show_bug.cgi?id=580121 + // and http://www.cups.org/str.php?L3500 + // i.e. the scsi backend will be dropped. + // Therefore in yast2-printer SCSI printer support is also dropped. + // Because of the dropped scsi backend there must be a user notification: + if( ! Printerlib::ExecuteBashCommand( "ls /usr/lib*/cups/backend/scsi" ) ) + { Popup::ErrorDetails( // Popup::ErrorDetails message: + _("In CUPS version 1.5 SCSI printer support is dropped."), + // Popup::ErrorDetails details (for experts only): + _("An untested and insecure workaround might be\nto set 'FileDevice Yes' in cupsd.conf\nand use a DeviceURI like 'file:/dev/sg...'") + ); + } + // In this case "Specify Arbitrary Device URI" is used as fallback: + UI::ChangeWidget( `tree_selection, `CurrentItem, `uri ); + changeSettingsDialog( `uri ); } else if( "socket:/" == substring( current_device_uri, 0, size( "socket:/" ) ) ) { UI::ChangeWidget( `tree_selection, `CurrentItem, `tcp ); @@ -2253,19 +2181,6 @@ valid = true; } break; - case(`scsi): - string scsi_device_node = (string)UI::QueryWidget( `scsi_device_node, `Value ); - if( size( scsi_device_node ) == 0 ) - { Popup::Error( _("SCSI generic device could not be empty.") ); - } - else - { // It would be wrong to do URIpercentEncoding(scsi_device_node) - // because scsi_device_node is e.g. '/dev/sg1' which must stay as is - // to result a valid 'scsi' URI like 'scsi:/dev/sg1': - connection_uri = "scsi:" + scsi_device_node; - valid = true; - } - break; case(`uri): case(`ipp): connection_uri = (string)UI::QueryWidget( `uri, `Value ); @@ -2512,7 +2427,6 @@ break; case(`serial): case(`bluetooth): - case(`scsi): case(`uri): case(`ipp): case(`smb): Modified: trunk/printer/src/helps.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/src/helps.ycp?rev=60828&r1=60827&r2=60828&view=diff ============================================================================== --- trunk/printer/src/helps.ycp (original) +++ trunk/printer/src/helps.ycp Tue Feb 16 17:26:13 2010 @@ -489,16 +489,14 @@ To access a HP printer or all-in-one device via the backend 'hp', the RPM package hplip must be installed. The package provides HP's printing and scanning software HPLIP.<br> -In contrast devices which are connected via serial port, bluetooth, -or SCSI are usually not autodetected so that the device URI must be -manually specified. +In contrast devices which are connected via serial port or bluetooth +are not autodetected so that the device URI must be manually specified. The serial device URI parameters must comply with what the serial port in the printer requires, see the manual of your serial printer. Example device URIs:<br> serial:/dev/ttyS9?baud=9600+bits=8+parity=none+flow=soft+stop=1<br> bluetooth://1A2B3C4D5E6F<br> -scsi:/dev/sg9<br> To access a device via bluetooth, the RPM package bluez-cups must be installed. The package provides the CUPS backend 'bluetooth' which actually sends the data to a bluetooth printer. -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org