Author: lslezak Date: Fri Apr 10 17:36:36 2009 New Revision: 56760 URL: http://svn.opensuse.org/viewcvs/yast?rev=56760&view=rev Log: - repository manager - do not refresh CD/DVD repositories after changing the name, correctly display current scheme (CD/DVD), preserve device options when changing the repository name (bnc#469193) - 2.18.5 Modified: trunk/packager/VERSION trunk/packager/package/yast2-packager.changes trunk/packager/src/clients/repositories.ycp trunk/packager/src/modules/SourceDialogs.ycp Modified: trunk/packager/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/VERSION?rev=56760&r1=56759&r2=56760&view=diff ============================================================================== --- trunk/packager/VERSION (original) +++ trunk/packager/VERSION Fri Apr 10 17:36:36 2009 @@ -1 +1 @@ -2.18.4 +2.18.5 Modified: trunk/packager/package/yast2-packager.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/package/yast2-packager.changes?rev=56760&r1=56759&r2=56760&view=diff ============================================================================== --- trunk/packager/package/yast2-packager.changes (original) +++ trunk/packager/package/yast2-packager.changes Fri Apr 10 17:36:36 2009 @@ -1,4 +1,13 @@ ------------------------------------------------------------------- +Fri Apr 10 16:48:28 CEST 2009 - lslezak@suse.cz + +- repository manager - do not refresh CD/DVD repositories after + changing the name, correctly display current scheme (CD/DVD), + preserve device options when changing the repository name + (bnc#469193) +- 2.18.5 + +------------------------------------------------------------------- Wed Apr 8 10:38:15 CEST 2009 - lslezak@suse.cz - Slideshow fixes - display additional rpm output in the Modified: trunk/packager/src/clients/repositories.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/src/clients/repositories.ycp?rev=56760&r1=56759&r2=56760&view=diff ============================================================================== --- trunk/packager/src/clients/repositories.ycp (original) +++ trunk/packager/src/clients/repositories.ycp Fri Apr 10 17:36:36 2009 @@ -969,7 +969,32 @@ url = SourceDialogs::EditPopupType(url, plaindir); if ( size( url ) == 0 ) break; - if (url != old_url || plaindir != SourceDialogs::IsPlainDir()) + + boolean same_url = (url == old_url); + + // special check for cd:// and dvd:// repositories + if (!same_url) + { + map new_url_parsed = URL::Parse(url); + map old_url_parsed = URL::Parse(old_url); + + string new_url_scheme = tolower(new_url_parsed["scheme"]:""); + string old_url_scheme = tolower(old_url_parsed["scheme"]:""); + + // ignore cd:// <-> dvd:// changes if the path is not changed + if ((new_url_scheme == "cd" || new_url_scheme == "dvd") + && (old_url_scheme == "cd" || old_url_scheme == "dvd")) + { + // compare only directories, ignore e.g. ?device=/dev/sr0 options + if (new_url_parsed["path"]:"" == old_url_parsed["path"]:"") + { + Pkg::SourceChangeUrl(sourceState[ "SrcId" ]:-1, url); + same_url = true; + } + } + } + + if (!same_url || plaindir != SourceDialogs::IsPlainDir()) { y2milestone ("URL or plaindir flag changed, recreating the source"); // copy the refresh flag Modified: trunk/packager/src/modules/SourceDialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/src/modules/SourceDialogs.ycp?rev=56760&r1=56759&r2=56760&view=diff ============================================================================== --- trunk/packager/src/modules/SourceDialogs.ycp (original) +++ trunk/packager/src/modules/SourceDialogs.ycp Fri Apr 10 17:36:36 2009 @@ -566,10 +566,9 @@ map parsed = URL::Parse (_url); string scheme = parsed["scheme"]:""; if (scheme == "dvd") - UI::ChangeWidget (`id (`cd), `Value, true); - else UI::ChangeWidget (`id (`dvd), `Value, true); - UI::SetFocus (`cd); + else + UI::ChangeWidget (`id (`cd), `Value, true); } /** @@ -579,9 +578,14 @@ */ void CDStore (string key, map event) { symbol device = (symbol)UI::QueryWidget (`id (`device), `CurrentButton); - if (device == `cd) + map parsed = URL::Parse (_url); + string scheme = tolower(parsed["scheme"]:""); + + // preserve other URL options, e.g. ?devices=/dev/sr0 + // change the URL only when necessary + if (device == `cd && scheme != "cd") _url = "cd:///"; - else + else if (device == `dvd && scheme != "dvd") _url = "dvd:///"; } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org