Author: lslezak
Date: Tue Jun 14 13:48:59 2011
New Revision: 64339
URL: http://svn.opensuse.org/viewcvs/yast?rev=64339&view=rev
Log:
- support for download in advance mode in yast2-wagon (fate#308951)
- 2.21.2
Modified:
trunk/packager/ (props changed)
trunk/packager/VERSION
trunk/packager/package/yast2-packager.changes
trunk/packager/src/clients/inst_rpmcopy.ycp
trunk/packager/src/modules/PackageInstallation.ycp
trunk/packager/src/modules/PackageSlideShow.ycp
trunk/packager/yast2-packager.spec.in
Modified: trunk/packager/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/VERSION?rev=64339&r1=64338&r2=64339&view=diff
==============================================================================
--- trunk/packager/VERSION (original)
+++ trunk/packager/VERSION Tue Jun 14 13:48:59 2011
@@ -1 +1 @@
-2.21.1
+2.21.2
Modified: trunk/packager/package/yast2-packager.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/package/yast2-packager.changes?rev=64339&r1=64338&r2=64339&view=diff
==============================================================================
--- trunk/packager/package/yast2-packager.changes (original)
+++ trunk/packager/package/yast2-packager.changes Tue Jun 14 13:48:59 2011
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Tue Jun 14 08:37:57 UTC 2011 - lslezak@suse.cz
+
+- support for download in advance mode in yast2-wagon (fate#308951)
+- 2.21.2
+
+-------------------------------------------------------------------
Mon Jun 13 13:28:56 UTC 2011 - lslezak@suse.cz
- properly count to be downloaded packages (bnc#683977)
Modified: trunk/packager/src/clients/inst_rpmcopy.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/src/clients/inst_rpmcopy.ycp?rev=64339&r1=64338&r2=64339&view=diff
==============================================================================
--- trunk/packager/src/clients/inst_rpmcopy.ycp (original)
+++ trunk/packager/src/clients/inst_rpmcopy.ycp Tue Jun 14 13:48:59 2011
@@ -199,7 +199,15 @@
}
// returns [ int successful, list failed, list remaining ]
- list commit_result = PackageInstallation::CommitPackages( current_cd_no, 0 );
+ map config = $[ "medium_nr" : current_cd_no ];
+ if (PackageInstallation::DownloadInAdvance() == true)
+ {
+ config["download_mode"] = `download_in_advance;
+ }
+
+ y2milestone("Commit config: %1", config);
+
+ list commit_result = PackageInstallation::Commit(config);
if (commit_result == nil || size (commit_result) == 0)
{
@@ -434,8 +442,13 @@
// sync package manager FIXME
if (result != `abort && ! Stage::initial ())
{
- y2milestone ("Calling PkgCommit (%1)", 9999);
- Pkg::PkgCommit (9999);
+ map config = $[];
+ if (PackageInstallation::DownloadInAdvance() == true)
+ {
+ config["download_mode"] = `download_in_advance;
+ }
+ y2milestone ("Calling Pkg::Commit(%1)", config);
+ Pkg::Commit(config);
}
// BNC #443755
Modified: trunk/packager/src/modules/PackageInstallation.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/src/modules/PackageInstallation.ycp?rev=64339&r1=64338&r2=64339&view=diff
==============================================================================
--- trunk/packager/src/modules/PackageInstallation.ycp (original)
+++ trunk/packager/src/modules/PackageInstallation.ycp Tue Jun 14 13:48:59 2011
@@ -22,6 +22,17 @@
import "Label";
+ boolean download_in_advance = nil;
+
+ global boolean DownloadInAdvance()
+ {
+ return download_in_advance;
+ }
+
+ global void SetDownloadInAdvance(boolean enable)
+ {
+ download_in_advance = enable;
+ }
global define any FakePackager( list<list> packages, string inst_source,
boolean deleting );
@@ -82,10 +93,8 @@
* Return: [ int successful, list failed, list remaining, list srcremaining ]
*
**/
- global define list CommitPackages (integer media_number,
- integer packages_installed)
+ global define list Commit(map config)
{
- y2milestone("CommitPackages called: media nr. %1, packages %2", media_number, packages_installed);
if ( Mode::test () )
{
@@ -96,8 +105,6 @@
}
// install packages from this media
- y2milestone ("CommitPackages (%1,%2): Pkg::TargetGetDU() %3",
- media_number, packages_installed, Pkg::TargetGetDU());
list <integer> sources = Pkg::SourceGetCurrent (false);
integer source_id = sources[0]:0;
@@ -112,47 +119,30 @@
y2milestone("ID of the first repository: %1", first_source);
- if (media_number == 0)
+ if (config["medium_nr"]:0 == 0)
{
PackageSlideShow::SetCurrentCdNo (first_source, 1);
}
else
{
- PackageSlideShow::SetCurrentCdNo (first_source, media_number);
+ PackageSlideShow::SetCurrentCdNo (first_source, config["medium_nr"]:0);
}
PackageSlideShow::UpdateAllCdProgress (false);
SlideShow::StartTimer();
- boolean do_commit = true;
- if (media_number != 0)
- {
- list