Author: jsrain
Date: Fri Feb 15 14:30:04 2008
New Revision: 44517
URL: http://svn.opensuse.org/viewcvs/yast?rev=44517&view=rev
Log:
updated image-based installatoin not to use any hardcoded image names
Modified:
trunk/installation/package/yast2-installation.changes
trunk/installation/src/clients/inst_deploy_image.ycp
trunk/installation/src/clients/inst_prepare_image.ycp
trunk/installation/src/modules/ImageInstallation.ycp
Modified: trunk/installation/package/yast2-installation.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/package/yast2-installation.changes?rev=44517&r1=44516&r2=44517&view=diff
==============================================================================
--- trunk/installation/package/yast2-installation.changes (original)
+++ trunk/installation/package/yast2-installation.changes Fri Feb 15 14:30:04 2008
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Fri Feb 15 14:28:45 CET 2008 - jsrain@suse.cz
+
+- updated image-based installatoin not to use any hardcoded
+ image names
+
+-------------------------------------------------------------------
Thu Feb 14 11:20:04 CET 2008 - locilka@suse.cz
- Function FileSystemCopy from live-installer has been moved
Modified: trunk/installation/src/clients/inst_deploy_image.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/clients/inst_deploy_image.ycp?rev=44517&r1=44516&r2=44517&view=diff
==============================================================================
--- trunk/installation/src/clients/inst_deploy_image.ycp (original)
+++ trunk/installation/src/clients/inst_deploy_image.ycp Fri Feb 15 14:30:04 2008
@@ -8,8 +8,7 @@
y2milestone ("Deploying image");
-// TODO non-static list of images
-list<string> images = ["root", "zypp", "opt", "home"];
+list<string> images = ImageInstallation::ImageOrder ();
integer last_image = nil;
@@ -30,15 +29,37 @@
Progress::Step (image);
}
+if (! Installation::image_installation)
+ return `auto;
+
Wizard::SetContents (_("Deploying Installation Images"), `Empty (), "", false, false);
Wizard::SetTitleIcon ("yast-inst-mode");
// TODO help
Progress::Simple (_("Deploying Installation Images"), _("Deploying Installation Images"), size (images), "help");
-Pkg::TargetFinish ();
+// finish target if it was initialized
+if (! Installation::image_only)
+{
+// TODO save the status of all packages
+ Pkg::TargetFinish ();
+}
+
+/*
+// FIXME the images usually do not fit in RAMDISK
+// move download area to hard disk (for HTTP/FTP media)
+// TODO select according to partitioning
+string download_dir = "/img_tmp";
+download_dir = Installation::destdir + download_dir;
+SCR::Execute (.target.bash, sformat ("test -d %1 || mkdir -p %1", download_dir));
+Pkg::SourceMoveDownloadArea (download_dir);
+// don't know why it didn't work :-(
+*/
+
ImageInstallation::DeployImages (images, Installation::destdir, SetProgress);
+//SCR::Execute (.target.bash, sformat ("rmdir %1", download_dir));
+
y2milestone ("Target image for package selector prepared");
return `next;
Modified: trunk/installation/src/clients/inst_prepare_image.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/clients/inst_prepare_image.ycp?rev=44517&r1=44516&r2=44517&view=diff
==============================================================================
--- trunk/installation/src/clients/inst_prepare_image.ycp (original)
+++ trunk/installation/src/clients/inst_prepare_image.ycp Fri Feb 15 14:30:04 2008
@@ -11,6 +11,7 @@
import "ImageInstallation";
import "GetInstArgs";
import "Wizard";
+import "Installation";
textdomain "installation";
@@ -23,23 +24,31 @@
Wizard::SetContents (_("Analyzing Installation Images"), `Empty (), "", false, false);
Wizard::SetTitleIcon ("yast-inst-mode");
+// set repo to get images from
ImageInstallation::SetRepo (Packages::theSources[0]:0);
-// TODO: read the list of images from the media
-ImageInstallation::AddImage ("root", "base.tgz", "tar");
-ImageInstallation::AddImage ("home", "home.tgz", "tar");
-ImageInstallation::AddImage ("zypp", "zypp.tgz", "tar");
-ImageInstallation::AddImage ("opt", "opt.tgz", "tar");
-
-string sw_db_root = (string)SCR::Read (.target.tmpdir) + "/sw_db_root";
-ImageInstallation::DeployImageTemporarily ("zypp", sw_db_root);
-
-// TODO: redefine pkg callbacks for RPM database reading, which is the most time-consuming part
-Pkg::TargetInitialize (sw_db_root);
-Pkg::TargetLoad ();
-ImageInstallation::CleanTemporaryImage ("zypp", sw_db_root);
+// list images for currently selected patterns
+// TODO: Pass selected pattern(s)
+ImageInstallation::FindImageSet ([]);
+
+// also set an RPM database
+if (! Installation::image_only)
+{
+ string sw_db_root = (string)SCR::Read (.target.tmpdir) + "/sw_db_root";
+ ImageInstallation::DeployImageTemporarily (ImageInstallation::SwMgmtImage (), sw_db_root);
+
+ // TODO: redefine pkg callbacks for RPM database reading, which is the most time-consuming part
+ Pkg::TargetInitialize (sw_db_root);
+ Pkg::TargetLoad ();
-y2milestone ("Target image for package selector prepared");
+ ImageInstallation::CleanTemporaryImage (ImageInstallation::SwMgmtImage (), sw_db_root);
+
+ y2milestone ("Target image for package selector prepared");
+}
+else
+{
+ y2milestone ("Skipping preparing image for package selector");
+}
return `next;
}
Modified: trunk/installation/src/modules/ImageInstallation.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/modules/ImageInstallation.ycp?rev=44517&r1=44516&r2=44517&view=diff
==============================================================================
--- trunk/installation/src/modules/ImageInstallation.ycp (original)
+++ trunk/installation/src/modules/ImageInstallation.ycp Fri Feb 15 14:30:04 2008
@@ -16,7 +16,12 @@
module "ImageInstallation";
+import "Installation";
+import "XML";
import "Progress";
+import "Report";
+
+textdomain "installation";
/**
* Repository holding all images
@@ -29,6 +34,16 @@
map