[yast-commit] r46341 - in /trunk/installation: package/yast2-installation.changes src/clients/inst_deploy_image.ycp src/modules/ImageInstallation.ycp yast2-installation.spec.in
Author: locilka Date: Thu Apr 10 14:22:02 2008 New Revision: 46341 URL: http://svn.opensuse.org/viewcvs/yast?rev=46341&view=rev Log: - Installation from images sets the download area (SourceManager). - Removing image after it is deployed. Modified: trunk/installation/package/yast2-installation.changes trunk/installation/src/clients/inst_deploy_image.ycp trunk/installation/src/modules/ImageInstallation.ycp trunk/installation/yast2-installation.spec.in Modified: trunk/installation/package/yast2-installation.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/package/yast2-installation.changes?rev=46341&r1=46340&r2=46341&view=diff ============================================================================== --- trunk/installation/package/yast2-installation.changes (original) +++ trunk/installation/package/yast2-installation.changes Thu Apr 10 14:22:02 2008 @@ -2,6 +2,8 @@ Thu Apr 10 12:02:07 CEST 2008 - locilka@suse.cz - Filtering installation imagesets using the default architecture. +- Installation from images sets the download area (SourceManager). +- Removing image after it is deployed. ------------------------------------------------------------------- Wed Apr 9 16:39:36 CEST 2008 - jsrain@suse.cz 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=46341&r1=46340&r2=46341&view=diff ============================================================================== --- trunk/installation/src/clients/inst_deploy_image.ycp (original) +++ trunk/installation/src/clients/inst_deploy_image.ycp Thu Apr 10 14:22:02 2008 @@ -3,6 +3,7 @@ import "ImageInstallation"; import "Progress"; import "Wizard"; +import "SourceManager"; textdomain "installation"; @@ -54,6 +55,7 @@ Pkg::SourceMoveDownloadArea (download_dir); */ +SourceManager::InstInitSourceMoveDownloadArea(); ImageInstallation::DeployImages (images, Installation::destdir, SetProgress); /* Modified: trunk/installation/src/modules/ImageInstallation.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/modules/ImageInstallation.ycp?rev=46341&r1=46340&r2=46341&view=diff ============================================================================== --- trunk/installation/src/modules/ImageInstallation.ycp (original) +++ trunk/installation/src/modules/ImageInstallation.ycp Thu Apr 10 14:22:02 2008 @@ -112,6 +112,24 @@ } /** + * Removes the downloaded image. If the file is writable, releases + * all sources because only libzypp knows which files are copies + * and which are just symlinks to sources (e.g., nfs://, smb://). + */ +void RemoveTemporaryImage (string image) { + map out = (map) SCR::Execute ( + .target.bash_ouptut, + sformat ("test -w '%1' && echo -n writable", String::Quote (image)) + ); + + // Command has either failed or file is writable (non-empty stdout) + if (out["exit"]:-1 != 0 || out["stdout"]:"" != "") { + y2milestone ("Releasing sources to remove temporary files"); + Pkg::SourceReleaseAll(); + } +} + +/** * Deploy an image of the filesystem type * @param id string the id of the image * @param target string the directory to deploy the image to @@ -149,6 +167,8 @@ out = (map)SCR::Execute (.target.bash_output, cmd); y2milestone ("Returned %1", out); + RemoveTemporaryImage (image); + return out["exit"]:-1 == 0; } @@ -194,6 +214,9 @@ cmd = sformat ("umount -d -f -l %1", tmpdir); out = (map)SCR::Execute (.target.bash_output, cmd); y2milestone ("Executing %1 returned %2", cmd, out); + + RemoveTemporaryImage (image); + return out["exit"]:-1 == 0; // FIXME error checking } Modified: trunk/installation/yast2-installation.spec.in URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/yast2-installation.spec.in?rev=46341&r1=46340&r2=46341&view=diff ============================================================================== --- trunk/installation/yast2-installation.spec.in (original) +++ trunk/installation/yast2-installation.spec.in Thu Apr 10 14:22:02 2008 @@ -7,6 +7,9 @@ # anyxml -> barexml (bnc #366867) BuildRequires: yast2 >= 2.16.39 +# SourceManager::InstInitSourceMoveDownloadArea +BuildRequiers: >yast2-packager >= 2.16.32 + Requires: autoyast2-installation # GetInstArgs::automatic_configuration @@ -21,9 +24,8 @@ # Language::Set (handles downloading the translation extensions) Requires: yast2-country-data >= 2.16.11 -# New System-selection data and API DefaultDesktop module -# New API in ProductLicense -Requires: yast2-packager >= 2.16.18 +# SourceManager::InstInitSourceMoveDownloadArea +Requires: yast2-packager >= 2.16.32 # Only in inst-sys # Requires: yast2-runlevel -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
locilka@svn.opensuse.org