View | Details | Raw Unified | Return to bug 148683
Collapse All | Expand All

(-)library/desktop/src/menu.ycp (-4 / +12 lines)
Lines 80-87 Link Here
80
 */
80
 */
81
define boolean Launch(string modul) {
81
define boolean Launch(string modul) {
82
    string function = Modules[modul, "X-SuSE-YaST-Call"]:"";
82
    string function = Modules[modul, "X-SuSE-YaST-Call"]:"";
83
    list arguments = splitstring(Modules[modul, "X-SuSE-YaST-Argument"]:"", " ");
83
    string argument = Modules[modul, "X-SuSE-YaST-Argument"]:"";
84
    y2debug("Calling: %1 (%2)", function, arguments);
84
    y2debug("Calling: %1 (%2)", function, argument);
85
85
86
    if(function != "") {
86
    if(function != "") {
87
	list<string> packages = [];
87
	list<string> packages = [];
Lines 95-102 Link Here
95
		return substring (p, 0, 5) == "yast2";
95
		return substring (p, 0, 5) == "yast2";
96
	    }));
96
	    }));
97
	}
97
	}
98
	any ret = WFM::CallFunction (function, arguments);
98
99
	y2debug("WFM::CallFunction (%1, %2) returns: %3", function, arguments, ret);
99
	// #148683
100
	// A separate process instead of WFM::CallFunction is cleaner.
101
	// yast2 would run qt if we ran it from ncurses xterm
102
	// OTOH yast will not run xterm if menu.ycp is run manually with qt.
103
	// But they're not supposed to do that anyway.
104
	string cmd = sformat ("/sbin/yast %1 %2 >&2", function, argument);
105
	any ret = SCR::Execute (.target.bash, cmd);
106
	y2milestone ("Got %1 from %2", ret, cmd);
107
100
	// online_update always returns 0, so the ret value checking
108
	// online_update always returns 0, so the ret value checking
101
	//  makes no sense
109
	//  makes no sense
102
	if (function == "online_update"/* && ret != `abort*/)
110
	if (function == "online_update"/* && ret != `abort*/)

Return to bug 148683