Mailinglist Archive: yast-commit (62 mails)

< Previous Next >
[yast-commit] r62510 - /branches/tmp/jsrain/unattended-migration/update/src/clients/inst_update_partition_auto.ycp
  • From: jsrain@xxxxxxxxxxxxxxxxx
  • Date: Thu, 30 Sep 2010 15:26:13 -0000
  • Message-id: <20100930152613.5738D322E1@xxxxxxxxxxxxxxxxx>
Author: jsrain
Date: Thu Sep 30 17:26:12 2010
New Revision: 62510

URL: http://svn.opensuse.org/viewcvs/yast?rev=62510&view=rev
Log:
added missing file

Added:

branches/tmp/jsrain/unattended-migration/update/src/clients/inst_update_partition_auto.ycp

Added:
branches/tmp/jsrain/unattended-migration/update/src/clients/inst_update_partition_auto.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/jsrain/unattended-migration/update/src/clients/inst_update_partition_auto.ycp?rev=62510&view=auto
==============================================================================
---
branches/tmp/jsrain/unattended-migration/update/src/clients/inst_update_partition_auto.ycp
(added)
+++
branches/tmp/jsrain/unattended-migration/update/src/clients/inst_update_partition_auto.ycp
Thu Sep 30 17:26:12 2010
@@ -0,0 +1,76 @@
+/**
+ * Module: inst_update_partition.ycp
+ *
+ * Authors: Stefan Schubert <schubi@xxxxxxx>
+ * Arvin Schnell <arvin@xxxxxxx>
+ *
+ * Purpose: Select root partition for update or booting.
+ * RootPart::rootPartitions must be filled before
+ * calling this module.
+ *
+ * $Id:$
+ */
+{
+textdomain "update";
+
+import "ProductControl";
+import "RootPart";
+
+include "update/rootpart.ycp";
+
+if (RootPart::Mounted ()) {
+ Update::Detach ();
+ RootPart::UnmountPartitions (false);
+}
+
+RootPart::Detect ();
+// if there is only one suitable partition which can be mounted, use it
without asking
+string target_system = "";
+
+
+map<string,map> partitions = filter (string name, map p,
RootPart::rootPartitions, {
+ return true;
+ return p[`valid]:false;
+});
+
+if (size (partitions) == 1)
+{
+ y2milestone ("Auto-mounting system located at %1", target_system);
+ RootPart::selectedRootPartition = target_system;
+ RootPart::targetOk = RootPart::mount_target ();
+
+ // Not mounted correctly
+ if (! RootPart::targetOk) {
+ // error report
+ Report::Error (_("Failed to mount target system"));
+ UmountMountedPartition();
+ // Correctly mounted but incomplete installation found
+ } else if (RootPart::IncompleteInstallationDetected
(Installation::destdir)) {
+ Report::Error (_("A possibly incomplete installation has been
detected."));
+ UmountMountedPartition();
+ }
+ else if (!(Pkg::TargetInitialize (Installation::destdir) &&
Pkg::TargetLoad()))
+ {
+ Report::Error ("Initializing the target system failed");
+ UmountMountedPartition();
+ Pkg::TargetFinish();
+ }
+ else
+ {
+ return `next;
+ }
+}
+symbol ret = RootPartitionDialog (`update_dialog);
+
+if (ret == `next)
+{
+ ret = ProductControl::RunFrom (
+ ProductControl::CurrentStep () + 1,
+ false);
+ if (ret == `next)
+ ret = `finish;
+}
+
+return ret;
+
+}

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages