Author: lslezak Date: Tue Apr 28 20:41:34 2009 New Revision: 57015
URL: http://svn.opensuse.org/viewcvs/yast?rev=57015&view=rev Log: - removed the extra error popup when adding a repository fails (bnc#269034)
Modified: trunk/packager/package/yast2-packager.changes trunk/packager/src/include/repositories_include.ycp
Modified: trunk/packager/package/yast2-packager.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/package/yast2-packager.c... ============================================================================== --- trunk/packager/package/yast2-packager.changes (original) +++ trunk/packager/package/yast2-packager.changes Tue Apr 28 20:41:34 2009 @@ -2,6 +2,8 @@ Tue Apr 28 16:33:41 CEST 2009 - lslezak@suse.cz
- use URL.ycp for processing smb:// URLs (bnc#495109) +- removed the extra error popup when adding a repository fails + (bnc#269034)
------------------------------------------------------------------- Thu Apr 23 17:16:36 CEST 2009 - lslezak@suse.cz
Modified: trunk/packager/src/include/repositories_include.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/src/include/repositories... ============================================================================== --- trunk/packager/src/include/repositories_include.ycp (original) +++ trunk/packager/src/include/repositories_include.ycp Tue Apr 28 20:41:34 2009 @@ -159,7 +159,7 @@ const string iso_prefix = "iso:"; if (substring(url, 0, size(iso_prefix)) == iso_prefix) { - y2milestone("ISO image detected, disabling autorefresh (%1)", url); + y2milestone("ISO image detected, disabling autorefresh (%1)", URL::HidePassword(url)); auto_refresh = false; }
@@ -167,7 +167,7 @@ boolean cd_scheme = contains(["cd", "dvd"], tolower(URL::Parse(url)["scheme"]:"")); if (cd_scheme) { - y2milestone("CD/DVD repository detected, disabling autorefresh (%1)", url); + y2milestone("CD/DVD repository detected, disabling autorefresh (%1)", URL::HidePassword(url)); auto_refresh = false; }
@@ -255,7 +255,10 @@
Progress::NextStage(); integer new_repo_id = Pkg::RepositoryAdd(repo_prop); - y2milestone("Added repository: %1: %2", new_repo_id, repo_prop); + + map<string,any> repo_prop_log = repo_prop; + repo_prop_log["base_urls"] = [ URL::HidePassword(url) ]; + y2milestone("Added repository: %1: %2", new_repo_id, repo_prop_log);
newSources = add(newSources, new_repo_id);
@@ -279,27 +282,32 @@
if ( size( newSources ) == 0 ) { - // popup message part 1 - string _msg1 = sformat( _("Unable to create repository -from URL '%1'."), URL::HidePassword(url) ); + y2error("Cannot add the repository");
if (regexpmatch(url, "\.iso$")) { + // popup message part 1 + string msg = sformat( _("Unable to create repository +from URL '%1'."), URL::HidePassword(url) ); + map parsed_url = URL::Parse(url); string scheme = tolower(parsed_url["scheme"]:"");
if (contains(["ftp", "sftp", "http", "https"], scheme)) { // error message - _msg1 = _msg1 + "\n\n" + _("Using an ISO image over ftp or http protocol is not possible.\nChange the protocol or unpack the ISO image on the server side."); + msg = msg + "\n\n" + _("Using an ISO image over ftp or http protocol is not possible. +Change the protocol or unpack the ISO image on the server side."); + + // popup message part 2 + msg = msg + "\n\n" + _("Change the URL and try again?"); + + boolean tryagain = Popup::YesNo(msg); + if (tryagain) return `again; } } - // popup message part 2 - string _msg2 = _("Try again?");
- boolean tryagain = Popup::YesNo( _msg1 + "\n" + Pkg::LastError() + "\n" + _msg2 ); - if ( tryagain ) return `again; - else return `cancel; + return `cancel; } else {
yast-commit@lists.opensuse.org