Hello community,
here is the log from the commit of package yast2-vm
checked in at Wed May 3 10:35:18 CEST 2006.
--------
--- yast2-vm/yast2-vm.changes 2006-04-28 22:42:30.000000000 +0200
+++ STABLE/yast2-vm/yast2-vm.changes 2006-05-03 01:40:01.000000000 +0200
@@ -1,0 +2,19 @@
+Tue May 2 12:58:42 MDT 2006 - mgfritch@novell.com
+
+- Added patch for "srcid" not set in results from
+ Pkg::PkgPropertiesAll (#163609)
+- Added a popup error message to VM_Common::CreateDiskImage() for
+ when the 'dd' command fails to create a disk image (#172083)
+- Added an additional popup error message when installing/finalizing
+ a VM's settings. This new popup contains a details button with the
+ output (stdout/stderr) of a failed xm create command (#172084)
+- Final text review in preparation for text freeze.
+- 2.13.43
+
+-------------------------------------------------------------------
+Tue May 2 10:21:36 MDT 2006 - mgfritch@novell.com
+
+- Add a second yes/no pop-up warning the user about deleting a VM.
+- 2.13.42
+
+-------------------------------------------------------------------
Old:
----
yast2-vm-2.13.41.tar.bz2
New:
----
yast2-vm-2.13.43.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-vm.spec ++++++
--- /var/tmp/diff_new_pack.LpvWJY/_old 2006-05-03 10:33:59.000000000 +0200
+++ /var/tmp/diff_new_pack.LpvWJY/_new 2006-05-03 10:33:59.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-vm (Version 2.13.41)
+# spec file for package yast2-vm (Version 2.13.43)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,12 +11,12 @@
# norootforbuild
Name: yast2-vm
-Version: 2.13.41
+Version: 2.13.43
Release: 1
License: GPL
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-vm-2.13.41.tar.bz2
+Source0: yast2-vm-2.13.43.tar.bz2
prefix: /usr
BuildRequires: perl-XML-Writer update-desktop-files yast2 yast2-devtools yast2-testsuite
Requires: yast2 yast2-installation
@@ -32,7 +32,7 @@
Ladislav Slezak
%prep
-%setup -n yast2-vm-2.13.41
+%setup -n yast2-vm-2.13.43
%build
%{prefix}/bin/y2tool y2autoconf
@@ -73,6 +73,19 @@
%doc %{prefix}/share/doc/packages/yast2-vm
%changelog -n yast2-vm
+* Tue May 02 2006 - mgfritch@novell.com
+- Added patch for "srcid" not set in results from
+ Pkg::PkgPropertiesAll (#163609)
+- Added a popup error message to VM_Common::CreateDiskImage() for
+ when the 'dd' command fails to create a disk image (#172083)
+- Added an additional popup error message when installing/finalizing
+ a VM's settings. This new popup contains a details button with the
+ output (stdout/stderr) of a failed xm create command (#172084)
+- Final text review in preparation for text freeze.
+- 2.13.43
+* Tue May 02 2006 - mgfritch@novell.com
+- Add a second yes/no pop-up warning the user about deleting a VM.
+- 2.13.42
* Thu Apr 27 2006 - mgfritch@novell.com
- If AMD Pacifica (svm) processor, architecture is x86_64 and full
virtualization, always write out 'cpus=0' (#169855)
++++++ yast2-vm-2.13.41.tar.bz2 -> yast2-vm-2.13.43.tar.bz2 ++++++
++++ 2407 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-vm-2.13.41/VERSION new/yast2-vm-2.13.43/VERSION
--- old/yast2-vm-2.13.41/VERSION 2006-04-28 00:16:34.000000000 +0200
+++ new/yast2-vm-2.13.43/VERSION 2006-05-02 20:58:32.000000000 +0200
@@ -1 +1 @@
-2.13.41
+2.13.43
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-vm-2.13.41/configure.in new/yast2-vm-2.13.43/configure.in
--- old/yast2-vm-2.13.41/configure.in 2006-04-28 22:29:44.000000000 +0200
+++ new/yast2-vm-2.13.43/configure.in 2006-05-03 01:15:05.000000000 +0200
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-vm, 2.13.41, http://www.suse.de/feedback, yast2-vm)
+AC_INIT(yast2-vm, 2.13.43, http://www.suse.de/feedback, yast2-vm)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -17,7 +17,7 @@
AM_INIT_AUTOMAKE(tar-ustar) dnl searches for some needed programs
dnl Important YaST2 variables
-VERSION="2.13.41"
+VERSION="2.13.43"
RPMNAME="yast2-vm"
MAINTAINER="Ladislav Slezak "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-vm-2.13.41/src/VM.ycp new/yast2-vm-2.13.43/src/VM.ycp
--- old/yast2-vm-2.13.41/src/VM.ycp 2006-04-25 21:21:15.000000000 +0200
+++ new/yast2-vm-2.13.43/src/VM.ycp 2006-05-03 01:29:06.000000000 +0200
@@ -4,7 +4,7 @@
* Authors: Ladislav Slezak
* Michael G. Fritch
*
- * $Id: VM.ycp 30476 2006-04-25 19:20:34Z mgfritch $
+ * $Id: VM.ycp 30631 2006-05-02 23:28:44Z mgfritch $
*/
{
module "VM";
@@ -728,12 +728,12 @@
}
}
- global boolean ViewVirtualMachineConsole(string DomName, boolean isFullVirtualization, boolean isNetWare, boolean displayError) {
- boolean(string, boolean, boolean, boolean) toEval = (boolean(string, boolean, boolean, boolean))functions["ViewVirtualMachineConsole"]:nil;
+ global boolean ViewVirtualMachineConsole(string DomName, boolean isFullVirtualization, boolean isNetWare, boolean background, boolean displayError) {
+ boolean(string, boolean, boolean, boolean, boolean) toEval = (boolean(string, boolean, boolean, boolean, boolean))functions["ViewVirtualMachineConsole"]:nil;
if (toEval != nil)
{
- return toEval(DomName, isFullVirtualization, isNetWare, displayError);
+ return toEval(DomName, isFullVirtualization, isNetWare, background, displayError);
}
else
{
@@ -784,10 +784,6 @@
}
}
- global boolean Start(boolean background) {
- return CallBooleanBooleanFunction("Start", background);
- }
-
global boolean InstallPackages() {
return CallBooleanFunction("InstallPackages");
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-vm-2.13.41/src/VM_Common.ycp new/yast2-vm-2.13.43/src/VM_Common.ycp
--- old/yast2-vm-2.13.41/src/VM_Common.ycp 2006-04-28 02:33:55.000000000 +0200
+++ new/yast2-vm-2.13.43/src/VM_Common.ycp 2006-05-03 01:29:06.000000000 +0200
@@ -4,7 +4,7 @@
* Authors: Ladislav Slezak
* Michael G. Fritch
*
- * $Id: VM_Common.ycp 30557 2006-04-28 00:33:15Z mgfritch $
+ * $Id: VM_Common.ycp 30631 2006-05-02 23:28:44Z mgfritch $
*/
{
module "VM_Common";
@@ -239,6 +239,41 @@
virtualization_type = input["virtualization_type"]:default_type;
}
+ /**
+ * Displays a formatted popup error message, with a details button.
+ * @param errorMessage string - a simple message describing the error
+ * @param out map - output of the executed command
+ * @param cmd string - the executed command
+ * @return void
+ */
+ global void PopupErrorDetails(string errorMessage, map out, string cmd) ``{
+ string message = _("Undefined Error");
+ if (errorMessage != nil && errorMessage != "") message = errorMessage;
+ Popup::ClearFeedback(); // just in case there are leftovers.
+ if (!Popup::AnyQuestion( Label::ErrorMsg(), message, Label::OKButton(), _("Details"), `focus )) {
+ string description = sformat("<pre>command: %1 return \n %2 %3</pre>", cmd, out["stderr"]:"", out["stdout"]:"");
+ UI::OpenDialog (`opt(`decorated ),
+ `HBox( `VSpacing(16),
+ `VBox (
+ `HSpacing (100),
+ // popup window header
+ `Heading (message),
+ `VSpacing (0.5),
+ `RichText (description),
+ `VSpacing (1.0),
+ // push button label
+ `PushButton (`id(`ok), `opt(`default, `key_F10), Label::OKButton())
+ )
+ )
+ );
+
+ UI::SetFocus (`id(`ok));
+ UI::UserInput ();
+ UI::CloseDialog ();
+ }
+ }
+
+
global string GetAutoYastProposal() {
// proposal items
return HTML::List([ sformat(_("AutoYaST Profile: %1"), (autoyast_profile != "") ?
@@ -489,11 +524,21 @@
y2milestone("Creating disk image %1 (%2MB)", file, image_mb);
y2debug("dd command: %1", cmd);
- integer result = (integer) SCR::Execute (.target.bash, cmd);
+ map result = (map) SCR::Execute (.target.bash_output, cmd);
+ y2debug("result=%1", result);
- if (result != 0)
+ if (result["exit"]:-1 != 0)
{
y2error("Cannot create disk image %1", file);
+ //PopupErrorDetails(sformat(_("Cannot create disk image %1"), file), result, cmd); // FIXME: somehow the output from the dd command is not captured by .target.bash_output
+ Report::Error(sformat(_("Cannot create the following disk image:
+%1
+
+Please, ensure there is enough free disk space
+to create the specified disk image.
+
+"), file));
+
// try to remove part of the image if it exists
SCR::Execute (.target.bash, "/bin/rm -- '" + file + "'");
ret = false;
@@ -880,40 +925,6 @@
}
-/**
- * Displays a formatted popup error message, with a details button.
- * @param errorMessage string - a simple message describing the error
- * @param out map - output of the executed command
- * @param cmd string - the executed command
- * @return void
- */
-global void PopupErrorDetails(string errorMessage, map out, string cmd) ``{
- string message = _("Undefined Error");
- if (errorMessage != nil && errorMessage != "") message = errorMessage;
- Popup::ClearFeedback(); // just in case there are leftovers.
- if (!Popup::AnyQuestion( Label::ErrorMsg(), message, Label::OKButton(), _("Details"), `focus )) {
- string description = sformat("<pre>command: %1 return \n %2 %3</pre>", cmd, out["stderr"]:"", out["stdout"]:"");
- UI::OpenDialog (`opt(`decorated ),
- `HBox( `VSpacing(16),
- `VBox (
- `HSpacing (100),
- // popup window header
- `Heading (message),
- `VSpacing (0.5),
- `RichText (description),
- `VSpacing (1.0),
- // push button label
- `PushButton (`id(`ok), `opt(`default, `key_F10), Label::OKButton())
- )
- )
- );
-
- UI::SetFocus (`id(`ok));
- UI::UserInput ();
- UI::CloseDialog ();
- }
-}
-
/* EOF */
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-vm-2.13.41/src/VM_XEN.ycp new/yast2-vm-2.13.43/src/VM_XEN.ycp
--- old/yast2-vm-2.13.41/src/VM_XEN.ycp 2006-04-28 02:33:55.000000000 +0200
+++ new/yast2-vm-2.13.43/src/VM_XEN.ycp 2006-05-03 01:29:06.000000000 +0200
@@ -3,7 +3,7 @@
* Package: XEN specific functions and values
* Authors: Ladislav Slezak
* Michael G. Fritch
- * $Id: VM_XEN.ycp 30557 2006-04-28 00:33:15Z mgfritch $
+ * $Id: VM_XEN.ycp 30631 2006-05-02 23:28:44Z mgfritch $
*/
{
module "VM_XEN";
@@ -1550,7 +1550,7 @@
define boolean CreateDiskImages() {
boolean ret = true;
foreach(map disk, disks, {
- if (disk["type"]:"" == "loop-create")
+ if (disk["type"]:"" == "loop-create" && ret)
{
integer imgsize = disk["size"]:4096;
boolean sparse = disk["sparse"]:true;
@@ -1568,6 +1568,7 @@
ret = ret && VM_Common::CreateDiskImage(target_dir + disk["source"]:"hda", imgsize, sparse);
}
+ if (ret == false) break;
}
);
@@ -1625,12 +1626,11 @@
}
}
- ret = WriteOption(configpath, "disk", formatDiskConfig(disks, VM_Common::GetVirtualizationType() == "full"));
+ ret = ret && WriteOption(configpath, "disk", formatDiskConfig(disks, VM_Common::GetVirtualizationType() == "full"));
// create disk image file(s)
y2milestone("Creating disk images...");
- CreateDiskImages();
-
+ ret = ret && CreateDiskImages();
// all following action are needed only in paravirtualization mode
if (VM_Common::GetVirtualizationType() == "full")
@@ -1709,7 +1709,7 @@
url = sformat("iso:///?iso=%1", VM_Common::custom_source);
}
- integer src_defined = VM_Common::IsInstSourceDefined(url);
+ integer src_defined = -1; // always call Pkg::SourceCreate
if (src_defined < 0)
{
@@ -1831,7 +1831,9 @@
// create disk image file(s)
y2milestone("Creating disk images...");
- CreateDiskImages();
+ if (CreateDiskImages() == false) {
+ return false;
+ }
if (new_src >= 0)
{
@@ -1902,26 +1904,31 @@
}
- global define boolean ViewVirtualMachineConsole(string DomName, boolean isFullVirtualization, boolean isNetWare, boolean displayError) {
- y2milestone("ViewVirtualMachineConsole(%1, %2, %3, %4)", DomName, isFullVirtualization, isNetWare, displayError);
+ global define boolean ViewVirtualMachineConsole(string DomName, boolean isFullVirtualization, boolean isNetWare, boolean background, boolean displayError) {
+ y2milestone("ViewVirtualMachineConsole(%1, %2, %3, %4, %5)", DomName, isFullVirtualization, isNetWare, background, displayError);
if (DomName != nil && DomName != "") {
string cmd = sformat("/usr/bin/xterm -geometry 80x%3 -T \"Xen - %2\" -e %1 console %2",
xm, DomName, isNetWare ? 25 : 24);
if ( isFullVirtualization ) { // start VNC viewer
cmd = sformat("vncviewer localhost:%1", DomName);
}
+
y2milestone("Executing: %1", cmd);
-/* map ret = (map)SCR::Execute(.target.bash_output, cmd);
- if (ret["exit"]:-1 != 0 && displayError) {
- VM_Common::PopupErrorDetails(_("Cannot open the virtual machine console."), ret, cmd);
- }
- return (ret["exit"]:-1 == 0);*/
- integer ret = (integer) SCR::Execute(.target.bash_background, cmd);
- if (displayError && ret != 0) {
- Report::Error(_("Cannot open the virtual machine console."));
+ if (background) {
+ integer ret = (integer) SCR::Execute(.target.bash_background, cmd);
+ if (displayError && ret != 0) {
+ Report::Error(_("Cannot open the virtual machine console."));
+ }
+ return (ret == 0);
+ }
+ else {
+ map ret = (map)SCR::Execute(.target.bash_output, cmd);
+ if (displayError && ret["exit"]:-1 != 0) {
+ VM_Common::PopupErrorDetails(_("Cannot open the virtual machine console."), ret, cmd);
+ }
+ return (ret["exit"]:-1 == 0);
}
- return (ret == 0);
}
return false;
}
@@ -1961,7 +1968,11 @@
boolean success = false;
map ret = (map)SCR::Execute(.target.bash_output, cmd);
if (ret["exit"]:-1 != 0 && displayError) {
- VM_Common::PopupErrorDetails(_("Cannot start the virtual machine."), ret, cmd);
+ string abortmsg = _("Cannot start the virtual machine.");
+ if (VM_Common::proposal_type == "install") {
+ abortmsg = abortmsg + "\n" + _("The installation will be aborted.");
+ }
+ VM_Common::PopupErrorDetails(abortmsg, ret, cmd);
}
success = (ret["exit"]:-1 == 0);
@@ -1976,7 +1987,7 @@
}
-
+/*
global define boolean Start(boolean background) {
// FIXME: maybe this method should be merged into StartVirtualMachine()
integer start_time = time();
@@ -2008,6 +2019,7 @@
return success;
}
+*/
global define boolean InstallPackages() {
return VM_Common::InstallPackages(["xterm", "xorg-x11", "xen-tools"]);
@@ -2169,7 +2181,6 @@
"ShutdownVirtualMachine" : VM_XEN::ShutdownVirtualMachine,
"TerminateVirtualMachine" : VM_XEN::TerminateVirtualMachine,
"StartVirtualMachine" : VM_XEN::StartVirtualMachine,
- "Start" : VM_XEN::Start,
"InstallPackages" : VM_XEN::InstallPackages
];
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-vm-2.13.41/src/inst_vm_kickoff.ycp new/yast2-vm-2.13.43/src/inst_vm_kickoff.ycp
--- old/yast2-vm-2.13.41/src/inst_vm_kickoff.ycp 2006-04-24 20:09:13.000000000 +0200
+++ new/yast2-vm-2.13.43/src/inst_vm_kickoff.ycp 2006-05-03 01:29:06.000000000 +0200
@@ -6,7 +6,7 @@
*
* Purpose: Prepare and start installation in a virtual machine.
*
- * $Id: inst_vm_kickoff.ycp 29839 2006-04-07 05:12:29Z mgfritch $
+ * $Id: inst_vm_kickoff.ycp 30631 2006-05-02 23:28:44Z mgfritch $
*/
{
import "VM";
@@ -131,13 +131,22 @@
}
}
- // Do not start in background when installing.
- success = VM::Start( (VM_Common::proposal_type != "install") );
- if (!success)
- {
- Report::Error(_("Cannot start the virtual machine.") + "\n" + abortmsg);
- return `forceback;
+ Pkg::SourceReleaseAll();
+
+ // start the VM
+ success = VM::StartVirtualMachine(VM_Common::config_name, true);
+ if (!success) return `forceback;
+
+ // open the XTerm console if para virtualized.
+ if (VM_Common::GetVirtualizationType() == "para") {
+ boolean isNetWare = false;
+ if (VM_Common::GetCustomKernel()) {
+ isNetWare = VM_Common::IsNetWareKernel(VM_Common::GetKernelImage());
+ }
+ boolean background = (VM_Common::proposal_type != "install"); // Do not start in background when installing.
+ success = VM::ViewVirtualMachineConsole(VM_Common::config_name, (VM_Common::GetVirtualizationType() == "full"), isNetWare, background, true);
}
+ if (!success) return `forceback;
Progress::Finish ();
Progress::set(progress_state);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-vm-2.13.41/src/inst_vm_manage.ycp new/yast2-vm-2.13.43/src/inst_vm_manage.ycp
--- old/yast2-vm-2.13.41/src/inst_vm_manage.ycp 2006-04-13 23:15:32.000000000 +0200
+++ new/yast2-vm-2.13.43/src/inst_vm_manage.ycp 2006-05-02 20:41:42.000000000 +0200
@@ -381,20 +381,30 @@
else if (ret == `delete) {
if (selected_table_item != nil && selected_table_item >= 0) {
if (Popup::AnyQuestion( _("Delete Virtual Machine"), _("You are about to completely remove the selected VM.
-This action cannot be undone.
Are you sure you want to delete the selected VM?
"), Label::YesButton(), Label::NoButton(), `focus_no)) {
- map item = SettingsList[selected_table_item]:$[];
- if (item["name"]:nil != nil && item["name"]:"" != "") {
- Popup::ShowFeedback(_("Deleting Virtual Machine"), _("Please Wait..."));
- boolean success = DeleteVirtualMachine(selected_table_item);
- refresh_table();
- Popup::ClearFeedback();
-// if (!success) Report::Error(_("Cannot delete the virtual machine."));
+
+ if (Popup::AnyQuestion( _("Delete Virtual Machine"), _("The selected VM disk image and configuration file
+will be completely destroyed.
+
+This action cannot be undone.
+
+Do you wish to continue?
+
+"), Label::YesButton(), Label::NoButton(), `focus_no)) {
+
+ map item = SettingsList[selected_table_item]:$[];
+ if (item["name"]:nil != nil && item["name"]:"" != "") {
+ Popup::ShowFeedback(_("Deleting Virtual Machine"), _("Please Wait..."));
+ boolean success = DeleteVirtualMachine(selected_table_item);
+ refresh_table();
+ Popup::ClearFeedback();
+ // if (!success) Report::Error(_("Cannot delete the virtual machine."));
+ }
+ selected_table_item = 0;
}
- selected_table_item = 0;
}
}
else {
@@ -439,6 +449,7 @@
(isFullVirtualization(selected_table_item)) ? item["id"]:"" : item["name"]:"", // use VM id # to display VNC in full virtualizaion
isFullVirtualization(selected_table_item), // show XTerm in para virt.
VM_Common::IsNetWareKernel(item["kernel"]:""), // check for NetWare kernel
+ true, // always background this process.
true // show any error messages
);
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...