Author: jdsn Date: Thu Nov 27 22:47:23 2008 New Revision: 53677 URL: http://svn.opensuse.org/viewcvs/yast?rev=53677&view=rev Log: fix restoring the default update repository (bnc#444301) 2.17.16 Modified: trunk/registration/VERSION trunk/registration/package/yast2-registration.changes trunk/registration/src/clients/online_update_configuration.ycp trunk/registration/src/modules/OnlineUpdateConfiguration.ycp Modified: trunk/registration/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/registration/VERSION?rev=53677&r1=53676&r2=53677&view=diff ============================================================================== --- trunk/registration/VERSION (original) +++ trunk/registration/VERSION Thu Nov 27 22:47:23 2008 @@ -1 +1 @@ -2.17.15 +2.17.16 Modified: trunk/registration/package/yast2-registration.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/registration/package/yast2-registration.changes?rev=53677&r1=53676&r2=53677&view=diff ============================================================================== --- trunk/registration/package/yast2-registration.changes (original) +++ trunk/registration/package/yast2-registration.changes Thu Nov 27 22:47:23 2008 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Thu Nov 27 21:08:07 CET 2008 - jdsn@suse.de + +- fix restoring the default update repository (bnc#444301) +- 2.17.16 + +------------------------------------------------------------------- Mon Nov 24 12:27:12 CET 2008 - jdsn@suse.de - call other modules via WFM (bnc#447043) Modified: trunk/registration/src/clients/online_update_configuration.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/registration/src/clients/online_update_configuration.ycp?rev=53677&r1=53676&r2=53677&view=diff ============================================================================== --- trunk/registration/src/clients/online_update_configuration.ycp (original) +++ trunk/registration/src/clients/online_update_configuration.ycp Thu Nov 27 22:47:23 2008 @@ -49,6 +49,8 @@ /* --------------------------------------------------------------------------------------------------------------- */ + Pkg::SourceStartManager(true); + // check if we are in installation workflow or running independently if (Mode::normal()) Wizard::CreateDialog(); @@ -68,8 +70,9 @@ string replaceUpdateRepoString = OnlineUpdateConfiguration::currentUpdateRepo; - if ( OnlineUpdateConfiguration::currentUpdateRepo == OnlineUpdateConfiguration::defaultUpdateRepo && - OnlineUpdateConfiguration::currentUpdateRepo != "" ) + + if ( OnlineUpdateConfiguration::compareUpdateURLs( OnlineUpdateConfiguration::currentUpdateRepo, + OnlineUpdateConfiguration::defaultUpdateRepo, false ) ) {// in this case - we have default update repo installed replaceUpdateRepoString = OnlineUpdateConfiguration::currentUpdateRepo + " " + defaultMark; UI::ChangeWidget(`id(`restoreDefault), `Enabled, false); @@ -77,7 +80,9 @@ else { // in this case - custom or no update repo if ( replaceUpdateRepoString == "" ) replaceUpdateRepoString = noRepo; - UI::ChangeWidget(`id(`restoreDefault), `Enabled, true); + + boolean hasUpRepo = (OnlineUpdateConfiguration::defaultUpdateRepo != "" && OnlineUpdateConfiguration::defaultUpdateRepo != nil ); + UI::ChangeWidget(`id(`restoreDefault), `Enabled, hasUpRepo); } // write data to the UI @@ -165,14 +170,25 @@ { y2milestone("Refetching current updateRepoURL."); replaceUpdateRepoString = OnlineUpdateConfiguration::fetchCurrentUpdateRepoURL(); + + string mark = ""; + if ( OnlineUpdateConfiguration::compareUpdateURLs( replaceUpdateRepoString, + OnlineUpdateConfiguration::defaultUpdateRepo, false) ) + { + mark = " " + defaultMark; + UI::ChangeWidget(`id(`restoreDefault), `Enabled, false); + } y2milestone("Current updateRepoURL is: %1", replaceUpdateRepoString); - UI::ChangeWidget(`id(`currentRepoURL), `Value, replaceUpdateRepoString); + UI::ChangeWidget(`id(`currentRepoURL), `Value, replaceUpdateRepoString + mark); + UI::RecalcLayout(); } } until (ret == `next || ret == `abort || ret == `cacel || ret == `back); + Pkg::SourceFinishAll(); + if (! is(ret, symbol)) ret = `next; Wizard::CloseDialog(); Modified: trunk/registration/src/modules/OnlineUpdateConfiguration.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/registration/src/modules/OnlineUpdateConfiguration.ycp?rev=53677&r1=53676&r2=53677&view=diff ============================================================================== --- trunk/registration/src/modules/OnlineUpdateConfiguration.ycp (original) +++ trunk/registration/src/modules/OnlineUpdateConfiguration.ycp Thu Nov 27 22:47:23 2008 @@ -55,14 +55,25 @@ // fetch product details about installed products list