Author: locilka Date: Wed Jun 11 16:01:02 2008 New Revision: 48232 URL: http://svn.opensuse.org/viewcvs/yast?rev=48232&view=rev Log: - Lslezak's patch for AddOnProducts to open up pattern selector intead of search mode (bnc #377154). Modified: branches/SuSE-SLE-10-SP3-Branch/installation/package/yast2-installation.changes branches/SuSE-SLE-10-SP3-Branch/installation/src/modules/AddOnProduct.ycp Modified: branches/SuSE-SLE-10-SP3-Branch/installation/package/yast2-installation.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/installation/package/yast2-installation.changes?rev=48232&r1=48231&r2=48232&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP3-Branch/installation/package/yast2-installation.changes (original) +++ branches/SuSE-SLE-10-SP3-Branch/installation/package/yast2-installation.changes Wed Jun 11 16:01:02 2008 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Wed Jun 11 15:59:06 CEST 2008 - locilka@suse.cz + +- Lslezak's patch for AddOnProducts to open up pattern selector + intead of search mode (bnc #377154). + +------------------------------------------------------------------- Mon Apr 21 15:32:49 CEST 2008 - locilka@suse.cz - Calling also 'xset m 1' (bnc #376945). Modified: branches/SuSE-SLE-10-SP3-Branch/installation/src/modules/AddOnProduct.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/installation/src/modules/AddOnProduct.ycp?rev=48232&r1=48231&r2=48232&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP3-Branch/installation/src/modules/AddOnProduct.ycp (original) +++ branches/SuSE-SLE-10-SP3-Branch/installation/src/modules/AddOnProduct.ycp Wed Jun 11 16:01:02 2008 @@ -960,9 +960,39 @@ return true; } +boolean AnyPatternInRepo() +{ + list<map> patterns = Pkg::ResolvableProperties("", `pattern, ""); + + y2internal("Total number of patterns: %1", size(patterns)); + + patterns = filter(map pat, patterns, + { + return (pat["source"]:nil == src_id); + } + ); + + y2milestone("Found %1 add-on patterns", size(patterns)); + y2debug("Found add-on patterns: %1", patterns); + + return size(patterns) > 0; +} + symbol DoInstall_NoControlFile () { - y2milestone("File /installation.xml not found, running sw_single for this source"); - WFM::CallFunction ("sw_single", []); + y2milestone("File /installation.xml not found, running sw_single for this repository"); + + // display pattern the dialog when there is a pattern provided by the addon + // otherwise use search mode + symbol mode = AnyPatternInRepo() ? `patternSelector : `searchMode; + + map args = $[ "dialog_type" : mode, "ask_again" : false ]; + y2internal("Arguments for sw_single: %1", args); + + any ret = WFM::CallFunction ("sw_single", [args]); + y2milestone("sw_single returned: %1", ret); + + if (ret == `abort || ret == `cancel || ret == `close) + return `abort; return `register; } @@ -1203,7 +1233,9 @@ ret = DoInstall_WithControlFile (control); } - if (ret != nil) { + y2milestone("Result of the add-on installation: %1", ret); + + if (ret != nil && ret != `abort) { // registers Add-On product if requested RegisterAddOnProduct (src_id); } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org