Author: locilka Date: Fri Apr 4 17:35:43 2008 New Revision: 46122 URL: http://svn.opensuse.org/viewcvs/yast?rev=46122&view=rev Log: - InstExtensionImage changed to use new 'extend' command (bnc #376870). Modified: trunk/yast2/library/control/src/InstExtensionImage.ycp trunk/yast2/package/yast2.changes Modified: trunk/yast2/library/control/src/InstExtensionImage.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/control/src/InstExt... ============================================================================== --- trunk/yast2/library/control/src/InstExtensionImage.ycp (original) +++ trunk/yast2/library/control/src/InstExtensionImage.ycp Fri Apr 4 17:35:43 2008 @@ -294,6 +294,37 @@ // $["extension_name" : "downloaded_to_file", ...] map <string, string> extension_downloaded_as = $[]; + global boolean DownloadAndIntegrateExtension (string extension) { + if (!Stage::initial()) { + y2error ("This module should be used in Stage::initial only!"); + } + + if (extension == nil || extension == "") { + y2error ("Such extension name can't work: %1", extension); + return false; + } + + if (contains (integrated_extensions, extension)) { + y2milestone ("Extension %1 has already been integrated", extension); + return true; + } + + // See BNC #376870 + string cmd = sformat ("extend '%1'", String::Quote (extension)); + y2milestone ("Calling: %1", cmd); + map cmd_out = (map) WFM::Execute (.local.bash_output, cmd); + y2milestone ("Returned: %1", cmd_out); + + if (cmd_out["exit"]:-1 != 0) { + y2error ("'extend' failed!"); + return false; + } + + integrated_extensions = add (integrated_extensions, extension); + + return true; + } + /** * Downloads extension archive (file system image) and integrates * it to the current system. Extension name (param) is relative to the @@ -319,7 +350,7 @@ * @param string extension name * @return boolean if successful */ - global boolean DownloadAndIntegrateExtension (string extension) { + global boolean OldDownloadAndIntegrateExtension (string extension) { if (!Stage::initial()) { y2error ("This module should be used in Stage::initial only!"); } @@ -419,6 +450,11 @@ return true; } + global boolean DesintegrateExtension (string extension) { + y2warning ("Function is empty, see BNC #376870"); + return true; + } + /** * Reverse function to DownloadAndIntegrateExtension(). The only difference is * that it doesn't upload the image from where it has been downloaded. @@ -429,7 +465,7 @@ * @param string extension name * @return boolean if successful */ - global boolean DesintegrateExtension (string extension) { + global boolean OldDesintegrateExtension (string extension) { if (!Stage::initial()) { y2error ("This module should be used in Stage::initial only!"); } @@ -496,13 +532,18 @@ return ret; } + global boolean DisintegrateAllExtensions () { + y2warning ("Function is empty, see BNC #376870"); + return true; + } + /** * Tries to disintegrate (umount, remove) all already used extensions. * Nevertheless extensions already in use cannot be disintegrated. * * @return boolean whether successfull (almost always false) */ - global boolean DisintegrateAllExtensions () { + global boolean OldDisintegrateAllExtensions () { LazyInit(); boolean ret = true; Modified: trunk/yast2/package/yast2.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/package/yast2.changes?rev=4... ============================================================================== --- trunk/yast2/package/yast2.changes (original) +++ trunk/yast2/package/yast2.changes Fri Apr 4 17:35:43 2008 @@ -3,6 +3,8 @@ - Added GetInstArgs::automatic_configuration for easier handling of the automatic configuration process. +- InstExtensionImage changed to use new 'extend' command + (bnc #376870). - 2.16.46 ------------------------------------------------------------------- -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org