[yast-devel] Re: [yast-commit] r66973 - /branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/complex.ycp
On Wed, 30 Nov 2011 09:58:13 -0000 gs@svn2.opensuse.org wrote:
Author: gs Date: Wed Nov 30 10:58:12 2011 New Revision: 66973
URL: http://svn.opensuse.org/viewcvs/yast?rev=66973&view=rev Log: don't allow to change AUTO_VLAN setting for a configured device, call fcoeadm -d correctly
Modified: branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/complex.ycp
Modified: branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/complex.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/complex.ycp?rev=66973&r1=66972&r2=66973&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/complex.ycp (original) +++ branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/complex.ycp Wed Nov 30 10:58:12 2011 @@ -83,7 +83,10 @@ y2milestone( "Calling %1", command ); map output = (map)SCR::Execute( .target.bash_output, command ); y2milestone( "Output: %1", output ); - + if ( output["exit"]:255 != 0 ) + { + Popup::Error( sformat( _("Command %1 failed"), command ) ); + }
Hi, I see this as quite common practice in YaST and I don't like it much. 1) I am user and I see this error Command <blabla> failed. What it means for me? is something broken? what should I do? retry it? report bug? Also it would be nice if there is details section which add e.g. stderr output for experienced users. 2) You report error, fine. So I am user and click OK and YaST continue doing something ( your error is in foreach loop that run set of commands ). This is very strange behavior for me. Josef -- Josef Reidinger Software Engineer Appliance Department SUSE LINUX, s. r. o. Lihovarska 1060/12 190 00 Praha 9 Czech Republic jreidinger@suse.com SUSE -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
Am 01.12.2011 13:00, schrieb Josef Reidinger:
On Wed, 30 Nov 2011 09:58:13 -0000 gs@svn2.opensuse.org wrote:
Author: gs Date: Wed Nov 30 10:58:12 2011 New Revision: 66973
URL: http://svn.opensuse.org/viewcvs/yast?rev=66973&view=rev Log: don't allow to change AUTO_VLAN setting for a configured device, call fcoeadm -d correctly
Modified: branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/complex.ycp
Modified: branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/complex.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/complex.ycp?rev=66973&r1=66972&r2=66973&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/complex.ycp (original) +++ branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/complex.ycp Wed Nov 30 10:58:12 2011 @@ -83,7 +83,10 @@ y2milestone( "Calling %1", command ); map output = (map)SCR::Execute( .target.bash_output, command ); y2milestone( "Output: %1", output ); - + if ( output["exit"]:255 != 0 ) + { + Popup::Error( sformat( _("Command %1 failed"), command ) ); + }
Hi, I see this as quite common practice in YaST and I don't like it much. 1) I am user and I see this error Command<blabla> failed. What it means for me? is something broken? what should I do? retry it? report bug? Also it would be nice if there is details section which add e.g. stderr output for experienced users. I have added more information about the failure to the popup text.
2) You report error, fine. So I am user and click OK and YaST continue doing something ( your error is in foreach loop that run set of commands ). This is very strange behavior for me. It's a loop of commands to call in case of 'Cancel' to revert the creation of FCoE interfaces. This means YaST doesn't continue to do (to configure) something but only tries to revert changes.
Josef
-- Gabriele Mohr SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstr. 5 Tel: +49 911 740 53 362 90409 Nürnberg Email: gs@suse.de ----------------------------------------------------------------- -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
On 01.12.2011 13:00, Josef Reidinger wrote:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/complex.ycp?rev=66973&r1=66972&r2=66973&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/complex.ycp (original) +++ branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/complex.ycp Wed Nov 30 10:58:12 2011 @@ -83,7 +83,10 @@ y2milestone( "Calling %1", command ); map output = (map)SCR::Execute( .target.bash_output, command ); y2milestone( "Output: %1", output ); - + if ( output["exit"]:255 != 0 ) + { + Popup::Error( sformat( _("Command %1 failed"), command ) ); + }
I'm not sure if that code can run during autoinstallation but I think so. Then it's better to use Report::Error(....) because autoyast can timeout a Report::.... call but a Popup::.... call will always block autoyast. -- ciao, Uwe Gansert SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer Home: http://www.suse.de/~ug - Blog: http://suse.gansert.net -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
Am 01.12.2011 14:44, schrieb Uwe Gansert:
On 01.12.2011 13:00, Josef Reidinger wrote:
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/complex.ycp (original) +++ branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/complex.ycp Wed Nov 30 10:58:12 2011 @@ -83,7 +83,10 @@ y2milestone( "Calling %1", command ); map output = (map)SCR::Execute( .target.bash_output, command ); y2milestone( "Output: %1", output ); - + if ( output["exit"]:255 != 0 ) + { + Popup::Error( sformat( _("Command %1 failed"), command ) ); + }
I'm not sure if that code can run during autoinstallation but I think so. Then it's better to use Report::Error(....) because autoyast can timeout a Report::.... call but a Popup::.... call will always block autoyast. This popup only can appear if the user clicks on 'Cancel', so I think, no problem here for autoyast. But a good hint: I have several popups e.g. about failing services when starting the FCoE module, there I will change the code to use Report::Warning()/Error().
-- Gabriele Mohr SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstr. 5 Tel: +49 911 740 53 362 90409 Nürnberg Email: gs@suse.de ----------------------------------------------------------------- -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
participants (3)
-
Gabriele Mohr
-
Josef Reidinger
-
Uwe Gansert