Author: locilka
Date: Thu Nov 27 17:00:48 2008
New Revision: 53663
URL: http://svn.opensuse.org/viewcvs/yast?rev=53663&view=rev
Log:
- Using yast-live-install-finish icon when finishing LiveCD
installation/inst_finish (bnc #438154).
- Fixed ImageInstallation SlideShow - download progress is shown
only when downloading the images, not the other helper files
(bnc #449792).
- Adjusting ImageInstallation-related SlideShow only if
ImageInstallation is in use (bnc #439104).
Modified:
trunk/installation/package/yast2-installation.changes
trunk/installation/src/clients/inst_complex_welcome.ycp
trunk/installation/src/clients/inst_deploy_image.ycp
trunk/installation/src/clients/inst_finish.ycp
trunk/installation/src/clients/inst_prepareprogress.ycp
trunk/installation/src/modules/ImageInstallation.ycp
Modified: trunk/installation/package/yast2-installation.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/package/yast2-installation.changes?rev=53663&r1=53662&r2=53663&view=diff
==============================================================================
--- trunk/installation/package/yast2-installation.changes (original)
+++ trunk/installation/package/yast2-installation.changes Thu Nov 27 17:00:48 2008
@@ -1,4 +1,15 @@
-------------------------------------------------------------------
+Thu Nov 27 16:49:11 CET 2008 - locilka@suse.cz
+
+- Using yast-live-install-finish icon when finishing LiveCD
+ installation/inst_finish (bnc #438154).
+- Fixed ImageInstallation SlideShow - download progress is shown
+ only when downloading the images, not the other helper files
+ (bnc #449792).
+- Adjusting ImageInstallation-related SlideShow only if
+ ImageInstallation is in use (bnc #439104).
+
+-------------------------------------------------------------------
Thu Nov 27 15:05:11 CET 2008 - ug@suse.de
- the real fix for #442691
Modified: trunk/installation/src/clients/inst_complex_welcome.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/clients/inst_complex_welcome.ycp?rev=53663&r1=53662&r2=53663&view=diff
==============================================================================
--- trunk/installation/src/clients/inst_complex_welcome.ycp (original)
+++ trunk/installation/src/clients/inst_complex_welcome.ycp Thu Nov 27 17:00:48 2008
@@ -218,7 +218,12 @@
void ReadCurrentUIState () {
language = (string) UI::QueryWidget (`id (`language), `Value);
keyboard = (string) UI::QueryWidget (`id (`keyboard), `Value);
- license_acc = (boolean) UI::QueryWidget (`id (`license_agreement), `Value);
+
+ if (ProductLicense::AcceptanceNeeded()) {
+ license_acc = (boolean) UI::QueryWidget (`id (`license_agreement), `Value);
+ } else {
+ license_acc = true;
+ }
}
// Returns true if the dialog needs redrawing
Modified: trunk/installation/src/clients/inst_deploy_image.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/clients/inst_deploy_image.ycp?rev=53663&r1=53662&r2=53663&view=diff
==============================================================================
--- trunk/installation/src/clients/inst_deploy_image.ycp (original)
+++ trunk/installation/src/clients/inst_deploy_image.ycp Thu Nov 27 17:00:48 2008
@@ -62,7 +62,7 @@
// div by zero!
if (_current_subprogress_total == 0) {
y2error ("steps_total=0");
- _current_subprogress_total = 100;
+ _current_subprogress_total = 1;
}
y2milestone (
@@ -91,6 +91,7 @@
SetProgress();
}
+ // Should be 0 - 100%
_current_overall_progress = _current_subprogress_start +
(_current_subprogress_steps * _current_step_in_subprogress / _current_subprogress_total);
@@ -104,10 +105,38 @@
integer _steps_for_one_image = 100;
boolean download_handler_hit = false;
string _last_image_downloading = nil;
+boolean report_image_downloading = false;
+
+// Not only images but also some helper files are downloaded
+// Image installation should report only images
+// BNC #449792
+void MyStartDownloadHandler (string url, string localfile) {
+ map current_image = ImageInstallation::GetCurrentImageDetails();
+ string current_image_file = current_image["file"]:"";
+
+ // Fetches is (additionally) downloading some other file
+ if (current_image_file == nil || current_image_file == "") {
+ y2warning ("Uknown image being downloaded: %1", current_image);
+ report_image_downloading = false;
+ return;
+ }
+
+ integer image_filename_length = size (current_image_file);
+ // 'http://some.url/directory/image.name' vs. 'directory/image.name'
+ string image_url_download = substring (url, size (url) - image_filename_length, image_filename_length);
+
+ // downloading progress is reported only if
+ report_image_downloading = (image_url_download == current_image_file);
+
+ y2milestone ("Downloading started %1, showing progress %2", url, report_image_downloading);
+}
boolean MyProgressDownloadHandler (integer percent, integer bps_avg, integer bps_current) {
// changing settings on the fly
// ... first when download handler is hit
+ //
+ // if a repository is remote, there are twice more steps to do (download, deploy)
+ // local (or NFS, SMB, ...) access do not use downloader
if (! download_handler_hit) {
y2milestone ("DownloadHandler - first hit");
// twice more steps
@@ -115,6 +144,12 @@
download_handler_hit = true;
}
+ // See MyStartDownloadHandler
+ // BNC #449792
+ if (report_image_downloading != true) {
+ return true;
+ }
+
map current_image = ImageInstallation::GetCurrentImageDetails();
if (_last_download_progress < percent) {
@@ -127,6 +162,7 @@
_last_image_downloading = image_info;
}
+ // unknown image
if (image_info == "") {
image_info = sformat (_("Downloading image at speed %1/s"), String::FormatSize (bps_current));
} else {
@@ -223,6 +259,7 @@
ImageInstallation::SetDeployTarImageProgress (SetOneImageProgress);
ImageInstallation::SetDownloadTarImageProgress (MyProgressDownloadHandler);
+ImageInstallation::SetStartDownloadImageProgress (MyStartDownloadHandler);
ImageInstallation::SetOverallDeployingProgress (OverallProgressHandler);
ImageInstallation::AdjustProgressLayout ("deploying_images", (_steps_for_one_image * size (images)), _("Deploying Images..."));
Modified: trunk/installation/src/clients/inst_finish.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/clients/inst_finish.ycp?rev=53663&r1=53662&r2=53663&view=diff
==============================================================================
--- trunk/installation/src/clients/inst_finish.ycp (original)
+++ trunk/installation/src/clients/inst_finish.ycp Thu Nov 27 17:00:48 2008
@@ -149,7 +149,8 @@
"copy_logs",
"umount",
],
- "icon" : "yast-scripts",
+ // bnc #438154
+ "icon" : (Mode::live_installation() ? "yast-live-install-finish":"yast-scripts"),
],
];
Modified: trunk/installation/src/clients/inst_prepareprogress.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/clients/inst_prepareprogress.ycp?rev=53663&r1=53662&r2=53663&view=diff
==============================================================================
--- trunk/installation/src/clients/inst_prepareprogress.ycp (original)
+++ trunk/installation/src/clients/inst_prepareprogress.ycp Thu Nov 27 17:00:48 2008
@@ -27,7 +27,11 @@
SlideShow::OpenDialog();
PackageSlideShow::InitPkgData(true); // FIXME: this is odd!
- ImageInstallation::FillUpImagesDetails();
+ // Details (such as images sizes) have to known before initializing the SlideShow
+ // but only if Installation from Images is in use
+ if (Installation::image_installation) {
+ ImageInstallation::FillUpImagesDetails();
+ }
list< map > stages = [
$[
@@ -39,7 +43,9 @@
$[
"name" : "images",
"description": _("Deploying Images..."),
- "value" : ImageInstallation::TotalSize() / 1024, // kilobytes
+ // Use 'zero' if image installation is not used
+ // BNC #439104
+ "value" : (Installation::image_installation ? ImageInstallation::TotalSize() / 1024 : 0), // kilobytes
"units" : `kb,
],
$[
Modified: trunk/installation/src/modules/ImageInstallation.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/modules/ImageInstallation.ycp?rev=53663&r1=53662&r2=53663&view=diff
==============================================================================
--- trunk/installation/src/modules/ImageInstallation.ycp (original)
+++ trunk/installation/src/modules/ImageInstallation.ycp Thu Nov 27 17:00:48 2008
@@ -28,6 +28,7 @@
import "SlideShow";
import "ProductControl";
import "ProductFeatures";
+import "Packages";
textdomain "installation";
@@ -37,6 +38,25 @@
integer _repo = nil;
/**
+ * Set the repository to get images from
+ * @param repo integer the repository identification
+ */
+global void SetRepo (integer repo) {
+ _repo = repo;
+ y2milestone ("New images repo: %1", _repo);
+}
+
+/**
+ * Adjusts the repository for images
+ */
+void InitRepo () {
+ if (_repo != nil)
+ return;
+
+ SetRepo (Packages::theSources[0]:0);
+}
+
+/**
* Description of all available images
*/
map > _images = $[];
@@ -104,14 +124,6 @@
}
/**
- * Set the repository to get images from
- * @param repo integer the repository identification
- */
-global void SetRepo (integer repo) {
- _repo = repo;
-}
-
-/**
* Name of image containing software management metadata (if exists)
* @return string image with sw mgmt metadata
*/
@@ -190,6 +202,14 @@
y2milestone ("New download_image_progress: %1", download_image_progress);
}
+void (string, string) start_download_handler = nil;
+
+// BNC #449792
+global void SetStartDownloadImageProgress (void (string, string) sdi) {
+ start_download_handler = sdi;
+ y2milestone ("New start_download_handler: %1", start_download_handler);
+}
+
void (string, integer) generic_set_progress = nil;
global void SetOverallDeployingProgress (void (string, integer) odp) {
@@ -204,6 +224,8 @@
* @return boolean true on success
*/
boolean DeployTarImage (string id, string target) {
+ InitRepo();
+
string file = _images[id, "file"]:"";
y2milestone ("Untarring image %1 (%2) to %3", id, file, target);
file = sformat ("%1/%2", _image_path, file);
@@ -306,6 +328,8 @@
* @return boolean true on success
*/
boolean DeployFsImage (string id, string target) {
+ InitRepo();
+
string file = _images[id, "file"]:"";
y2milestone ("Deploying FS image %1 (%2) on %3", id, file, target);
file = sformat ("%1/%2", _image_path, file);
@@ -359,6 +383,8 @@
* @return boolean true on success
*/
boolean MountFsImage (string id, string target) {
+ InitRepo();
+
string file = _images[id, "file"]:"";
y2milestone ("Mounting image %1 (%2) on %3", id, file, target);
file = sformat ("%1/%2", _image_path, file);
@@ -390,7 +416,9 @@
y2milestone( "Computing total images size from [%1], data %2", _image_order, images_details );
foreach( string image, _image_order, {
- sum = sum + images_details[image,"size"]:0;
+ // 128 MB as a fallback size
+ // otherwise progress would not move at all
+ sum = sum + images_details[image,"size"]:134217728;
});
y2milestone( "Total images size: %1", sum );
@@ -493,6 +521,14 @@
* Loads non-mandatory details for every single selected image.
*/
global boolean FillUpImagesDetails () {
+ InitRepo();
+
+ // bnc #439104
+ if (_repo == nil) {
+ y2warning ("No images-repository defined");
+ return true;
+ }
+
// ppc (covers also ppc64), i386, x86_64 ...
string filename = nil;
@@ -507,7 +543,7 @@
filename = Pkg::SourceProvideDigestedFile (_repo, 1, try_file, true);
if (filename != nil && filename != "") {
- y2milestone ("Using file: %1 (%2)", filename, try_file);
+ y2milestone ("Using details file: %1 (%2)", filename, try_file);
break;
}
});
@@ -566,6 +602,10 @@
if (download_image_progress != nil)
Pkg::CallbackProgressDownload (download_image_progress);
+ // register own callback for start downloading
+ if (start_download_handler != nil)
+ Pkg::CallbackStartDownload (start_download_handler);
+
integer num = -1;
_current_image_from_imageset = -1;
boolean aborted = nil;
@@ -632,6 +672,8 @@
* @return boolean true on success or when media does not contain any images
*/
global boolean FindImageSet (list<string> patterns) {
+ InitRepo();
+
// reset all data
_images = $[];
_image_order = [];
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org