commit yast2-packager for openSUSE:Factory
Hello community,
here is the log from the commit of package yast2-packager for openSUSE:Factory
checked in at Fri Nov 5 14:47:42 CET 2010.
--------
--- yast2-packager/yast2-packager.changes 2010-10-25 09:28:41.000000000 +0200
+++ yast2-packager/yast2-packager.changes 2010-11-03 14:50:31.000000000 +0100
@@ -1,0 +2,26 @@
+Wed Nov 3 13:44:55 UTC 2010 - lslezak@suse.cz
+
+- don't reset package selection in dirinstall mode when target
+ directory is changed (bnc#568511, bnc#568512)
+- 2.20.9
+
+-------------------------------------------------------------------
+Tue Nov 2 13:00:15 UTC 2010 - lslezak@suse.cz
+
+- correctly display download progress in DownloadInAdvance
+ libzypp mode (bnc#616708)
+- 2.20.8
+
+-------------------------------------------------------------------
+Mon Nov 1 16:30:27 UTC 2010 - lslezak@suse.cz
+
+- sw_single: clear the startup progress dialog so it's not
+ displayed in slow systems at the end (bnc#637201)
+
+-------------------------------------------------------------------
+Wed Oct 27 14:36:59 CEST 2010 - mzugec@suse.cz
+
+- improved UI layout (bnc#619653)
+- 2.20.7
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
yast2-packager-2.20.6.tar.bz2
New:
----
yast2-packager-2.20.9.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-packager.spec ++++++
--- /var/tmp/diff_new_pack.X5gbB4/_old 2010-11-05 14:46:46.000000000 +0100
+++ /var/tmp/diff_new_pack.X5gbB4/_new 2010-11-05 14:46:46.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-packager (Version 2.20.6)
+# spec file for package yast2-packager (Version 2.20.9)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,11 +19,11 @@
Name: yast2-packager
-Version: 2.20.6
+Version: 2.20.9
Release: 1
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-packager-2.20.6.tar.bz2
+Source0: yast2-packager-2.20.9.tar.bz2
Prefix: /usr
@@ -37,14 +37,14 @@
# Installation summary in PackagesUI::
BuildRequires: yast2 >= 2.18.1
-# "keeppackages" repo property
-BuildRequires: yast2-pkg-bindings >= 2.17.27
+# changed StartPackage callback signature
+BuildRequires: yast2-pkg-bindings >= 2.20.3
# Newly added RPM
Requires: yast2-country-data >= 2.16.3
-# "keeppackages" repo property
-Requires: yast2-pkg-bindings >= 2.17.27
+# changed StartPackage callback signature
+Requires: yast2-pkg-bindings >= 2.20.3
# Installation summary in PackagesUI::
Requires: yast2 >= 2.18.1
@@ -100,7 +100,7 @@
(webpin) and installing them via OneClickInstall
%prep
-%setup -n yast2-packager-2.20.6
+%setup -n yast2-packager-2.20.9
%build
%{prefix}/bin/y2tool y2autoconf
++++++ yast2-packager-2.20.6.tar.bz2 -> yast2-packager-2.20.9.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-2.20.6/VERSION new/yast2-packager-2.20.9/VERSION
--- old/yast2-packager-2.20.6/VERSION 2010-10-25 09:17:48.000000000 +0200
+++ new/yast2-packager-2.20.9/VERSION 2010-11-03 14:47:47.000000000 +0100
@@ -1 +1 @@
-2.20.6
+2.20.9
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-2.20.6/agents/Makefile.am new/yast2-packager-2.20.9/agents/Makefile.am
--- old/yast2-packager-2.20.6/agents/Makefile.am 2008-09-09 17:58:21.000000000 +0200
+++ new/yast2-packager-2.20.9/agents/Makefile.am 2010-11-02 13:48:52.000000000 +0100
@@ -6,6 +6,7 @@
ag_zypp_repos
scrconf_DATA = \
+ etc_zypp_conf.scr \
zypp_repos.scr
EXTRA_DIST = $(agent_SCRIPTS) $(scrconf_DATA)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-2.20.6/agents/Makefile.in new/yast2-packager-2.20.9/agents/Makefile.in
--- old/yast2-packager-2.20.6/agents/Makefile.in 2010-10-25 09:24:44.000000000 +0200
+++ new/yast2-packager-2.20.9/agents/Makefile.in 2010-11-03 14:48:35.000000000 +0100
@@ -197,6 +197,7 @@
ag_zypp_repos
scrconf_DATA = \
+ etc_zypp_conf.scr \
zypp_repos.scr
EXTRA_DIST = $(agent_SCRIPTS) $(scrconf_DATA)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-2.20.6/agents/etc_zypp_conf.scr new/yast2-packager-2.20.9/agents/etc_zypp_conf.scr
--- old/yast2-packager-2.20.6/agents/etc_zypp_conf.scr 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-packager-2.20.9/agents/etc_zypp_conf.scr 2010-11-02 13:51:24.000000000 +0100
@@ -0,0 +1,65 @@
+/**
+ * File:
+ * etc_zypp_conf.scr
+ * Summary:
+ * SCR Agent for reading/writing /etc/zypp/zypp.conf file
+ * using the ini-agent
+ * Access:
+ * read/write
+ * Authors:
+ * Ladislav Slezak total_sizes_per_cd_per_src = []; // total sizes per inst-src: [ [42, 43, 44], [12, 13, 14] ]
global list
remaining_sizes_per_cd_per_src = []; // remaining sizes
@@ -28,6 +29,9 @@
global string media_type = _("Medium %1");
global integer total_size_installed = 0;
global integer total_size_to_install = 0;
+ global integer total_count_to_download = 0;
+ global integer total_count_downloaded = 0;
+ global integer downloading_pct = 0;
global integer min_time_per_cd = 10; // const - minimum time displayed per CD if there is something to install
global integer max_time_per_cd = 7200; // const - seconds to cut off predicted time (it's bogus anyway)
global integer size_column = 1; // const - column number for remaining size per CD
@@ -47,6 +51,8 @@
string provide_name = ""; // currently downlaoded package name
string provide_size = ""; // currently downlaoded package size
+ boolean download_in_advance_mode = false;
+
// package summary
// package counters
@@ -65,7 +71,6 @@
integer current_provide_size = 0;
integer current_install_size = 0;
- string current_pkg_name = "";
boolean updating = false;
void ResetPackageSummary()
@@ -80,7 +85,6 @@
// temporary values
current_provide_size = 0;
current_install_size = 0;
- current_pkg_name = "";
updating = false;
}
@@ -405,6 +409,50 @@
y2milestone( "SubtractPackageSize( %1 ) -> %2", pkg_size, remaining_sizes_per_cd_per_src);
}
+ integer packages_to_download(list
src_mapping)
+ {
+ y2milestone("Packages to download input: %1", src_mapping);
+
+ integer ret = 0;
+
+ integer i = 0;
+ foreach(list<integer> media_mapping, src_mapping,
+ {
+ if (size(media_mapping) > 0)
+ {
+ // check if the repository is remote
+ string repo_url = Pkg::SourceGeneralData(i)["url"]:"";
+ string repo_schema = tolower(URL::Parse(repo_url)["scheme"]:"");
+
+ if (contains(["http", "https", "ftp", "sftp"], repo_schema))
+ {
+ integer total = 0;
+ foreach(integer count, media_mapping,
+ {
+ total = total + count;
+ }
+ );
+
+ y2milestone("Downloading %1 packages from remote repository %2", total, i);
+ ret = ret + total;
+ }
+ }
+
+ i = i + 1;
+ }
+ );
+
+ y2milestone("Total number of packages to download: %1", ret);
+
+ return ret;
+ }
+
+ integer packages_to_install(list
src_mapping)
+ {
+ integer ret = ListSum(flatten(src_mapping));
+ y2milestone("Total number of packages to install: %1", ret);
+ return ret;
+ }
/**
* Initialize internal pacakge data, such as remaining package sizes and
@@ -454,6 +502,11 @@
remaining_sizes_per_cd_per_src = (list
) eval (total_sizes_per_cd_per_src);
remaining_pkg_count_per_cd_per_src = (list
) eval (total_pkg_count_per_cd_per_src);
total_cd_count = size( flatten( total_sizes_per_cd_per_src ) );
+ total_count_to_download = packages_to_download(total_pkg_count_per_cd_per_src);
+ total_count_downloaded = 0;
+ integer total_count_to_install = packages_to_install(total_pkg_count_per_cd_per_src);
+ downloading_pct = 100 * total_count_to_download / (total_count_to_install + total_count_to_download);
+ download_in_advance_mode= (string)SCR::Read(.etc.zypp_conf.value.main."commit.downloadMode") == "DownloadInAdvance";
init_pkg_data_complete = true;
// reset the history log
@@ -783,6 +836,27 @@
}
}
+ // update the overall progress value (download + installation)
+ void UpdateTotalProgressValue()
+ {
+ integer total_progress = 0;
+
+ if (total_count_to_download == 0)
+ {
+ // no package to download, just use the install size
+ total_progress = (TotalInstalledSize() * 100 / total_size_to_install);
+ }
+ else
+ {
+ // compute the total progress (use both download and installation size)
+ total_progress = (total_count_downloaded * downloading_pct / total_count_to_download) +
+ (TotalInstalledSize() * (100 - downloading_pct) / total_size_to_install);
+ }
+
+ y2internal("Total package installation progress: %1%%", total_progress);
+ SlideShow::StageProgress( total_progress, nil );
+ }
+
/**
* Update progress widgets
**/
@@ -796,7 +870,8 @@
total_size_to_install_kB = 1;
}
- SlideShow::StageProgress( ( TotalInstalledSize() >> 10 ) * 100 / total_size_to_install_kB, nil /*, SlideShow::GetProgressLabel()*/ );
+ // update the overall progress value (download + installation)
+ UpdateTotalProgressValue();
UpdateCurrentCdProgress(silent_check);
@@ -943,6 +1018,21 @@
if (error == 0)
{
total_downloaded = total_downloaded + current_provide_size;
+
+ total_count_downloaded = total_count_downloaded + 1;
+ y2milestone("Downloaded %1/%2 packages (%3%%)", total_count_downloaded, total_count_to_download, total_count_downloaded * 100 / total_count_to_download);
+
+ // move the progress also for downloaded files
+ UpdateTotalProgressValue();
+
+ if (download_in_advance_mode)
+ {
+ // display download progress in DownloadInAdvance mode
+ // translations: progress message (part1)
+ SlideShow::SetGlobalProgressLabel( _("Downloading Packages...") +
+ // progress message (part2)
+ sformat(_(" (Downloaded %1 of %2 packages)"), total_count_downloaded, total_count_to_download));
+ }
}
}
@@ -1006,7 +1096,7 @@
if (Mode::normal())
{
- updated_packages_list = add(updated_packages_list, current_pkg_name);
+ updated_packages_list = add(updated_packages_list, pkg_name);
}
}
else
@@ -1015,7 +1105,7 @@
if (Mode::normal())
{
- installed_packages_list = add(installed_packages_list, current_pkg_name);
+ installed_packages_list = add(installed_packages_list, pkg_name);
}
}
@@ -1028,7 +1118,7 @@
if (Mode::normal())
{
- removed_packages_list = add(removed_packages_list, current_pkg_name);
+ removed_packages_list = add(removed_packages_list, pkg_name);
}
}
}
@@ -1044,6 +1134,7 @@
* @param deleting Flag: deleting (true) or installing (false) package?
**/
global void SlideDisplayStart( string pkg_name,
+ string pkg_location,
string pkg_summary,
integer pkg_size,
boolean deleting )
@@ -1051,10 +1142,8 @@
if ( ! SanityCheck( false ) ) return;
// remove path
- pkg_name = StripPath(pkg_name);
-
- // remove release and .rpm suffix
- // pkg_name = StripReleaseNo( pkg_name ); // bug #154872
+ string pkg_filename = StripPath(pkg_location);
+ y2internal("pkg_name: %1", pkg_name);
if ( deleting )
{
@@ -1083,15 +1172,14 @@
// Heading for the progress bar for the current package
// while it is deleted. "%1" is the package name.
msg = sformat( _("Deleting %1"), pkg_name );
- current_pkg_name = pkg_name;
}
else
{
- updating = Pkg::PkgInstalled(current_pkg_name);
+ updating = Pkg::PkgInstalled(pkg_name);
// package installation - summary text
// %1 is RPM name, %2 is installed (unpacked) size (e.g. 6.20MB)
- msg = sformat( _("Installing %1 (installed size %2)"), pkg_name, String::FormatSize( pkg_size ) );
+ msg = sformat( _("Installing %1 (installed size %2)"), pkg_filename, String::FormatSize( pkg_size ) );
current_install_size = pkg_size;
}
@@ -1178,7 +1266,6 @@
global void SlideProvideStart (string pkg_name, integer sz, boolean remote)
{
current_provide_size = remote ? sz : 0;
- current_pkg_name = pkg_name;
if (remote)
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-2.20.6/src/modules/Packages.ycp new/yast2-packager-2.20.9/src/modules/Packages.ycp
--- old/yast2-packager-2.20.6/src/modules/Packages.ycp 2010-10-25 09:24:13.000000000 +0200
+++ new/yast2-packager-2.20.9/src/modules/Packages.ycp 2010-11-03 14:48:09.000000000 +0100
@@ -3,7 +3,7 @@
* Package: Package selections
* Authors: Anas Nashif
participants (1)
-
root@hilbert.suse.de