[yast-commit] r52771 - in /trunk/registration: package/yast2-registration.changes src/clients/inst_suse_register.ycp src/modules/Register.ycp src/modules/YSR.pm

Author: jdsn Date: Thu Oct 30 21:20:08 2008 New Revision: 52771 URL: http://svn.opensuse.org/viewcvs/yast?rev=52771&view=rev Log: check for w3m in textmode registration (bnc#440289) reset registration backend before exiting Modified: trunk/registration/package/yast2-registration.changes trunk/registration/src/clients/inst_suse_register.ycp trunk/registration/src/modules/Register.ycp trunk/registration/src/modules/YSR.pm Modified: trunk/registration/package/yast2-registration.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/registration/package/yast2-regist... ============================================================================== --- trunk/registration/package/yast2-registration.changes (original) +++ trunk/registration/package/yast2-registration.changes Thu Oct 30 21:20:08 2008 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Thu Oct 30 21:09:12 CET 2008 - jdsn@suse.de + +- check for w3m in textmode registration (bnc#440289) +- reset registration backend before exiting + +------------------------------------------------------------------- Wed Oct 29 16:32:31 CET 2008 - jdsn@suse.de - remove requires to sles-release Modified: trunk/registration/src/clients/inst_suse_register.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/registration/src/clients/inst_sus... ============================================================================== --- trunk/registration/src/clients/inst_suse_register.ycp (original) +++ trunk/registration/src/clients/inst_suse_register.ycp Thu Oct 30 21:20:08 2008 @@ -517,45 +517,41 @@ // create the command string to launch a browser string bcmd="/bin/false"; boolean cmd_ok = false; + string required_package = ""; + string checkBinary = ""; if ( textmode ) { - cmd_ok = (integer) SCR::Execute(.target.bash, "test -x /usr/bin/w3m") == 0 ? true:false; - if ( ! cmd_ok ) - { - y2error("Textmode installation requires w3m for interactive registration. w3m is missing."); - } bcmd = " w3m "; + required_package = "w3m"; + checkBinary = "/usr/bin/w3m"; } else { - // see if xulrunner is already there (bnc#435872) - cmd_ok = (integer) SCR::Execute(.target.bash, "test -x /usr/bin/xulrunner") == 0 ? true:false; - - if ( ! cmd_ok ) - { - // check for and install mozilla-xulrunner if needed (#175166), modified due to (#304310), modified due to (bnc#435872) - string required_package = "mozilla-xulrunner190"; - if (!Package::Installed(required_package)) - { - Package::InstallAllMsg([required_package], nil); - } - } - cmd_ok = (integer) SCR::Execute(.target.bash, "test -x /usr/bin/xulrunner") == 0 ? true:false; + bcmd = " MOZ_DISABLE_PANGO=1 /usr/bin/xulrunner /usr/share/YaST2/yastbrowser/application.ini -url "; + required_package = "mozilla-xulrunner190"; + checkBinary = "/usr/bin/xulrunner"; + } - if ( ! cmd_ok ) + cmd_ok = (integer) SCR::Execute(.target.bash, sformat("test -x %1"), checkBinary) == 0 ? true:false; + if ( ! cmd_ok ) + { + if (!Package::Installed(required_package)) { - y2error("Graphical installation requires Mozilla-xulrunner for interactive registration. Mozilla-xulrunner is missing."); + Package::InstallAllMsg([required_package], nil); } - - bcmd = " MOZ_DISABLE_PANGO=1 /usr/bin/xulrunner /usr/share/YaST2/yastbrowser/application.ini -url "; + cmd_ok = (integer) SCR::Execute(.target.bash, sformat("test -x %1", checkBinary)) == 0 ? true:false; } - if (! cmd_ok) + if ( ! cmd_ok ) { - y2error("No browser found for interactive registration."); + y2error("No browser found for interactive registration. A needed package was not installed: %1", required_package); return "nobrowser"; } + else + { + y2milestone("A browser was found to show the interactive registration: %1", required_package); + } // add url to browser command @@ -1073,11 +1069,6 @@ if (Mode::normal()) { - // (bnc#395333) -// y2milestone ("Current sources: %1", Pkg::SourceGetCurrent (true)); - // #172665 -// Pkg::SourceSaveAll(); -// Pkg::TargetFinish (); Wizard::CloseDialog(); } else Modified: trunk/registration/src/modules/Register.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/registration/src/modules/Register... ============================================================================== --- trunk/registration/src/modules/Register.ycp (original) +++ trunk/registration/src/modules/Register.ycp Thu Oct 30 21:20:08 2008 @@ -903,6 +903,22 @@ { iamroot = amIroot(); write_config(); + // reset YSRs context + YSR::del_ctx(); + isInitializedSR = false; + if ( isInitializedTarget ) + { + y2milestone("Package target was initialized. Now finishing target usage."); + if ( Pkg::TargetFinish() ) + { + y2milestone("Successfully finished the target usage of the package system."); + isInitializedTarget = false; + } + else + { + y2error("Could not finish the target usage of the package system."); + } + } } Modified: trunk/registration/src/modules/YSR.pm URL: http://svn.opensuse.org/viewcvs/yast/trunk/registration/src/modules/YSR.pm?r... ============================================================================== --- trunk/registration/src/modules/YSR.pm (original) +++ trunk/registration/src/modules/YSR.pm Thu Oct 30 21:20:08 2008 @@ -38,7 +38,12 @@ { my $self = shift; - SUSE::SuseRegister::del_ctx($global_ctx); + if(defined $global_ctx && ref($global_ctx) eq "HASH" && exists $global_ctx->{debug}) + { + # only call del_ctx if it is initialized + SUSE::SuseRegister::del_ctx($global_ctx); + } + $global_ctx = {}; } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
jdsn@svn.opensuse.org