Author: jsrain
Date: Mon Jun 25 18:22:25 2007
New Revision: 39018
URL: http://svn.opensuse.org/viewcvs/yast?rev=39018&view=rev
Log:
backup to SVN, not yet working version
Added:
trunk/live-installer/
trunk/live-installer/.cvsignore
trunk/live-installer/MAINTAINER
trunk/live-installer/Makefile.cvs
trunk/live-installer/RPMNAME
trunk/live-installer/VERSION
trunk/live-installer/agents/
trunk/live-installer/agents/.cvsignore
trunk/live-installer/agents/Makefile.am
trunk/live-installer/configure.in.in
trunk/live-installer/doc/
trunk/live-installer/doc/.cvsignore
trunk/live-installer/doc/Makefile.am
trunk/live-installer/doc/autodocs/
trunk/live-installer/doc/autodocs/.cvsignore
trunk/live-installer/doc/autodocs/Makefile.am
trunk/live-installer/package/
trunk/live-installer/package/.cvsignore
trunk/live-installer/package/yast2-live-installer.changes
trunk/live-installer/src/
trunk/live-installer/src/.cvsignore
trunk/live-installer/src/LiveInstaller.ycp
trunk/live-installer/src/Makefile.am
trunk/live-installer/src/complex.ycp
trunk/live-installer/src/control/
trunk/live-installer/src/control/live-install.xml
trunk/live-installer/src/dialogs.ycp
trunk/live-installer/src/helps.ycp
trunk/live-installer/src/live-installer.desktop
trunk/live-installer/src/live-installer.ycp
trunk/live-installer/src/live_doit.ycp
trunk/live-installer/src/wizards.ycp
trunk/live-installer/testsuite/
trunk/live-installer/testsuite/.cvsignore
trunk/live-installer/testsuite/Makefile.am
trunk/live-installer/testsuite/tests/
trunk/live-installer/testsuite/tests/.cvsignore
trunk/live-installer/testsuite/tests/LiveInstaller.err
trunk/live-installer/testsuite/tests/LiveInstaller.out
trunk/live-installer/testsuite/tests/LiveInstaller.ycp
trunk/live-installer/yast2-live-installer.spec.in
Added: trunk/live-installer/.cvsignore
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/.cvsignore?rev=39018&view=auto
==============================================================================
--- trunk/live-installer/.cvsignore (added)
+++ trunk/live-installer/.cvsignore Mon Jun 25 18:22:25 2007
@@ -0,0 +1,20 @@
+Makefile
+Makefile.am
+Makefile.am.common
+Makefile.in
+aclocal.m4
+config.cache
+config.guess
+config.h.in
+config.log
+config.status
+config.sub
+configure
+configure.in
+depcomp
+install-sh
+missing
+mkinstalldirs
+stamp-h
+live-installer.pot
+autom4te.cache
Added: trunk/live-installer/MAINTAINER
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/MAINTAINER?rev=39018&view=auto
==============================================================================
--- trunk/live-installer/MAINTAINER (added)
+++ trunk/live-installer/MAINTAINER Mon Jun 25 18:22:25 2007
@@ -0,0 +1 @@
+Jiri Srain
Added: trunk/live-installer/Makefile.cvs
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/Makefile.cvs?rev=39018&view=auto
==============================================================================
--- trunk/live-installer/Makefile.cvs (added)
+++ trunk/live-installer/Makefile.cvs Mon Jun 25 18:22:25 2007
@@ -0,0 +1,18 @@
+#
+# Makefile.cvs
+#
+configure: all
+ ./configure
+
+all:
+ y2tool y2autoconf
+ y2tool y2automake
+ autoreconf --force --install
+
+install: configure
+ make
+ make install
+
+reconf: all
+ ./config.status --recheck
+ ./config.status
Added: trunk/live-installer/RPMNAME
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/RPMNAME?rev=39018&view=auto
==============================================================================
--- trunk/live-installer/RPMNAME (added)
+++ trunk/live-installer/RPMNAME Mon Jun 25 18:22:25 2007
@@ -0,0 +1 @@
+yast2-live-installer
Added: trunk/live-installer/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/VERSION?rev=39018&view=auto
==============================================================================
--- trunk/live-installer/VERSION (added)
+++ trunk/live-installer/VERSION Mon Jun 25 18:22:25 2007
@@ -0,0 +1 @@
+2.13.0
Added: trunk/live-installer/agents/.cvsignore
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/agents/.cvsignore?rev=39018&view=auto
==============================================================================
--- trunk/live-installer/agents/.cvsignore (added)
+++ trunk/live-installer/agents/.cvsignore Mon Jun 25 18:22:25 2007
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
Added: trunk/live-installer/agents/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/agents/Makefile.am?rev=39018&view=auto
==============================================================================
--- trunk/live-installer/agents/Makefile.am (added)
+++ trunk/live-installer/agents/Makefile.am Mon Jun 25 18:22:25 2007
@@ -0,0 +1,7 @@
+# Makefile.am for live-installer/agents
+
+agent_SCRIPTS =
+
+scrconf_DATA =
+
+EXTRA_DIST = $(agent_SCRIPTS) $(scrconf_DATA)
Added: trunk/live-installer/configure.in.in
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/configure.in.in?rev=39018&view=auto
==============================================================================
--- trunk/live-installer/configure.in.in (added)
+++ trunk/live-installer/configure.in.in Mon Jun 25 18:22:25 2007
@@ -0,0 +1,12 @@
+## YCP module configure.in.in
+
+## Initialize
+@YAST2-INIT-COMMON@
+@YAST2-INIT-YCP@
+
+## some common checks
+@YAST2-CHECKS-COMMON@
+@YAST2-CHECKS-YCP@
+
+## and generate the output...
+@YAST2-OUTPUT@
Added: trunk/live-installer/doc/.cvsignore
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/doc/.cvsignore?rev=39018&view=auto
==============================================================================
--- trunk/live-installer/doc/.cvsignore (added)
+++ trunk/live-installer/doc/.cvsignore Mon Jun 25 18:22:25 2007
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
Added: trunk/live-installer/doc/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/doc/Makefile.am?rev=39018&view=auto
==============================================================================
--- trunk/live-installer/doc/Makefile.am (added)
+++ trunk/live-installer/doc/Makefile.am Mon Jun 25 18:22:25 2007
@@ -0,0 +1,10 @@
+# Makefile.am for live-installer/doc
+
+SUBDIRS = autodocs
+
+htmldir = $(docdir)
+
+doc_DATA =
+html_DATA =
+
+EXTRA_DIST = $(doc_DATA) $(html_DATA)
Added: trunk/live-installer/doc/autodocs/.cvsignore
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/doc/autodocs/.cvsignore?rev=39018&view=auto
==============================================================================
--- trunk/live-installer/doc/autodocs/.cvsignore (added)
+++ trunk/live-installer/doc/autodocs/.cvsignore Mon Jun 25 18:22:25 2007
@@ -0,0 +1,3 @@
+Makefile
+Makefile.in
+*.html
Added: trunk/live-installer/doc/autodocs/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/doc/autodocs/Makefile.am?rev=39018&view=auto
==============================================================================
--- trunk/live-installer/doc/autodocs/Makefile.am (added)
+++ trunk/live-installer/doc/autodocs/Makefile.am Mon Jun 25 18:22:25 2007
@@ -0,0 +1,3 @@
+# Makefile.am for live-installer/doc/autodocs
+
+include $(top_srcdir)/autodocs-ycp.ami
Added: trunk/live-installer/package/.cvsignore
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/package/.cvsignore?rev=39018&view=auto
==============================================================================
--- trunk/live-installer/package/.cvsignore (added)
+++ trunk/live-installer/package/.cvsignore Mon Jun 25 18:22:25 2007
@@ -0,0 +1,2 @@
+*.spec
+*.bz2
Added: trunk/live-installer/package/yast2-live-installer.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/package/yast2-live-installer.changes?rev=39018&view=auto
==============================================================================
--- trunk/live-installer/package/yast2-live-installer.changes (added)
+++ trunk/live-installer/package/yast2-live-installer.changes Mon Jun 25 18:22:25 2007
@@ -0,0 +1,4 @@
+-------------------------------------------------------------------
+Mon Jun 25 09:14:19 2007 - jsrain@suse.cz
+
+- initial version
Added: trunk/live-installer/src/.cvsignore
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/src/.cvsignore?rev=39018&view=auto
==============================================================================
--- trunk/live-installer/src/.cvsignore (added)
+++ trunk/live-installer/src/.cvsignore Mon Jun 25 18:22:25 2007
@@ -0,0 +1,4 @@
+Makefile
+Makefile.in
+*.ybc
+.dep
Added: trunk/live-installer/src/LiveInstaller.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/src/LiveInstaller.ycp?rev=39018&view=auto
==============================================================================
--- trunk/live-installer/src/LiveInstaller.ycp (added)
+++ trunk/live-installer/src/LiveInstaller.ycp Mon Jun 25 18:22:25 2007
@@ -0,0 +1,49 @@
+/* ------------------------------------------------------------------------------
+ * Copyright (c) 2006 Novell, Inc. All Rights Reserved.
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of version 2 of the GNU General Public License as published by the
+ * Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, contact Novell, Inc.
+ *
+ * To contact Novell about this file by physical or electronic mail, you may find
+ * current contact information at www.novell.com.
+ * ------------------------------------------------------------------------------
+ */
+
+/**
+ * File: modules/LiveInstaller.ycp
+ * Package: Configuration of live-installer
+ * Summary: LiveInstaller settings, input and output functions
+ * Authors: Jiri Srain
+ *
+ * $Id: LiveInstaller.ycp 37292 2007-04-03 16:38:49Z mvidner $
+ *
+ * Representation of the configuration of live-installer.
+ * Input and output routines.
+ */
+
+{
+
+module "LiveInstaller";
+textdomain "live-installer";
+
+import "ProductControl";
+
+
+global string live_control_file =
+ "/etc/YaST2/live-install.xml";
+
+global void LiveInstaller()
+{
+}
+
+/* EOF */
+}
Added: trunk/live-installer/src/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/src/Makefile.am?rev=39018&view=auto
==============================================================================
--- trunk/live-installer/src/Makefile.am (added)
+++ trunk/live-installer/src/Makefile.am Mon Jun 25 18:22:25 2007
@@ -0,0 +1,31 @@
+# Makefile.am for live-installer/src
+
+yncludedir = @yncludedir@/live-installer
+
+client_DATA = \
+ live-installer.ycp \
+ live_doit.ycp \
+ live_finish.ycp \
+ live_stage_normal.ycp \
+ live_stage_initial.ycp
+
+ynclude_DATA = \
+ helps.ycp \
+ wizards.ycp \
+ dialogs.ycp \
+ complex.ycp
+
+desktop_DATA = \
+ live-installer.desktop
+
+module_DATA = \
+ LiveInstaller.ycp
+
+# create a symlink for local build, #145327
+live-installer:
+ ln -sf . $@
+ycpchook = live-installer
+
+EXTRA_DIST = $(client_DATA) $(ynclude_DATA) $(module_DATA) $(desktop_DATA)
+
+include $(top_srcdir)/Makefile.am.common
Added: trunk/live-installer/src/complex.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/src/complex.ycp?rev=39018&view=auto
==============================================================================
--- trunk/live-installer/src/complex.ycp (added)
+++ trunk/live-installer/src/complex.ycp Mon Jun 25 18:22:25 2007
@@ -0,0 +1,205 @@
+/* ------------------------------------------------------------------------------
+ * Copyright (c) 2006 Novell, Inc. All Rights Reserved.
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of version 2 of the GNU General Public License as published by the
+ * Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, contact Novell, Inc.
+ *
+ * To contact Novell about this file by physical or electronic mail, you may find
+ * current contact information at www.novell.com.
+ * ------------------------------------------------------------------------------
+ */
+
+/**
+ * File: include/live-installer/complex.ycp
+ * Package: Configuration of live-installer
+ * Summary: Dialogs definitions
+ * Authors: Jiri Srain
+ *
+ * $Id: complex.ycp 29363 2006-03-24 08:20:43Z mzugec $
+ */
+
+{
+
+textdomain "live-installer";
+
+import "Label";
+import "Popup";
+import "Wizard";
+import "Wizard_hw";
+import "Confirm";
+import "LiveInstaller";
+
+
+include "live-installer/helps.ycp";
+
+/**
+ * Return a modification status
+ * @return true if data was modified
+ */
+boolean Modified() {
+ return LiveInstaller::Modified();
+}
+
+boolean ReallyAbort() {
+ return !LiveInstaller::Modified() || Popup::ReallyAbort(true);
+}
+
+boolean PollAbort() {
+ return UI::PollInput() == `abort;
+}
+
+/**
+ * Read settings dialog
+ * @return `abort if aborted and `next otherwise
+ */
+symbol ReadDialog() {
+ Wizard::RestoreHelp(HELPS["read"]:"");
+ // LiveInstaller::AbortFunction = PollAbort;
+ if (!Confirm::MustBeRoot()) return `abort;
+ boolean ret = LiveInstaller::Read();
+ return ret ? `next : `abort;
+}
+
+/**
+ * Write settings dialog
+ * @return `abort if aborted and `next otherwise
+ */
+symbol WriteDialog() {
+ Wizard::RestoreHelp(HELPS["write"]:"");
+ // LiveInstaller::AbortFunction = PollAbort;
+ boolean ret = LiveInstaller::Write();
+ return ret ? `next : `abort;
+}
+
+/**
+ * Summary dialog
+ * @return dialog result
+ */
+any SummaryDialog() {
+
+ /* LiveInstaller summary dialog caption */
+ string caption = _("LiveInstaller Configuration");
+
+ /* FIXME */
+ list summary = LiveInstaller::Summary();
+ list unconfigured = summary[1]:[];
+ string configured = summary[0]:"";
+
+ /* Frame label */
+ term contents = Wizard_hw::DetectedContent(_("LiveInstaller to Configure"),
+ unconfigured, false, configured);
+
+ Wizard::SetContentsButtons(caption, contents, HELPS["summary"]:"",
+ Label::BackButton(), Label::FinishButton());
+
+ any ret = nil;
+ while(true) {
+
+ ret = UI::UserInput();
+
+ /* abort? */
+ if(ret == `abort || ret == `cancel || ret == `back) {
+ if(ReallyAbort()) break;
+ else continue;
+ }
+ /* overview dialog */
+ else if(ret == `edit_button) {
+ ret = `overview;
+ break;
+ }
+ /* configure the selected device */
+ else if(ret == `configure_button) {
+ // TODO FIXME: check for change of the configuration
+ any selected = UI::QueryWidget(`id(`detected_selbox), `CurrentItem);
+ if(selected == `other) {
+ ret = `other;
+ }
+ else {
+ ret = `configure;
+ }
+ break;
+ }
+ else if(ret == `next) {
+ break;
+ }
+ else {
+ y2error("unexpected retcode: %1", ret);
+ continue;
+ }
+ }
+
+ return ret;
+}
+
+/**
+ * Overview dialog
+ * @return dialog result
+ */
+any OverviewDialog() {
+
+ /* LiveInstaller overview dialog caption */
+ string caption = _("LiveInstaller Overview");
+
+ list overview = LiveInstaller::Overview();
+
+ /* FIXME table header */
+ term contents = Wizard_hw::ConfiguredContent(
+ /* Table header */
+ `header(_("Number"), _("LiveInstaller")),
+ overview, nil, nil, nil, nil );
+
+ contents = Wizard_hw::SpacingAround(contents, 1.5, 1.5, 1.0, 1.0);
+
+ Wizard::SetContentsButtons(caption, contents, HELPS["overview"]:"",
+ Label::BackButton(), Label::FinishButton());
+
+ any ret = nil;
+ while(true) {
+
+ ret = UI::UserInput();
+
+ /* abort? */
+ if(ret == `abort || ret == `cancel) {
+ if(ReallyAbort()) break;
+ else continue;
+ }
+ /* add */
+ else if(ret == `add_button) {
+ /* FIXME */
+ ret = `add;
+ break;
+ }
+ /* edit */
+ else if(ret == `edit_button) {
+ /* FIXME */
+ ret = `edit;
+ break;
+ }
+ /* delete */
+ else if(ret == `delete_button) {
+ /* FIXME */
+ continue;
+ }
+ else if(ret == `next || ret == `back) {
+ break;
+ }
+ else {
+ y2error("unexpected retcode: %1", ret);
+ continue;
+ }
+ }
+
+ return ret;
+}
+
+/* EOF */
+}
Added: trunk/live-installer/src/control/live-install.xml
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/src/control/live-install.xml?rev=39018&view=auto
==============================================================================
--- trunk/live-installer/src/control/live-install.xml (added)
+++ trunk/live-installer/src/control/live-install.xml Mon Jun 25 18:22:25 2007
@@ -0,0 +1,148 @@
+<?xml version="1.0"?>
+http://www.suse.com/1.0/yast2ns"
+ xmlns:config="http://www.suse.com/1.0/configns">
+
+<!--
+Work around for the text domain
+textdomain="live-installer"
+-->
+
+ <textdomain>control</textdomain>
+ <globals>
+
+ true
+ true
+ false
+ never
+ 95
+ true
+ true
+ simple
+ false
+ true
+ true
+ true
+ true
+ false
+ true
+ false
+
+ <!-- FATE #301937, Save /root content from the installation system to the installed system -->
+
+
+ /root/
+ /root/inst-sys/
+
+
+ </globals>
+
+ <software>
+ true
+ auto
+
+ <!-- FATE #300898, List of external sources accesible during the installaion time -->
+ http://seven-swords.net/Repos/openSUSE_10.3/testing_list_of_repositories.xml
+ </software>
+
+ <partitioning>
+ false
+ true
+ 7G
+ 40
+ 5G
+ 20G
+ false
+ false
+ 15G
+ 25G
+ false
+ </partitioning>
+
+ <network>
+ false
+ laptop
+ <startmode>ifplugd</startmode>
+ </network>
+
+ <texts>
+ <congratulate>
+ <label>
+<p><b>Congratulations!</b></p>
+<p>The installation of openSUSE on your machine is complete.
+After clicking <b>Finish</b>, you can log in to the system.</p>
+<p>Visit us at %1.</p>
+<p>Have a lot of fun!<br>Your openSUSE Development Team</p>
+ </label>
+ </congratulate>
+ </texts>
+
+ <proposals config:type="list">
+ <proposal>
+ <label>Live Installation Settings</label>
+ <mode>installation</mode>
+ <stage>normal</stage>
+ <name>initial</name>
+ no
+
+ hwinfo
+ partitions
+ bootloader
+
+ </proposal>
+ </proposals>
+
+ <!-- Stage: Initial, Mode: Installation -->
+ <workflows config:type="list">
+ <workflow>
+ <defaults>
+ <archs>all</archs>
+ yes
+ yes
+ </defaults>
+ <label>Installation</label>
+ <mode>installation</mode>
+ <stage>normal</stage>
+ <modules config:type="list">
+ <module>
+ <label>Installation Summary</label>
+ <name>inst_proposal</name>
+ <proposal>initial</proposal>
+ </module>
+ <module>
+ <label>Perform Installation</label>
+ <name>live_stage_initial</name>
+ </module>
+ <module>
+ <label>Perform Installation</label>
+ <name>inst_do_resize</name>
+ <update config:type="boolean">false</update>
+ <archs>i386,x86_64,ia64</archs>
+ </module>
+ <module>
+ <label>Perform Installation</label>
+ <name>inst_prepdisk</name>
+ </module>
+ <module>
+ <label>Perform Installation</label>
+ <name>inst_kickoff</name>
+ </module>
+ <module>
+ <label>Perform Installation</label>
+ <name>live_mode_normal</name>
+ </module>
+ <module>
+ <label>Perform Installation</label>
+ <name>live_doit</name>
+ no
+ no
+ </module>
+ <module>
+ <label>Perform Installation</label>
+ <name>live_finish</name>
+ no
+ </module>
+ </modules>
+ </workflow>
+
+ </workflows>
+</productDefines>
Added: trunk/live-installer/src/dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/src/dialogs.ycp?rev=39018&view=auto
==============================================================================
--- trunk/live-installer/src/dialogs.ycp (added)
+++ trunk/live-installer/src/dialogs.ycp Mon Jun 25 18:22:25 2007
@@ -0,0 +1,115 @@
+/* ------------------------------------------------------------------------------
+ * Copyright (c) 2006 Novell, Inc. All Rights Reserved.
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of version 2 of the GNU General Public License as published by the
+ * Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, contact Novell, Inc.
+ *
+ * To contact Novell about this file by physical or electronic mail, you may find
+ * current contact information at www.novell.com.
+ * ------------------------------------------------------------------------------
+ */
+
+/**
+ * File: include/live-installer/dialogs.ycp
+ * Package: Configuration of live-installer
+ * Summary: Dialogs definitions
+ * Authors: Jiri Srain
+ *
+ * $Id: dialogs.ycp 27914 2006-02-13 14:32:08Z locilka $
+ */
+
+{
+
+textdomain "live-installer";
+
+import "Label";
+import "Wizard";
+import "LiveInstaller";
+
+include "live-installer/helps.ycp";
+
+/**
+ * Configure1 dialog
+ * @return dialog result
+ */
+any Configure1Dialog () {
+
+ /* LiveInstaller configure1 dialog caption */
+ string caption = _("LiveInstaller Configuration");
+
+ /* LiveInstaller configure1 dialog contents */
+ term contents = `Label (_("First part of configuration of live-installer"));
+
+ Wizard::SetContentsButtons(caption, contents, HELPS["c1"]:"",
+ Label::BackButton(), Label::NextButton());
+
+ any ret = nil;
+ while(true) {
+
+ ret = UI::UserInput();
+
+ /* abort? */
+ if(ret == `abort || ret == `cancel) {
+ if(ReallyAbort()) break;
+ else continue;
+ }
+ else if(ret == `next || ret == `back) {
+ break;
+ }
+ else {
+ y2error("unexpected retcode: %1", ret);
+ continue;
+ }
+ }
+
+ return ret;
+}
+
+/**
+ * Configure2 dialog
+ * @return dialog result
+ */
+any Configure2Dialog () {
+
+ /* LiveInstaller configure2 dialog caption */
+ string caption = _("LiveInstaller Configuration");
+
+ /* LiveInstaller configure2 dialog contents */
+ term contents = `Label (_("Second part of configuration of live-installer"));
+
+ Wizard::SetContentsButtons(caption, contents, HELPS["c2"]:"",
+ Label::BackButton(), Label::NextButton());
+
+ any ret = nil;
+ while(true) {
+
+ ret = UI::UserInput();
+
+ /* abort? */
+ if(ret == `abort || ret == `cancel) {
+ if(ReallyAbort()) break;
+ else continue;
+ }
+ else if(ret == `next || ret == `back) {
+ break;
+ }
+ else {
+ y2error("unexpected retcode: %1", ret);
+ continue;
+ }
+ }
+
+ return ret;
+}
+
+/* EOF */
+}
Added: trunk/live-installer/src/helps.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/src/helps.ycp?rev=39018&view=auto
==============================================================================
--- trunk/live-installer/src/helps.ycp (added)
+++ trunk/live-installer/src/helps.ycp Mon Jun 25 18:22:25 2007
@@ -0,0 +1,119 @@
+/* ------------------------------------------------------------------------------
+ * Copyright (c) 2006 Novell, Inc. All Rights Reserved.
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of version 2 of the GNU General Public License as published by the
+ * Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, contact Novell, Inc.
+ *
+ * To contact Novell about this file by physical or electronic mail, you may find
+ * current contact information at www.novell.com.
+ * ------------------------------------------------------------------------------
+ */
+
+/**
+ * File: include/live-installer/helps.ycp
+ * Package: Configuration of live-installer
+ * Summary: Help texts of all the dialogs
+ * Authors: Jiri Srain
+ *
+ * $Id: helps.ycp 27914 2006-02-13 14:32:08Z locilka $
+ */
+
+{
+
+textdomain "live-installer";
+
+/**
+ * All helps are here
+ */
+map HELPS = $[
+
+ /* Read dialog help 1/2 */
+ "read" : _("<p><b><big>Initializing live-installer Configuration</big></b><br>
+Please wait...<br></p>
+") +
+
+ /* Read dialog help 2/2 */
+ _("<p><b><big>Aborting Initialization:</big></b><br>
+Safely abort the configuration utility by pressing <b>Abort</b> now.</p>
+"),
+
+ /* Write dialog help 1/2 */
+ "write" : _("<p><b><big>Saving live-installer Configuration</big></b><br>
+Please wait...<br></p>
+") +
+
+ /* Write dialog help 2/2 */
+_("<p><b><big>Aborting Saving:</big></b><br>
+Abort the save procedure by pressing <b>Abort</b>.
+An additional dialog informs whether it is safe to do so.
+</p>
+"),
+
+ /* Summary dialog help 1/3 */
+ "summary" : _("<p><b><big>LiveInstaller Configuration</big></b><br>
+Configure live-installer here.<br></p>
+") +
+
+ /* Summary dialog help 2/3 */
+ _("<p><b><big>Adding a live-installer:</big></b><br>
+Choose an live-installer from the list of detected live-installers.
+If your live-installer was not detected, use <b>Other (not detected)</b>.
+Then press <b>Configure</b>.</p>
+") +
+
+ /* Summary dialog help 3/3 */
+ _("<p><b><big>Editing or Deleting:</big></b><br>
+If you press <b>Edit</b>, an additional dialog in which to change
+the configuration opens.</p>
+"),
+
+ /* Ovreview dialog help 1/3 */
+ "overview" : _("<p><b><big>LiveInstaller Configuration Overview</big></b><br>
+Obtain an overview of installed live-installers. Additionally
+edit their configurations.<br></p>
+") +
+
+ /* Ovreview dialog help 2/3 */
+_("<p><b><big>Adding a live-installer:</big></b><br>
+Press <b>Add</b> to configure a live-installer.</p>") +
+
+ /* Ovreview dialog help 3/3 */
+_("<p><b><big>Editing or Deleting:</big></b><br>
+Choose a live-installer to change or remove.
+Then press <b>Edit</b> or <b>Delete</b> as desired.</p>
+"),
+
+ /* Configure1 dialog help 1/2 */
+ "c1" : _("<p><b><big>Configuration Part One</big></b><br>
+Press <b>Next</b> to continue.
+<br></p>") +
+
+ /* Configure1 dialog help 2/2 */
+_("<p><b><big>Selecting Something</big></b><br>
+It is not possible. You must code it first. :-)
+</p>"),
+
+ /* Configure2 dialog help 1/2 */
+ "c2" : _("<p><b><big>Configuration Part Two</big></b><br>
+Press <b>Next</b> to continue.
+<br></p>
+") +
+
+ /* Configure2 dialog help 2/2 */
+_("<p><b><big>Selecting Something</big></b><br>
+It is not possible. You must code it first. :-)
+</p>"),
+
+];
+
+/* EOF */
+}
Added: trunk/live-installer/src/live-installer.desktop
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/src/live-installer.desktop?rev=39018&view=auto
==============================================================================
--- trunk/live-installer/src/live-installer.desktop (added)
+++ trunk/live-installer/src/live-installer.desktop Mon Jun 25 18:22:25 2007
@@ -0,0 +1,24 @@
+[Desktop Entry]
+Type=Application
+Categories=Qt;X-SuSE-YaST;X-SuSE-YaST-Misc;
+
+X-KDE-ModuleType=Library
+X-KDE-RootOnly=true
+X-KDE-HasReadOnlyMode=true
+X-KDE-Library=yast2
+X-SuSE-YaST-Call=live-installer
+
+X-SuSE-YaST-Group=Misc
+X-SuSE-YaST-Argument=
+X-SuSE-YaST-RootOnly=true
+X-SuSE-YaST-AutoInst=
+X-SuSE-YaST-Geometry=
+X-SuSE-YaST-SortKey=
+X-SuSE-YaST-AutoInstResource=live-installer
+
+Icon=yast-live-installer
+Exec=/sbin/yast2 live-installer
+
+Name=LiveInstaller
+GenericName=live-installer
+X-KDE-SubstituteUID=true
Added: trunk/live-installer/src/live-installer.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/src/live-installer.ycp?rev=39018&view=auto
==============================================================================
--- trunk/live-installer/src/live-installer.ycp (added)
+++ trunk/live-installer/src/live-installer.ycp Mon Jun 25 18:22:25 2007
@@ -0,0 +1,52 @@
+/**
+ * Maintainer: Jiri Srain
+ *
+ * $Id: firstboot.ycp 36560 2007-02-28 12:40:38Z lslezak $
+ */
+{
+ textdomain "firstboot";
+
+ import "Mode";
+ import "Stage";
+ import "ProductControl";
+ import "Wizard";
+ import "Report";
+ import "LiveInstaller";
+ import "Misc";
+ import "Installation";
+ import "Storage";
+
+
+ Wizard::OpenNextBackStepsDialog();
+ Installation::destdir = "/mnt";
+ Installation::scr_destdir = "/mnt";
+
+ list<map> stage_mode = [$["stage": "normal", "mode": "installation" ]];
+ y2internal ("SM: %1", stage_mode);
+ Mode::SetMode ("installation");
+ // required in order to make Storage.ycp honor Installation::destdir
+ Stage::Set ("initial");
+ Storage::InitLibstorage ();
+ Stage::Set ("normal");
+
+ ProductControl::custom_control_file = LiveInstaller::live_control_file;
+ if (!ProductControl::Init())
+ y2error("control file %1 not found", ProductControl::custom_control_file );
+ ProductControl::AddWizardSteps(stage_mode);
+
+ // Do log Report messages by default (#180862)
+ Report::LogMessages(true);
+ Report::LogErrors(true);
+ Report::LogWarnings(true);
+
+
+ symbol ret = ProductControl::Run();
+ y2milestone("ProductControl::Run() returned: %1", ret);
+
+ Pkg::SourceFinishAll();
+ Pkg::TargetFinish();
+
+ UI::CloseDialog();
+
+ return ret;
+}
Added: trunk/live-installer/src/live_doit.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/src/live_doit.ycp?rev=39018&view=auto
==============================================================================
--- trunk/live-installer/src/live_doit.ycp (added)
+++ trunk/live-installer/src/live_doit.ycp Mon Jun 25 18:22:25 2007
@@ -0,0 +1,130 @@
+/**
+ * Maintainer: Jiri Srain
+ *
+ * $Id: firstboot.ycp 36560 2007-02-28 12:40:38Z lslezak $
+ */
+{
+textdomain "live-installer";
+
+import "Installation";
+
+Installation::destdir = "/mnt";
+
+/**
+ * Copy a subtree, limit to a single filesystem
+ * @param from string source directory
+ * @param to string target directory
+ * @return boolean true on success
+ */
+boolean FileSystemCopy (string from, string to) {
+/* string fromdir = "/";
+ list<string> components = splitstring (from, "/");
+ if (size (components) > 1)
+ {
+ from = components[size(components) - 1]:"";
+ components[size(components) - 1] = "";
+ fromdir = mergestring (components, "/");
+ }
+ if (fromdir == "")
+ fromdir = "/";
+ if (from == "")
+ from = "/";
+ if (to == "")
+ to = "/";
+ y2milestone ("FromDir: %1, From: %2, To: %3",
+ fromdir, from, to);
+ string cmd = sformat (
+ "(cd %1 ; tar clf - %2 ) | dd | (cd %3 ; tar -xf - )",
+ fromdir, from, to);*/
+ string cmd = sformat ("/bin/cp -avx %1 %2", from, to);
+ y2milestone ("Executing %1", cmd);
+ map out = (map)SCR::Execute (.target.bash_output, cmd);
+ y2milestone ("Result: %1", out);
+ return out["exit"]:-1 == 0;
+}
+
+/**
+ * Find symlinks which need to be resolved and copied
+ * @return a list of such symlinks
+ */
+list<string> LinksToCopyList () {
+ string cmd = sformat ("
+ for LINK in `find %1 -type l -xdev` ; do
+ stat -c \"%%N\" $LINK |grep livecd >/devnull 2>/devnull && echo $LINK;
+ done", Installation::destdir);
+ y2milestone ("Executing %1", cmd);
+ map out = (map)SCR::Execute (.target.bash_output, cmd);
+ y2milestone ("Result: %1", out);
+ if (out["exit"]:-1 != 0)
+ {
+ y2error ("Faild resolving symlinks");
+ return [];
+ }
+ string stdout = out["stdout"]:"";
+ list<string> lines = splitstring (stdout, "\n");
+ lines = filter (string l, lines, { return l != ""; });
+ y2milestone ("Symlinks to resolve: %1", lines);
+ return lines;
+}
+
+/**
+ * Create a map of relevant link pointers
+ * @param list of links which need to be resolved and copied
+ * @return a map $[ link : target ]
+ */
+map LinksMap (list<string> links) {
+ integer dest_length = size (Installation::destdir);
+ map out = listmap (string link, links, {
+ if (substring (link, 0, dest_length) == Installation::destdir)
+ link = substring (link, dest_length);
+ if (substring (link, 0, 1) != "/")
+ link = "/" + link;
+ string target = (string)SCR::Read (.target.symlink, link);
+ return $[ link : target ];
+ });
+ y2milestone ("Resolved symlinks: %1", out);
+ return out;
+}
+
+/**
+ * Copy all the symlinks as needed
+ * @param symlinks a map of resolved symlinks
+ * @return boolean true on success
+ */
+boolean CopySymlinkedImage (map symlinks) {
+ foreach (string link, string target, symlinks, {
+ SCR::Execute (.target.remove, sformat ("%1/%2", Installation::destdir, link));
+/*
+ list<string> components = splitstring (link, "/");
+ while (size(components) > 1
+ && components[size(components) - 1]:"" == "")
+ {
+ components = remove (components, size (components) - 1);
+ }
+ if (size (components) > 1)
+ components[size(components) - 1] = "";
+ link = mergestring (components, "/");
+*/
+ FileSystemCopy ("/" + target, sformat ("%1/%2", Installation::destdir, link));
+ });
+ return true;
+}
+
+/**
+ * Copy root image to hard disk
+ * @return boolean true on success
+ */
+boolean CopyRootImage () {
+ string tmpdir = (string)SCR::Read (.target.tmpdir);
+ SCR::Execute (.target.bash, sformat ("/bin/cp -a %1/etc %2", Installation::destdir, tmpdir));
+ FileSystemCopy ("/", Installation::destdir);
+ SCR::Execute (.target.bash, sformat ("/bin/cp -a %1/etc %2", tmpdir, Installation::destdir));
+ return true;
+}
+
+CopyRootImage ();
+map copy_map = LinksMap (LinksToCopyList ());
+CopySymlinkedImage (copy_map);
+
+
+} // client end
Added: trunk/live-installer/src/wizards.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/src/wizards.ycp?rev=39018&view=auto
==============================================================================
--- trunk/live-installer/src/wizards.ycp (added)
+++ trunk/live-installer/src/wizards.ycp Mon Jun 25 18:22:25 2007
@@ -0,0 +1,177 @@
+/* ------------------------------------------------------------------------------
+ * Copyright (c) 2006 Novell, Inc. All Rights Reserved.
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of version 2 of the GNU General Public License as published by the
+ * Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, contact Novell, Inc.
+ *
+ * To contact Novell about this file by physical or electronic mail, you may find
+ * current contact information at www.novell.com.
+ * ------------------------------------------------------------------------------
+ */
+
+/**
+ * File: include/live-installer/wizards.ycp
+ * Package: Configuration of live-installer
+ * Summary: Wizards definitions
+ * Authors: Jiri Srain
+ *
+ * $Id: wizards.ycp 27914 2006-02-13 14:32:08Z locilka $
+ */
+
+{
+
+textdomain "live-installer";
+
+import "Sequencer";
+import "Wizard";
+
+include "live-installer/complex.ycp";
+include "live-installer/dialogs.ycp";
+
+/**
+ * Add a configuration of live-installer
+ * @return sequence result
+ */
+any AddSequence() {
+
+ /* FIXME: adapt to your needs */
+ map aliases = $[
+ "config1" : ``(Configure1Dialog()),
+ "config2" : ``(Configure2Dialog()),
+ ];
+
+ /* FIXME: adapt to your needs */
+ map sequence = $[
+ "ws_start" : "config1",
+ "config1" : $[
+ `abort : `abort,
+ `next : "config2"
+ ],
+ "config2" : $[
+ `abort : `abort,
+ `next : `next
+ ]
+ ];
+
+ return Sequencer::Run(aliases, sequence);
+}
+
+/**
+ * Main workflow of the live-installer configuration
+ * @return sequence result
+ */
+any MainSequence() {
+
+ /* FIXME: adapt to your needs */
+ map aliases = $[
+ "summary" : ``( SummaryDialog() ),
+ "overview" : ``( OverviewDialog() ),
+ "configure" : [ ``( AddSequence() ), true ],
+ "add" : [ ``( AddSequence() ), true ],
+ "edit" : [ ``( AddSequence() ), true ]
+ ];
+
+ /* FIXME: adapt to your needs */
+ map sequence = $[
+ "ws_start" : "summary",
+ "summary" : $[
+ `abort : `abort,
+ `next : `next,
+ `overview : "overview",
+ `configure : "configure",
+ `other : "configure",
+ ],
+ "overview" : $[
+ `abort : `abort,
+ `next : `next,
+ `add : "add",
+ `edit : "edit",
+ ],
+ "configure" : $[
+ `abort : `abort,
+ `next : "summary",
+ ],
+ "add" : $[
+ `abort : `abort,
+ `next : "overview",
+ ],
+ "edit" : $[
+ `abort : `abort,
+ `next : "overview",
+ ]
+ ];
+
+ any ret = Sequencer::Run(aliases, sequence);
+
+ return ret;
+}
+
+/**
+ * Whole configuration of live-installer
+ * @return sequence result
+ */
+any LiveInstallerSequence() {
+
+ map aliases = $[
+ "read" : [ ``( ReadDialog() ), true ],
+ "main" : ``( MainSequence() ),
+ "write" : [ ``( WriteDialog() ), true ]
+ ];
+
+ map sequence = $[
+ "ws_start" : "read",
+ "read" : $[
+ `abort : `abort,
+ `next : "main"
+ ],
+ "main" : $[
+ `abort : `abort,
+ `next : "write"
+ ],
+ "write" : $[
+ `abort : `abort,
+ `next : `next
+ ]
+ ];
+
+ Wizard::CreateDialog();
+
+ any ret = Sequencer::Run(aliases, sequence);
+
+ UI::CloseDialog();
+ return ret;
+}
+
+/**
+ * Whole configuration of live-installer but without reading and writing.
+ * For use with autoinstallation.
+ * @return sequence result
+ */
+any LiveInstallerAutoSequence() {
+
+ /* Initialization dialog caption */
+ string caption = _("LiveInstaller Configuration");
+ /* Initialization dialog contents */
+ term contents = `Label(_("Initializing..."));
+
+ Wizard::CreateDialog();
+ Wizard::SetContentsButtons(caption, contents, "",
+ Label::BackButton(), Label::NextButton());
+
+ any ret = MainSequence();
+
+ UI::CloseDialog();
+ return ret;
+}
+
+/* EOF */
+}
Added: trunk/live-installer/testsuite/.cvsignore
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/testsuite/.cvsignore?rev=39018&view=auto
==============================================================================
--- trunk/live-installer/testsuite/.cvsignore (added)
+++ trunk/live-installer/testsuite/.cvsignore Mon Jun 25 18:22:25 2007
@@ -0,0 +1,11 @@
+Makefile
+Makefile.in
+site.exp
+*.sum
+*.log
+tmp.out*
+tmp.err*
+tmp.log*
+config
+run
+*.test
Added: trunk/live-installer/testsuite/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/testsuite/Makefile.am?rev=39018&view=auto
==============================================================================
--- trunk/live-installer/testsuite/Makefile.am (added)
+++ trunk/live-installer/testsuite/Makefile.am Mon Jun 25 18:22:25 2007
@@ -0,0 +1,21 @@
+#
+# Makefile.am for .../testsuite
+#
+# Do not edit this file (Makefile.am) as it will be overwritten!
+#
+
+AUTOMAKE_OPTIONS = dejagnu
+EXTRA_DIST = $(wildcard tests/*.out) $(wildcard tests/*.err) $(wildcard tests/*.ycp) $(wildcard tests/*.yh)
+
+testsuite_prepare = @ydatadir@/testsuite/Makefile.testsuite
+
+all-local: $(testsuite_prepare)
+ make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir)
+
+clean-local: $(testsuite_prepare)
+ make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) clean
+
+check-local: $(testsuite_prepare)
+ make -f $(testsuite_prepare) RPMNAME=$(RPMNAME) srcdir=$(srcdir) check
+
+# EOF
Added: trunk/live-installer/testsuite/tests/.cvsignore
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/testsuite/tests/.cvsignore?rev=39018&view=auto
==============================================================================
(empty)
Added: trunk/live-installer/testsuite/tests/LiveInstaller.err
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/testsuite/tests/LiveInstaller.err?rev=39018&view=auto
==============================================================================
(empty)
Added: trunk/live-installer/testsuite/tests/LiveInstaller.out
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/testsuite/tests/LiveInstaller.out?rev=39018&view=auto
==============================================================================
--- trunk/live-installer/testsuite/tests/LiveInstaller.out (added)
+++ trunk/live-installer/testsuite/tests/LiveInstaller.out Mon Jun 25 18:22:25 2007
@@ -0,0 +1,2 @@
+Dump LiveInstaller::Modified
+Return false
Added: trunk/live-installer/testsuite/tests/LiveInstaller.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/testsuite/tests/LiveInstaller.ycp?rev=39018&view=auto
==============================================================================
--- trunk/live-installer/testsuite/tests/LiveInstaller.ycp (added)
+++ trunk/live-installer/testsuite/tests/LiveInstaller.ycp Mon Jun 25 18:22:25 2007
@@ -0,0 +1,13 @@
+{
+
+// testedfiles: LiveInstaller.ycp
+
+include "testsuite.ycp";
+TESTSUITE_INIT([], nil);
+
+import "LiveInstaller";
+
+DUMP("LiveInstaller::Modified");
+TEST(``(LiveInstaller::Modified()), [], nil);
+
+}
Added: trunk/live-installer/yast2-live-installer.spec.in
URL: http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/yast2-live-installer.spec.in?rev=39018&view=auto
==============================================================================
--- trunk/live-installer/yast2-live-installer.spec.in (added)
+++ trunk/live-installer/yast2-live-installer.spec.in Mon Jun 25 18:22:25 2007
@@ -0,0 +1,31 @@
+@HEADER-COMMENT@
+
+@HEADER@
+Requires: yast2
+BuildRequires: perl-XML-Writer update-desktop-files yast2 yast2-devtools yast2-testsuite
+
+BuildArchitectures: noarch
+
+Summary: Configuration of live-installer
+
+%description
+-
+
+@PREP@
+
+@BUILD@
+
+@INSTALL@
+
+@CLEAN@
+
+%files
+%defattr(-,root,root)
+%dir @yncludedir@/live-installer
+@yncludedir@/live-installer/*
+@clientdir@/live-installer.ycp
+@clientdir@/live-installer_*.ycp
+@moduledir@/LiveInstaller.*
+@moduledir@/LiveInstaller2.*
+@desktopdir@/live-installer.desktop
+%doc @docdir@
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org