Hello community,
here is the log from the commit of package yast2-installation
checked in at Fri Apr 25 15:09:08 CEST 2008.
--------
--- yast2-installation/yast2-installation.changes 2008-04-22 17:18:10.000000000 +0200
+++ /mounts/work_src_done/NOARCH/yast2-installation/yast2-installation.changes 2008-04-24 14:59:00.000000000 +0200
@@ -1,0 +2,19 @@
+Thu Apr 24 14:54:53 CEST 2008 - locilka@suse.cz
+
+- New better shiny unified progress for image deployment.
+- Showing also the just-handled image name (bnc #381188).
+- 2.16.39
+
+-------------------------------------------------------------------
+Wed Apr 23 15:10:24 CEST 2008 - locilka@suse.cz
+
+- Enabling inst_suseconfig in Automatic configuration (bnc #381751)
+- Fixed run_df agent to ignore read errors on rootfs (bnc #382733)
+
+-------------------------------------------------------------------
+Tue Apr 22 18:46:51 CEST 2008 - locilka@suse.cz
+
+- Adjusting automatic configuration UI to use two progress bars
+ instead of one.
+
+-------------------------------------------------------------------
Old:
----
yast2-installation-2.16.38.tar.bz2
New:
----
yast2-installation-2.16.39.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-installation.spec ++++++
--- /var/tmp/diff_new_pack.x30106/_old 2008-04-25 15:09:00.000000000 +0200
+++ /var/tmp/diff_new_pack.x30106/_new 2008-04-25 15:09:00.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-installation (Version 2.16.38)
+# spec file for package yast2-installation (Version 2.16.39)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -12,12 +12,12 @@
Name: yast2-installation
-Version: 2.16.38
+Version: 2.16.39
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-installation-2.16.38.tar.bz2
+Source0: yast2-installation-2.16.39.tar.bz2
Prefix: /usr
BuildRequires: docbook-xsl-stylesheets doxygen libxslt perl-XML-Writer sgml-skel update-desktop-files yast2-core-devel yast2-devtools yast2-testsuite
# PackageCallbacks::RegisterEmptyProgressCallbacks()
@@ -106,7 +106,7 @@
Lukas Ocilka
%prep
-%setup -n yast2-installation-2.16.38
+%setup -n yast2-installation-2.16.39
%build
%{prefix}/bin/y2tool y2autoconf
@@ -172,6 +172,16 @@
%exclude %{prefix}/share/doc/packages/yast2-installation/COPYING
%exclude %{prefix}/share/doc/packages/yast2-installation/README
%changelog
+* Thu Apr 24 2008 locilka@suse.cz
+- New better shiny unified progress for image deployment.
+- Showing also the just-handled image name (bnc #381188).
+- 2.16.39
+* Wed Apr 23 2008 locilka@suse.cz
+- Enabling inst_suseconfig in Automatic configuration (bnc #381751)
+- Fixed run_df agent to ignore read errors on rootfs (bnc #382733)
+* Tue Apr 22 2008 locilka@suse.cz
+- Adjusting automatic configuration UI to use two progress bars
+ instead of one.
* Tue Apr 22 2008 locilka@suse.cz
- Fixed filtering-out already registered repos (bnc #379051).
- Client inst_prepare_image moved to installation proposal make
++++++ yast2-installation-2.16.38.tar.bz2 -> yast2-installation-2.16.39.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-installation-2.16.38/agents/run_df.scr new/yast2-installation-2.16.39/agents/run_df.scr
--- old/yast2-installation-2.16.38/agents/run_df.scr 2008-04-17 11:08:34.000000000 +0200
+++ new/yast2-installation-2.16.39/agents/run_df.scr 2008-04-23 17:22:12.000000000 +0200
@@ -34,7 +34,7 @@
* "whole":"23300"],
* ])
*
- * $Id: run_df.scr 13018 2003-12-11 12:52:53Z jhumpol $
+ * $Id: run_df.scr 47005 2008-04-23 15:19:35Z locilka $
*
* Returns a <b>list of maps</b>. Each map (list-entry) corresponds
* with one mount.
@@ -45,7 +45,7 @@
`ag_anyagent(
`Description (
- (`Run("/bin/df -P")), // real file name
+ (`Run("/bin/df -P 2>/dev/null")), // real file name
"\n", // Comment
true, // read-only
(`List (
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-installation-2.16.38/src/clients/inst_automatic_configuration.ycp new/yast2-installation-2.16.39/src/clients/inst_automatic_configuration.ycp
--- old/yast2-installation-2.16.38/src/clients/inst_automatic_configuration.ycp 2008-04-17 11:08:36.000000000 +0200
+++ new/yast2-installation-2.16.39/src/clients/inst_automatic_configuration.ycp 2008-04-22 18:52:44.000000000 +0200
@@ -15,8 +15,8 @@
import "FileUtils";
import "Directory";
import "GetInstArgs";
- import "Progress";
import "Wizard";
+ import "Progress";
textdomain "installation";
@@ -25,10 +25,17 @@
return `auto;
}
- y2milestone ("automatic_configuration started");
+ boolean test_mode = false;
+
+ if (size (WFM::Args()) > 0 && is (WFM::Args(0), string)) {
+ y2milestone ("Args: %1", WFM::Args());
+ if (WFM::Args(0) == "test")
+ test_mode = true;
+ }
+
+ if (test_mode) Wizard::CreateDialog();
- Mode::SetMode ("installation");
- Stage::Set ("continue");
+ y2milestone ("automatic_configuration started");
// TODO: read this from control file
// (at least the list of modules in proposals)
@@ -107,6 +114,9 @@
if (! UI::TextMode()) {
y2milestone ("Printing >don't panic 0 && current_sub_step > 0 && nr_of_sub_steps >= current_sub_step) {
- progress_title = sformat (
- // TRANSLATORS: Progress step label
- // %1 - text defined by script, e.g., "Configuring hardware..."
- // %2 - number of the current step
- // %3 - number of all steps
- // Finally, it might look like this "Configuring hardware... (2/5)"
- _("%1 (%2/%3)"),
- progress_title,
- current_sub_step,
- nr_of_sub_steps
- );
- }
+ UI::ChangeWidget (`id ("one_set_progress"), `Value, current_sub_step);
+ UI::ChangeWidget (`id ("autoconf_progress"), `Value, current_step);
+ }
- Progress::Title (progress_title);
- Progress::Step (current_step);
+ void DummyFunction () {
+ sleep (random (1600));
}
- void CallScripts (list <string> scripts_to_call, string progress_title) {
+ void CallScripts (list <string> scripts_to_call) {
y2milestone ("Scripts to call: %1", scripts_to_call);
scripts_to_call = NormalizeScriptNames (scripts_to_call);
- // every single script has one step
- ResetSubSteps (size (scripts_to_call));
foreach (string one_script, scripts_to_call, {
y2milestone ("Calling script %1", one_script);
- NextStep (progress_title);
+ NextStep();
boolean progress_before = Progress::set (false);
- any result = WFM::CallFunction (one_script, [ $["AutomaticConfiguration":true] ]);
+ any result = (
+ test_mode ?
+ DummyFunction()
+ :
+ WFM::CallFunction (one_script, [ $["AutomaticConfiguration":true] ])
+ );
Progress::set (progress_before);
y2milestone ("Script %1 returned %2", one_script, result);
});
}
- void CallProposals (list <string> proposals_to_call, string progress_title) {
+ void CallProposals (list <string> proposals_to_call) {
y2milestone ("Scripts to call: %1", proposals_to_call);
proposals_to_call = NormalizeProposalNames (proposals_to_call);
- // every single proposal has two steps
- ResetSubSteps (2 * size (proposals_to_call));
foreach (string one_proposal, proposals_to_call, {
y2milestone ("Calling script %1 MakeProposal", one_proposal);
- NextStep (progress_title);
+ NextStep();
boolean progress_before = Progress::set (false);
HandleExceptions (one_proposal);
- any result = WFM::CallFunction (one_proposal, ["MakeProposal", $[ "AutomaticConfiguration":true ]]);
+ any result = (
+ test_mode ?
+ DummyFunction()
+ :
+ WFM::CallFunction (one_proposal, ["MakeProposal", $[ "AutomaticConfiguration":true ]])
+ );
Progress::set (progress_before);
y2milestone ("Script %1 returned %2", one_proposal, result);
@@ -201,12 +201,16 @@
foreach (string one_proposal, proposals_to_call, {
y2milestone ("Calling script %1 Write", one_proposal);
- NextStep (progress_title);
+ NextStep();
boolean progress_before = Progress::set (false);
- any result = WFM::CallFunction (one_proposal, ["Write", $[ "AutomaticConfiguration":true ]]);
+ any result = (
+ test_mode ?
+ DummyFunction()
+ :
+ WFM::CallFunction (one_proposal, ["Write", $[ "AutomaticConfiguration":true ]])
+ );
- Progress::set (progress_before);
y2milestone ("Script %1 returned %2", one_proposal, result);
});
}
@@ -219,39 +223,68 @@
((one_autoconf_call["type"]:"" == "proposals" ? 2:1) * size (one_autoconf_call["items"]:[]));
});
- Progress::Simple(
+ Wizard::SetContents (
_("Automatic Configuration"),
- "",
- nr_of_steps,
- _("<p>Installation is currently writing the automatic configuration. Please wait...</p>")
+ `VBox (
+ // faster progress
+ `ReplacePoint(
+ `id ("rp_one_set_progress"),
+ `ProgressBar (
+ `id ("one_set_progress"),
+ _("Preparing configuration..."),
+ 100,
+ 0
+ )
+ ),
+ // overall-autoconf progress
+ `ProgressBar (
+ `id ("autoconf_progress"),
+ _("Creating automatic configuration..."),
+ nr_of_steps,
+ 0
+ )
+ ),
+ _("<p>Installation is currently writing the automatic configuration. Please wait...</p>"),
+ false, false
);
foreach (map one_autoconf_call, proposal_scripts_to_call, {
string type = one_autoconf_call["type"]:"";
- string progress_title = one_autoconf_call["label"]:_("Automatic configuration...");
+ // reset the faster prgress
+ current_sub_step = 0;
+ UI::ReplaceWidget (`id ("rp_one_set_progress"),
+ `ProgressBar (
+ `id ("one_set_progress"),
+ one_autoconf_call["label"]:_("Automatic configuration..."),
+ ((one_autoconf_call["type"]:"" == "proposals" ? 2:1) * size (one_autoconf_call["items"]:[])),
+ 0
+ )
+ );
+ y2milestone ("Steps: %1", ((one_autoconf_call["type"]:"" == "proposals" ? 2:1) * size (one_autoconf_call["items"]:[])));
+ y2milestone ("Label: %1", one_autoconf_call["label"]:_("Automatic configuration..."));
switch (type) {
case "scripts":
- CallScripts (one_autoconf_call["items"]:[], progress_title);
+ CallScripts (one_autoconf_call["items"]:[]);
break;
case "proposals":
- CallProposals (one_autoconf_call["items"]:[], progress_title);
+ CallProposals (one_autoconf_call["items"]:[]);
break;
y2error ("Unknown script type '%1'", type);
}
});
- Progress::Finish();
-
y2milestone ("automatic_configuration finished");
- Wizard::SetContents (
- _("Automatic Configuration"),
- `Label (_("Finishing configuration...")),
- "",
- false, false
- );
+// Wizard::SetContents (
+// _("Automatic Configuration"),
+// `Label (_("Finishing configuration...")),
+// "",
+// false, false
+// );
+
+ if (test_mode) Wizard::CloseDialog();
return `auto;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-installation-2.16.38/src/clients/inst_deploy_image.ycp new/yast2-installation-2.16.39/src/clients/inst_deploy_image.ycp
--- old/yast2-installation-2.16.38/src/clients/inst_deploy_image.ycp 2008-04-17 13:58:46.000000000 +0200
+++ new/yast2-installation-2.16.39/src/clients/inst_deploy_image.ycp 2008-04-24 15:23:16.000000000 +0200
@@ -5,6 +5,7 @@
import "Wizard";
import "SourceManager";
import "String";
+import "PackageCallbacks";
textdomain "installation";
@@ -14,51 +15,124 @@
return `auto;
}
-y2milestone ("Deploying image");
+y2milestone ("Deploying images");
list<string> images = ImageInstallation::ImageOrder ();
integer last_image = nil;
-/**
- * Set the progress
- * @param image integer the number of image
- * @param percent integer the percentage of the particular image
- */
-void SetProgress (integer image, integer percent) {
- if (percent >= 100)
- image = image + 1;
-
- if (image != last_image) {
- last_image = image;
- if (image < size (images)) {
- UI::ChangeWidget (
- `id ("deploying_progress"),
- `Label,
- sformat (_("Deploying Images (%1/%2)..."), (image + 1), size (images))
- );
+integer _last_download_progress = -1;
+
+integer _current_overall_progress = 0;
+integer _last_overall_progress = -1;
+
+integer _current_subprogress_start = 0;
+integer _current_subprogress_steps = 0;
+integer _current_subprogress_total = 0;
+
+integer _current_step_in_subprogress = 0;
+
+string _previous_id = nil;
+
+void SetProgress () {
+ integer percent = 100 * _current_step_in_subprogress / _current_subprogress_total;
+ UI::ChangeWidget (`id ("one_image"), `Value, percent);
+}
+
+void OverallProgressHandler (string id, integer current_step) {
+ // new set of steps
+ if (_previous_id != id) {
+ // reset steps in subprogress
+ _current_step_in_subprogress = 0;
+
+ // new settings for new step
+ _current_subprogress_start = ImageInstallation::GetProgressLayoutDetails (id, "steps_start_at");
+ _current_subprogress_steps = ImageInstallation::GetProgressLayoutDetails (id, "steps_reserved");
+ _current_subprogress_total = ImageInstallation::GetProgressLayoutDetails (id, "steps_total");
+
+ // div by zero!
+ if (_current_subprogress_total == 0) {
+ y2error ("steps_total=0");
+ _current_subprogress_total = 100;
}
+
+ y2milestone (
+ "New overall progress ID: %1 (steps_start_at: %2, steps_reserved: %3, steps_total: %4)",
+ id, _current_subprogress_start, _current_subprogress_steps, _current_subprogress_total
+ );
+
+ // when deploying images, label is handled separately
+ if (id != "deploying_images") {
+ string new_label = ImageInstallation::GetProgressLayoutLabel (id);
+ UI::ChangeWidget (`id ("one_image"), `Label, new_label);
+ }
+
+ _previous_id = id;
+ }
+
+ // incremental
+ if (current_step == nil) {
+ _current_step_in_subprogress = _current_step_in_subprogress + 1;
+ // set to exact number
+ } else {
+ _current_step_in_subprogress = current_step;
+ }
+
+ if (id == "storing_user_prefs" || id == "restoring_user_prefs") {
+ SetProgress();
}
- UI::ChangeWidget (
- `id ("deploying_progress"),
- `Value,
- image
- );
+ _current_overall_progress = _current_subprogress_start +
+ (_current_subprogress_steps * _current_step_in_subprogress / _current_subprogress_total);
+
+ // update UI only if nr% has changed
+ if (_current_overall_progress > _last_overall_progress) {
+ _last_overall_progress = _current_overall_progress;
+ UI::ChangeWidget (`id ("deploying_progress"), `Value, _current_overall_progress);
+ }
}
-integer _last_download_progress = -1;
+integer _steps_for_one_image = 100;
+boolean download_handler_hit = false;
boolean MyProgressDownloadHandler (integer percent, integer bps_avg, integer bps_current) {
- // FIXME: remove this line
- y2milestone ("PerCent: %1, AVG: %2, Spd: %3", percent, bps_avg, bps_current);
+ // changing settings on the fly
+ // ... first when download handler is hit
+ if (! download_handler_hit) {
+ y2milestone ("DownloadHandler - first hit");
+ // twice more steps
+ ImageInstallation::AdjustProgressLayout ("deploying_images", (2 * _steps_for_one_image * size (images)), _("Deploying mages..."));
+ download_handler_hit = true;
+ }
+
+ map current_image = ImageInstallation::GetCurrentImageDetails();
if (_last_download_progress < percent) {
- UI::ChangeWidget (
- `id ("one_image"), `Label,
- sformat (_("Downloading image at speed %1/s"), String::FormatSize (bps_current))
- );
+ string current_image_name = current_image["name"]:"";
+ if (current_image_name == "") {
+ UI::ChangeWidget (
+ `id ("one_image"), `Label,
+ sformat (_("Downloading image at speed %1/s"), String::FormatSize (bps_current))
+ );
+ } else {
+ UI::ChangeWidget (
+ `id ("one_image"), `Label,
+ sformat (_("Downloading image %1 at speed %2/s"), current_image_name, String::FormatSize (bps_current))
+ );
+ }
+
UI::ChangeWidget (`id ("one_image"), `Value, percent);
+
+ integer current_image_nr = current_image["image_nr"]:0;
+ integer current_steps = 0;
+
+ if (download_handler_hit) {
+ current_steps = (current_image_nr * 2 * _steps_for_one_image) + percent;
+ } else {
+ current_steps = (current_image_nr * _steps_for_one_image) + percent;
+ }
+
+ OverallProgressHandler ("deploying_images", current_steps);
}
_last_download_progress = percent;
@@ -91,7 +165,12 @@
// reset the label
if (x_progress == 0) {
- UI::ChangeWidget (`id ("one_image"), `Label, _("Deploying image..."));
+ string current_image_name = current_image["name"]:"";
+ if (current_image_name == "") {
+ UI::ChangeWidget (`id ("one_image"), `Label, _("Deploying image..."));
+ } else {
+ UI::ChangeWidget (`id ("one_image"), `Label, sformat (_("Deploying image %1..."), current_image_name));
+ }
// one image done
} else if (x_progress == 100) {
UI::ChangeWidget (`id ("one_image"), `Label, _("Image deployed"));
@@ -101,45 +180,61 @@
if (x_progress > _last_progress) {
UI::ChangeWidget (`id ("one_image"), `Value, x_progress);
_last_progress = x_progress;
+ integer current_image_nr = current_image["image_nr"]:0;
+ integer current_steps = 0;
+
+ if (download_handler_hit) {
+ current_steps = ((current_image_nr * 2 + 1) * _steps_for_one_image) + x_progress;
+ } else {
+ current_steps = (current_image_nr * _steps_for_one_image) + x_progress;
+ }
+
+ OverallProgressHandler ("deploying_images", current_steps);
}
}
ImageInstallation::SetDeployTarImageProgress (SetOneImageProgress);
ImageInstallation::SetDownloadTarImageProgress (MyProgressDownloadHandler);
+ImageInstallation::SetOverallDeployingProgress (OverallProgressHandler);
-ImageInstallation::StoreAllChanges();
-
-Pkg::TargetFinish ();
+ImageInstallation::AdjustProgressLayout ("deploying_images", (_steps_for_one_image * size (images)), _("Deploying mages..."));
Wizard::SetContents (
_("Deploying Installation Images"),
`VBox (
`ProgressBar (
`id ("one_image"),
- _("Deploying image..."),
+ _("Initializing..."),
100,
0
),
`ProgressBar (
`id ("deploying_progress"),
_("Deploying Images..."),
- size(images),
+ 100,
0
)
),
"",
false, false
);
+
+ImageInstallation::StoreAllChanges();
+
+Pkg::TargetFinish ();
+
Wizard::SetTitleIcon ("yast-inst-mode");
SourceManager::InstInitSourceMoveDownloadArea();
-ImageInstallation::DeployImages (images, Installation::destdir, SetProgress);
+ImageInstallation::DeployImages (images, Installation::destdir, nil);
y2milestone ("Target image for package selector prepared");
+PackageCallbacks::RegisterEmptyProgressCallbacks();
Pkg::TargetInitialize (Installation::destdir);
Pkg::TargetLoad ();
+PackageCallbacks::RestorePreviousProgressCallbacks();
ImageInstallation::RestoreAllChanges();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-installation-2.16.38/src/include/misc.ycp new/yast2-installation-2.16.39/src/include/misc.ycp
--- old/yast2-installation-2.16.38/src/include/misc.ycp 2008-04-21 15:31:29.000000000 +0200
+++ new/yast2-installation-2.16.39/src/include/misc.ycp 2008-04-23 15:11:47.000000000 +0200
@@ -11,7 +11,7 @@
* Authors:
* Jiri Srain
*
- * $Id: misc.ycp 46913 2008-04-21 13:29:00Z locilka $
+ * $Id: misc.ycp 46984 2008-04-23 13:09:11Z locilka $
*
*/
@@ -212,6 +212,8 @@
if (ProductControl::GetUseAutomaticConfiguration()) {
ProductControl::DisableAllModulesAndProposals ("installation", "continue");
ProductControl::EnableModule ("automatic_configuration");
+ // Enable SuSEConfig, bnc #381751
+ ProductControl::EnableModule ("suseconfig");
} else {
ProductControl::UnDisableAllModulesAndProposals ("installation", "continue");
ProductControl::DisableModule ("automatic_configuration");
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-installation-2.16.38/src/modules/ImageInstallation.ycp new/yast2-installation-2.16.39/src/modules/ImageInstallation.ycp
--- old/yast2-installation-2.16.38/src/modules/ImageInstallation.ycp 2008-04-22 16:07:14.000000000 +0200
+++ new/yast2-installation-2.16.39/src/modules/ImageInstallation.ycp 2008-04-24 12:59:03.000000000 +0200
@@ -175,6 +175,13 @@
y2milestone ("New download_image_progress: %1", download_image_progress);
}
+void (string, integer) generic_set_progress = nil;
+
+global void SetOverallDeployingProgress (void (string, integer) odp) {
+ generic_set_progress = odp;
+ y2milestone ("New generic_set_progress: %1", generic_set_progress);
+}
+
/**
* Deploy an image of the filesystem type
* @param id string the id of the image
@@ -192,6 +199,7 @@
return false;
}
+ // reset, adjust labels, etc.
if (tar_image_progress != nil)
tar_image_progress (0);
@@ -249,6 +257,7 @@
}
y2milestone ("Finished");
+ // adjust labels etc.
if (tar_image_progress != nil)
tar_image_progress (100);
@@ -334,7 +343,11 @@
// FIXME unmounting
}
+integer _current_image_from_imageset = -1;
+
void SetCurrentImageDetails (map img) {
+ _current_image_from_imageset = _current_image_from_imageset + 1;
+
if (size (images_details) == 0) {
y2warning ("Images details are empty");
}
@@ -346,6 +359,7 @@
"files" : images_details[img["file"]:"","files"]:0,
// 100% progress
"max_progress" : tointeger (images_details[img["file"]:"","size"]:0 / _record_size),
+ "image_nr" : _current_image_from_imageset,
];
}
@@ -498,12 +512,15 @@
Pkg::CallbackProgressDownload (download_image_progress);
integer num = -1;
+ _current_image_from_imageset = -1;
foreach (string img, images, {
num = num + 1;
- progress (num, 0);
+ if (progress != nil)
+ progress (num, 0);
DeployImage (img, target);
- progress (num, 100);
+ if (progress != nil)
+ progress (num, 100);
});
// unregister downloading progress
@@ -824,6 +841,40 @@
*/
map > objects_state = $[];
+ map progress_layout = $[
+ "storing_user_prefs" : $[
+ "steps_start_at" : 0,
+ "steps_reserved" : 6,
+ ],
+ "deploying_images" : $[
+ "steps_start_at" : 6,
+ "steps_reserved" : 84,
+
+ ],
+ "restoring_user_prefs" : $[
+ "steps_start_at" : 90,
+ "steps_reserved" : 10,
+ ],
+ ];
+
+ global integer GetProgressLayoutDetails (string id, string details) {
+ return progress_layout[id, details]:0;
+ }
+
+ global string GetProgressLayoutLabel (string id) {
+ return progress_layout[id, "label"]:_("Deploying...");
+ }
+
+ global void AdjustProgressLayout (string id, integer steps_total, string label) {
+ if (! haskey (progress_layout, id)) {
+ y2error ("Unknown key: %1", id);
+ return;
+ }
+
+ progress_layout[id, "label"] = label;
+ progress_layout[id, "steps_total"] = steps_total;
+ }
+
/**
* Function stores all new/requested states of all handled/supported types.
*
@@ -831,15 +882,13 @@
* @see objects_state
*/
global void StoreAllChanges () {
- Progress::Simple (
- // TRANSLATORS: Dialog caption
- _("Installation from Images"),
- // TRANSLATORS: Dialog progress
- _("Storing user preferences..."),
- 4 * size (all_supported_types),
- // TRANSLATORS: help text
- _("<p>Installation process is just storing the user-defined selection of packages</p>")
- );
+ integer nr_steps = 4 * size (all_supported_types);
+ string id = "storing_user_prefs";
+
+ AdjustProgressLayout (id, nr_steps, _("Storing user preferences..."));
+
+ if (generic_set_progress != nil)
+ generic_set_progress (id, 0);
// Query for changed state of all knwon types
// 'changed' means that they were 'installed' and 'not locked' before
@@ -856,28 +905,34 @@
return (one_object["status"]:`unknown == `removed);
});
objects_state[one_type, "remove"] = remove_resolvables;
- Progress::NextStep();
+
+ if (generic_set_progress != nil)
+ generic_set_progress (id, nil);
list