Author: jsrain Date: Wed May 14 14:37:41 2008 New Revision: 47525 URL: http://svn.opensuse.org/viewcvs/yast?rev=47525&view=rev Log: use process agent instead of background agent when installing live image (bnc #384960) Modified: trunk/installation/VERSION trunk/installation/package/yast2-installation.changes trunk/installation/src/modules/ImageInstallation.ycp Modified: trunk/installation/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/VERSION?rev=47525&r1=47524&r2=47525&view=diff ============================================================================== --- trunk/installation/VERSION (original) +++ trunk/installation/VERSION Wed May 14 14:37:41 2008 @@ -1 +1 @@ -2.16.44 +2.16.45 Modified: trunk/installation/package/yast2-installation.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/package/yast2-installation.changes?rev=47525&r1=47524&r2=47525&view=diff ============================================================================== --- trunk/installation/package/yast2-installation.changes (original) +++ trunk/installation/package/yast2-installation.changes Wed May 14 14:37:41 2008 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Wed May 14 14:29:21 CEST 2008 - jsrain@suse.cz + +- use process agent instead of background agent when installing + live image (bnc #384960) +- 2.16.45 + +------------------------------------------------------------------- Mon May 12 15:10:50 CEST 2008 - locilka@suse.cz - Added help to "Image Deployment" (bnc #388665). Modified: trunk/installation/src/modules/ImageInstallation.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/modules/ImageInstallation.ycp?rev=47525&r1=47524&r2=47525&view=diff ============================================================================== --- trunk/installation/src/modules/ImageInstallation.ycp (original) +++ trunk/installation/src/modules/ImageInstallation.ycp Wed May 14 14:37:41 2008 @@ -797,35 +797,31 @@ tar -C %2 -xSf %4", from, to, tmp_pipe1, tmp_pipe2); y2milestone ("Executing %1", cmd); - SCR::Execute(.background.run_output_err, cmd); + integer process = (integer)SCR::Execute(.process.start_shell, cmd, $[]); string pid = ""; - while((boolean)SCR::Read(.background.output_open_err) || (boolean)(SCR::Read(.background.newlines_err) > 0)) + while((boolean)SCR::Read(.process.running, process)) { string done = nil; - if ((integer)SCR::Read (.background.newlines_err) > 0) + string line = (string)SCR::Read (.process.read_line_stderr, process); + while (line != nil) { - list<string> lines = (list<string>)SCR::Read (.background.newerr); - while (pid == "" && size (lines) > 0) + if (pid == "") { - pid = lines[0]:""; - lines[0] = nil; - lines = filter (string l, lines, { return l != nil; }); - if (! regexpmatch (pid, sformat ("dd bs=1048576 if=%1 of=%2", tmp_pipe1, tmp_pipe2))) + if (! regexpmatch (line, sformat ("dd bs=1048576 if=%1 of=%2", tmp_pipe1, tmp_pipe2))) pid = ""; else { - pid = regexpsub (pid, "([0-9]+) [^ 0-9]+ +dd", "\\1"); + pid = regexpsub (line, "([0-9]+) [^ 0-9]+ +dd", "\\1"); y2milestone ("DD's pid: %1", pid); // sleep in order not to kill -USR1 to dd too early, otherwise it finishes sleep (5000); } } - foreach (string l, lines, { - if (regexpmatch (l, "^[0-9]+ ")) - done = regexpsub (l, "^([0-9]+) ", "\\1"); - }); + else if (regexpmatch (line, "^[0-9]+ ")) + done = regexpsub (line, "^([0-9]+) ", "\\1"); y2debug ("Done: %1", done); + line = (string)SCR::Read (.process.read_line_stderr, process); } if (pid != "") { @@ -842,7 +838,7 @@ } } - y2milestone ("Result: %1", SCR::Read (.background.status)); + y2milestone ("Result: %1", SCR::Read (.process.status, process)); SCR::Execute (.target.remove, tmp_pipe1); SCR::Execute (.target.remove, tmp_pipe2); cmd = sformat ("chown --reference=%1 %2; chmod --reference=%1 %2", @@ -1068,4 +1064,4 @@ // <-- Storing and restoring states -} \ No newline at end of file +} -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org