[yast-commit] r62598 - in /trunk/packager: VERSION package/yast2-packager.changes src/modules/SourceDialogs.ycp
Author: lslezak Date: Tue Oct 12 11:49:15 2010 New Revision: 62598 URL: http://svn.opensuse.org/viewcvs/yast?rev=62598&view=rev Log: - repo mgr: don't change URL when nothing has changed in the URL dialog (bnc#529944) - 2.20.2 Modified: trunk/packager/VERSION trunk/packager/package/yast2-packager.changes trunk/packager/src/modules/SourceDialogs.ycp Modified: trunk/packager/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/VERSION?rev=62598&r1=62597&r2=62598&view=diff ============================================================================== --- trunk/packager/VERSION (original) +++ trunk/packager/VERSION Tue Oct 12 11:49:15 2010 @@ -1 +1 @@ -2.20.1 +2.20.2 Modified: trunk/packager/package/yast2-packager.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/package/yast2-packager.changes?rev=62598&r1=62597&r2=62598&view=diff ============================================================================== --- trunk/packager/package/yast2-packager.changes (original) +++ trunk/packager/package/yast2-packager.changes Tue Oct 12 11:49:15 2010 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Tue Oct 12 09:39:59 UTC 2010 - lslezak@suse.cz + +- repo mgr: don't change URL when nothing has changed in the URL + dialog (bnc#529944) +- 2.20.2 + +------------------------------------------------------------------- Tue Oct 5 10:45:54 UTC 2010 - lslezak@suse.cz - install yast2-online-update-configuration package if needed Modified: trunk/packager/src/modules/SourceDialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/src/modules/SourceDialogs.ycp?rev=62598&r1=62597&r2=62598&view=diff ============================================================================== --- trunk/packager/src/modules/SourceDialogs.ycp (original) +++ trunk/packager/src/modules/SourceDialogs.ycp Tue Oct 12 11:49:15 2010 @@ -1258,7 +1258,18 @@ void ServerStoreParts() { symbol type = (symbol) UI::QueryWidget( `id( `rb_type), `CurrentButton ); - map parsed = $[]; + + // initialize keys to empty values so the new and old values can be simply compared + map parsed = $[ + "fragment":"", + "host":"", + "pass":"", + "path":"", + "port":"", + "query":"", + "scheme":"", + "user":"" + ]; if ( type == `ftp ) parsed["scheme"] = "ftp"; else if ( type == `http ) @@ -1330,16 +1341,29 @@ parsed["port"] = (string)UI::QueryWidget(`id(`port), `Value); } - // do not log the entered password - y2milestone("Entered URL: %1", URL::HidePasswordToken(parsed)); - _url = URL::Build (parsed); - y2milestone("URL::Build: %1", URL::HidePassword(_url)); - - if (UI::WidgetExists (`id (`ch_iso))) - { - boolean iso = (boolean)UI::QueryWidget (`id (`ch_iso), `Value); - if (iso) - _url = PosprocessISOURL (_url); + // keep the URL if user haven't changed anything (don't change escaped chars bnc#529944) + map parsed_old = URL::Parse(_url); + if (parsed == parsed_old) + { + y2milestone("No change, NOT updating the complete URL"); + y2debug("Unchanged URL: %1"); + } + else + { + y2milestone("A change detected, updating complete URL"); + y2debug("Updating the URL: %1 -> %2", parsed_old, parsed); + + // do not log the entered password + y2milestone("Entered URL: %1", URL::HidePasswordToken(parsed)); + _url = URL::Build (parsed); + y2milestone("URL::Build: %1", URL::HidePassword(_url)); + + if (UI::WidgetExists (`id (`ch_iso))) + { + boolean iso = (boolean)UI::QueryWidget (`id (`ch_iso), `Value); + if (iso) + _url = PosprocessISOURL (_url); + } } } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
lslezak@svn2.opensuse.org