Hello community,
here is the log from the commit of package yast2-installation
checked in at Thu Apr 17 15:42:19 CEST 2008.
--------
--- yast2-installation/yast2-installation.changes 2008-04-15 11:46:55.000000000 +0200
+++ /mounts/work_src_done/NOARCH/yast2-installation/yast2-installation.changes 2008-04-17 14:02:47.000000000 +0200
@@ -1,0 +2,13 @@
+Thu Apr 17 14:01:46 CEST 2008 - locilka@suse.cz
+
+- Added image-downloading progress (reusing existent progress bar).
+- 2.16.37
+
+-------------------------------------------------------------------
+Wed Apr 16 14:20:06 CEST 2008 - locilka@suse.cz
+
+- Running runlevel proposal after software proposal (bnc #380141).
+- Using new possibility to disable and then reenable package
+ callbacks (system_analysis, deploy_images).
+
+-------------------------------------------------------------------
Old:
----
yast2-installation-2.16.36.tar.bz2
New:
----
yast2-installation-2.16.37.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-installation.spec ++++++
--- /var/tmp/diff_new_pack.a21548/_old 2008-04-17 15:41:51.000000000 +0200
+++ /var/tmp/diff_new_pack.a21548/_new 2008-04-17 15:41:51.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-installation (Version 2.16.36)
+# spec file for package yast2-installation (Version 2.16.37)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -12,21 +12,21 @@
Name: yast2-installation
-Version: 2.16.36
+Version: 2.16.37
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-installation-2.16.36.tar.bz2
+Source0: yast2-installation-2.16.37.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
-# anyxml -> barexml (bnc #366867)
-BuildRequires: yast2 >= 2.16.39
+# PackageCallbacks::RegisterEmptyProgressCallbacks()
+BuildRequires: yast2 >= 2.16.52
# SourceManager::InstInitSourceMoveDownloadArea
BuildRequires: yast2-packager >= 2.16.32
Requires: autoyast2-installation
-# GetInstArgs::automatic_configuration
-Requires: yast2 >= 2.16.46
+# PackageCallbacks::RegisterEmptyProgressCallbacks()
+Requires: yast2 >= 2.16.52
# Required in in the first stage, after
# switching to the installed system, bugzilla #249679
Requires: yast2-bootloader
@@ -106,7 +106,7 @@
Lukas Ocilka
%prep
-%setup -n yast2-installation-2.16.36
+%setup -n yast2-installation-2.16.37
%build
%{prefix}/bin/y2tool y2autoconf
@@ -172,6 +172,13 @@
%exclude %{prefix}/share/doc/packages/yast2-installation/COPYING
%exclude %{prefix}/share/doc/packages/yast2-installation/README
%changelog
+* Thu Apr 17 2008 locilka@suse.cz
+- Added image-downloading progress (reusing existent progress bar).
+- 2.16.37
+* Wed Apr 16 2008 locilka@suse.cz
+- Running runlevel proposal after software proposal (bnc #380141).
+- Using new possibility to disable and then reenable package
+ callbacks (system_analysis, deploy_images).
* Tue Apr 15 2008 locilka@suse.cz
- ImageInstallation tries to find details-<arch>.xml, then
details.xml to provide useful progress while deploying images.
++++++ yast2-installation-2.16.36.tar.bz2 -> yast2-installation-2.16.37.tar.bz2 ++++++
++++ 4533 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-installation-2.16.36/configure.in new/yast2-installation-2.16.37/configure.in
--- old/yast2-installation-2.16.36/configure.in 2008-01-14 13:56:46.000000000 +0100
+++ new/yast2-installation-2.16.37/configure.in 2008-04-17 14:03:18.000000000 +0200
@@ -1,9 +1,9 @@
dnl configure.in for yast2-installation
dnl
-dnl -- This file is generated by y2autoconf 2.16.2 - DO NOT EDIT! --
+dnl -- This file is generated by y2autoconf 2.16.7 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-installation, 2.16.9, http://bugs.opensuse.org/, yast2-installation)
+AC_INIT(yast2-installation, 2.16.37, http://bugs.opensuse.org/, yast2-installation)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -18,7 +18,7 @@
AM_INIT_AUTOMAKE(tar-ustar -Wno-portability)
dnl Important YaST2 variables
-VERSION="2.16.9"
+VERSION="2.16.37"
RPMNAME="yast2-installation"
MAINTAINER="Lukas Ocilka "
@@ -108,7 +108,7 @@
dnl no need for AC_ARG_VAR
AC_PATH_PROG(XGETTEXT, xgettext)
if test -z "$XGETTEXT" ; then
- AC_MSG_ERROR(xgettext is missing; please install gettext-devel.)
+ AC_MSG_ERROR(xgettext is missing; please install gettext-tools.)
fi
Y2DEVTOOLS_PREFIX=`pkg-config --print-errors --variable=prefix yast2-devtools`
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-installation-2.16.36/src/clients/inst_deploy_image.ycp new/yast2-installation-2.16.37/src/clients/inst_deploy_image.ycp
--- old/yast2-installation-2.16.36/src/clients/inst_deploy_image.ycp 2008-04-11 17:13:39.000000000 +0200
+++ new/yast2-installation-2.16.37/src/clients/inst_deploy_image.ycp 2008-04-17 13:58:46.000000000 +0200
@@ -4,6 +4,7 @@
import "Progress";
import "Wizard";
import "SourceManager";
+import "String";
textdomain "installation";
@@ -46,6 +47,25 @@
);
}
+integer _last_download_progress = -1;
+
+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);
+
+ if (_last_download_progress < percent) {
+ UI::ChangeWidget (
+ `id ("one_image"), `Label,
+ sformat (_("Downloading image at speed %1/s"), String::FormatSize (bps_current))
+ );
+ UI::ChangeWidget (`id ("one_image"), `Value, percent);
+ }
+
+ _last_download_progress = percent;
+
+ return true;
+}
+
integer _last_progress = -1;
string _last_image_id = nil;
@@ -53,9 +73,10 @@
map current_image = ImageInstallation::GetCurrentImageDetails();
integer max_progress = current_image["max_progress"]:0;
- // another file
+ // another file than the previous one
if (current_image["file"]:"" != _last_image_id) {
_last_image_id = current_image["file"]:"";
+ _last_download_progress = -1;
_last_progress = -1;
}
@@ -64,16 +85,27 @@
return;
}
+ // current progress 0 - 100
integer x_progress = (100 * current_progress / max_progress);
if (x_progress > 100) x_progress = 100;
+ // reset the label
+ if (x_progress == 0) {
+ UI::ChangeWidget (`id ("one_image"), `Label, _("Deploying image..."));
+ // one image done
+ } else if (x_progress == 100) {
+ UI::ChangeWidget (`id ("one_image"), `Label, _("Image deployed"));
+ }
+
+ // set current step
if (x_progress > _last_progress) {
- UI::ChangeWidget (`id ("deploying_image"), `Value, x_progress);
+ UI::ChangeWidget (`id ("one_image"), `Value, x_progress);
_last_progress = x_progress;
}
}
ImageInstallation::SetDeployTarImageProgress (SetOneImageProgress);
+ImageInstallation::SetDownloadTarImageProgress (MyProgressDownloadHandler);
ImageInstallation::StoreAllChanges();
@@ -83,7 +115,7 @@
_("Deploying Installation Images"),
`VBox (
`ProgressBar (
- `id ("deploying_image"),
+ `id ("one_image"),
_("Deploying image..."),
100,
0
@@ -101,6 +133,7 @@
Wizard::SetTitleIcon ("yast-inst-mode");
SourceManager::InstInitSourceMoveDownloadArea();
+
ImageInstallation::DeployImages (images, Installation::destdir, SetProgress);
y2milestone ("Target image for package selector prepared");
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-installation-2.16.36/src/clients/inst_system_analysis.ycp new/yast2-installation-2.16.37/src/clients/inst_system_analysis.ycp
--- old/yast2-installation-2.16.36/src/clients/inst_system_analysis.ycp 2008-04-14 14:01:57.000000000 +0200
+++ new/yast2-installation-2.16.37/src/clients/inst_system_analysis.ycp 2008-04-17 11:08:36.000000000 +0200
@@ -5,7 +5,7 @@
* Authors: Jiri Srain
* Lukas Ocilka
*
- * $Id: inst_system_analysis.ycp 46571 2008-04-14 12:00:15Z locilka $
+ * $Id: inst_system_analysis.ycp 46736 2008-04-16 13:11:00Z locilka $
*
*/
@@ -27,6 +27,7 @@
import "StorageControllers";
import "StorageDevices";
import "Wizard";
+import "PackageCallbacks";
include "installation/misc.ycp";
include "packager/storage_include.ycp";
@@ -142,18 +143,27 @@
boolean packager_initialized = false;
boolean InitInstallationRepositoriesReal () {
+ // disable callbacks
+ PackageCallbacks::RegisterEmptyProgressCallbacks();
+
+ boolean ret = true;
+
Packages::InitializeCatalogs ();
+
if (Packages::InitFailed ()) {
// popup message
Popup::Message (_("Failed to initialize the software repositories.
Aborting the installation."));
- return false;
+ ret = false;
+ } else {
+ packager_initialized = true;
+ Packages::InitializeAddOnProducts ();
}
- packager_initialized = true;
- Packages::InitializeAddOnProducts ();
+ // reregister callbacks
+ PackageCallbacks::RestorePreviousProgressCallbacks();
- return true;
+ return ret;
}
boolean InitInstallationRepositories () {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-installation-2.16.36/src/clients/inst_upgrade_urls.ycp new/yast2-installation-2.16.37/src/clients/inst_upgrade_urls.ycp
--- old/yast2-installation-2.16.36/src/clients/inst_upgrade_urls.ycp 2008-04-01 10:34:40.000000000 +0200
+++ new/yast2-installation-2.16.37/src/clients/inst_upgrade_urls.ycp 2008-04-17 11:08:36.000000000 +0200
@@ -19,18 +19,29 @@
textdomain "installation";
symbol ret = `next;
- if (GetInstArgs::going_back()) ret = `back;
+ if (GetInstArgs::going_back())
+ ret = `back;
- // --> Comment this out in case of testing on a running system
- if (! Stage::initial()) {
- y2milestone ("Not an initial stage");
- return ret;
- }
- if (! Mode::update()) {
- y2milestone ("Not an udpate mode");
- return ret;
+ 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) {
+ y2milestone ("Test mode");
+ } else {
+ if (! Stage::initial()) {
+ y2milestone ("Not an initial stage");
+ return ret;
+ }
+ if (! Mode::update()) {
+ y2milestone ("Not an udpate mode");
+ return ret;
+ }
}
- // <--
string dir_old = sformat ("%1/var/lib/zypp/db/sources/", Installation::destdir);
list