Author: locilka
Date: Wed Apr 23 15:33:28 2008
New Revision: 46990
URL: http://svn.opensuse.org/viewcvs/yast?rev=46990&view=rev
Log:
- Added new client for run_update that does the real update, the
old update client is left to handle command-line or to call
the new client (bnc #382044).
Added:
trunk/update/src/clients/run_update.ycp
Modified:
trunk/update/package/yast2-update.changes
trunk/update/src/clients/Makefile.am
trunk/update/src/clients/update.ycp
trunk/update/yast2-update.spec.in
Modified: trunk/update/package/yast2-update.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/update/package/yast2-update.changes?rev=46990&r1=46989&r2=46990&view=diff
==============================================================================
--- trunk/update/package/yast2-update.changes (original)
+++ trunk/update/package/yast2-update.changes Wed Apr 23 15:33:28 2008
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Wed Apr 23 15:29:55 CEST 2008 - locilka@suse.cz
+
+- Added new client for run_update that does the real update, the
+ old update client is left to handle command-line or to call
+ the new client (bnc #382044).
+
+-------------------------------------------------------------------
Fri Apr 11 18:05:54 CEST 2008 - locilka@suse.cz
- Added missing </p> (bnc #377476).
Modified: trunk/update/src/clients/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/trunk/update/src/clients/Makefile.am?rev=46990&r1=46989&r2=46990&view=diff
==============================================================================
--- trunk/update/src/clients/Makefile.am (original)
+++ trunk/update/src/clients/Makefile.am Wed Apr 23 15:33:28 2008
@@ -12,7 +12,8 @@
packages_proposal.ycp \
backup_proposal.ycp \
update.ycp \
- inst_update_partition.ycp
+ inst_update_partition.ycp \
+ run_update.ycp
EXTRA_DIST = $(client_DATA)
Added: trunk/update/src/clients/run_update.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/update/src/clients/run_update.ycp?rev=46990&view=auto
==============================================================================
--- trunk/update/src/clients/run_update.ycp (added)
+++ trunk/update/src/clients/run_update.ycp Wed Apr 23 15:33:28 2008
@@ -0,0 +1,49 @@
+/**
+ * File: clients/update.ycp
+ * Module: System update
+ * Summary: Update client that actually does the update
+ * it's called from ypdate.ycp
+ * Authors: Klaus Kaempf
+ * Arvin Schnell
+ * Lukas Ocilka
+ *
+ * $Id$
+ */
+
+{
+ textdomain "update";
+
+ import "PackageLock";
+ import "Mode";
+ import "ProductControl";
+ import "Wizard";
+ import "Update";
+
+ // check whether having the packager for ourselves
+ if (! PackageLock::Check ())
+ return `abort;
+
+ // set normal mode and update
+ Mode::SetMode ("update");
+
+ Update::disallow_upgrade = true;
+ Update::onlyUpdateInstalled = true;
+ Update::deleteOldPackages = false;
+
+ ProductControl::custom_control_file = "/usr/share/YaST2/control/update.xml";
+
+ Wizard::OpenNextBackStepsDialog();
+ Wizard::SetNextButton(`next, _("&Update"));
+ if (!ProductControl::Init())
+ {
+ y2error("control file %1 not found", ProductControl::custom_control_file );
+ }
+ list<map> stage_mode = [$["stage": "normal", "mode": Mode::mode() ]];
+ ProductControl::AddWizardSteps(stage_mode);
+
+ symbol ret = ProductControl::Run();
+
+ Wizard::CloseDialog ();
+
+ return `next;
+}
Modified: trunk/update/src/clients/update.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/update/src/clients/update.ycp?rev=46990&r1=46989&r2=46990&view=diff
==============================================================================
--- trunk/update/src/clients/update.ycp (original)
+++ trunk/update/src/clients/update.ycp Wed Apr 23 15:33:28 2008
@@ -12,14 +12,9 @@
{
textdomain "update";
- import "Mode";
- import "Update";
- import "Wizard";
- import "ProductControl";
- import "Label";
- import "Mode";
import "GetInstArgs";
import "CommandLine";
+ import "Mode";
// Bugzilla #269910, CommanLine "support"
// argmap is only a map, CommandLine uses string parameters
@@ -31,33 +26,9 @@
return `auto;
}
- // somewhere, DirInstall is imported that wants Pkg in the constructor
- import "PackageLock";
- // check whether having the packager for ourselves
- if (! PackageLock::Check ())
- return `abort;
-
- // set normal mode and update
- Mode::SetMode ("update");
-
- Update::disallow_upgrade = true;
- Update::onlyUpdateInstalled = true;
- Update::deleteOldPackages = false;
-
- ProductControl::custom_control_file = "/usr/share/YaST2/control/update.xml";
-
- Wizard::OpenNextBackStepsDialog();
- Wizard::SetNextButton(`next, _("&Update"));
- if (!ProductControl::Init())
- {
- y2error("control file %1 not found", ProductControl::custom_control_file );
- }
- list<map> stage_mode = [$["stage": "normal", "mode": Mode::mode() ]];
- ProductControl::AddWizardSteps(stage_mode);
-
- symbol ret = ProductControl::Run();
-
- Wizard::CloseDialog ();
+ y2milestone ("Running: run_update");
+ symbol ret = (symbol) WFM::CallFunction ("run_update", WFM::Args());
+ y2milestone ("Returned: %1", ret);
- return `next;
+ return ret;
}
Modified: trunk/update/yast2-update.spec.in
URL: http://svn.opensuse.org/viewcvs/yast/trunk/update/yast2-update.spec.in?rev=46990&r1=46989&r2=46990&view=diff
==============================================================================
--- trunk/update/yast2-update.spec.in (original)
+++ trunk/update/yast2-update.spec.in Wed Apr 23 15:33:28 2008
@@ -77,3 +77,4 @@
@desktopdir@/update.desktop
/usr/share/YaST2/control/update.xml
@clientdir@/update.ycp
+@clientdir@/run_update.ycp
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org