Hello community, here is the log from the commit of package yast2-vm checked in at Fri Jun 2 10:28:07 CEST 2006. -------- --- yast2-vm/yast2-vm.changes 2006-05-23 19:56:29.000000000 +0200 +++ yast2-vm/yast2-vm.changes 2006-06-02 02:38:26.000000000 +0200 @@ -1,0 +2,32 @@ +Thu Jun 1 16:16:42 MDT 2006 - mgfritch@novell.com + +- Do not display the 'Manage Virtual Machines' dialog when + creating an AutoYaST profile using the Autoinstallation wizard. + (#181072) +- Only enable `view button on the 'Manage Virtual Machines' dialog + if YaST is running in a graphical display (XServer) and the + selected vm is not configured to use SDL. (#181011) +- Only enable `start button on the 'Manage Virtual Machines' dialog + if YaST is running in a graphical display (XServer) or the + selected vm is configured as a paravirtualized guest. (#181009) +- Disable service 'earlykbd' when running an install inside of a + domU. (#180919) +- If paravirtualized domU install, use the 'extra' option 'vnc=1', + rather than 'textmode=1' (#181074) +- 2.13.54 + +------------------------------------------------------------------- +Mon May 29 01:10:44 MDT 2006 - mgfritch@novell.com + +- VM_XEN::ValidateConfigName() should return false if a vm name + setting inside of a config file conflicts with the proposed + vm name (#181001) +- Search physical disk partitions specified in the VM disk settings + for a valid Xen kernel. (#180130) +- Remove any single or double quotes surrounding values read from a + VM config file. (#179324) +- If dom0 is 64 bit OS, domU is full virtualization, and domU + memory is >= 3.5 GB, set 'pae=1' in the VM config file. (#180361) +- 2.13.53 + +------------------------------------------------------------------- Old: ---- yast2-vm-2.13.52.tar.bz2 New: ---- yast2-vm-2.13.54.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-vm.spec ++++++ --- /var/tmp/diff_new_pack.6VYk77/_old 2006-06-02 10:27:57.000000000 +0200 +++ /var/tmp/diff_new_pack.6VYk77/_new 2006-06-02 10:27:57.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package yast2-vm (Version 2.13.52) +# spec file for package yast2-vm (Version 2.13.54) # # 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.52 +Version: 2.13.54 Release: 1 License: GPL Group: System/YaST BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-vm-2.13.52.tar.bz2 +Source0: yast2-vm-2.13.54.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 <lslezak@suse.cz> %prep -%setup -n yast2-vm-2.13.52 +%setup -n yast2-vm-2.13.54 %build %{prefix}/bin/y2tool y2autoconf @@ -73,6 +73,32 @@ %doc %{prefix}/share/doc/packages/yast2-vm %changelog -n yast2-vm +* Thu Jun 01 2006 - mgfritch@novell.com +- Do not display the 'Manage Virtual Machines' dialog when + creating an AutoYaST profile using the Autoinstallation wizard. + (#181072) +- Only enable `view button on the 'Manage Virtual Machines' dialog + if YaST is running in a graphical display (XServer) and the + selected vm is not configured to use SDL. (#181011) +- Only enable `start button on the 'Manage Virtual Machines' dialog + if YaST is running in a graphical display (XServer) or the + selected vm is configured as a paravirtualized guest. (#181009) +- Disable service 'earlykbd' when running an install inside of a + domU. (#180919) +- If paravirtualized domU install, use the 'extra' option 'vnc=1', + rather than 'textmode=1' (#181074) +- 2.13.54 +* Mon May 29 2006 - mgfritch@novell.com +- VM_XEN::ValidateConfigName() should return false if a vm name + setting inside of a config file conflicts with the proposed + vm name (#181001) +- Search physical disk partitions specified in the VM disk settings + for a valid Xen kernel. (#180130) +- Remove any single or double quotes surrounding values read from a + VM config file. (#179324) +- If dom0 is 64 bit OS, domU is full virtualization, and domU + memory is >= 3.5 GB, set 'pae=1' in the VM config file. (#180361) +- 2.13.53 * Mon May 22 2006 - mgfritch@novell.com - Allow the cdrom_image setting to persist when moving from proposal_type 'install' to proposal_type 'boot'. (#174616) ++++++ yast2-vm-2.13.52.tar.bz2 -> yast2-vm-2.13.54.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-vm-2.13.52/VERSION new/yast2-vm-2.13.54/VERSION --- old/yast2-vm-2.13.52/VERSION 2006-05-22 23:34:56.000000000 +0200 +++ new/yast2-vm-2.13.54/VERSION 2006-06-02 00:15:35.000000000 +0200 @@ -1 +1 @@ -2.13.52 +2.13.54 diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-vm-2.13.52/configure new/yast2-vm-2.13.54/configure --- old/yast2-vm-2.13.52/configure 2006-05-23 17:00:43.000000000 +0200 +++ new/yast2-vm-2.13.54/configure 2006-06-02 01:56:07.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for yast2-vm 2.13.52. +# Generated by GNU Autoconf 2.59 for yast2-vm 2.13.54. # # Report bugs to http://www.suse.de/feedback. # @@ -269,8 +269,8 @@ # Identity of this package. PACKAGE_NAME='yast2-vm' PACKAGE_TARNAME='yast2-vm' -PACKAGE_VERSION='2.13.52' -PACKAGE_STRING='yast2-vm 2.13.52' +PACKAGE_VERSION='2.13.54' +PACKAGE_STRING='yast2-vm 2.13.54' PACKAGE_BUGREPORT='http://www.suse.de/feedback' ac_unique_file="RPMNAME" @@ -728,7 +728,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -`configure' configures yast2-vm 2.13.52 to adapt to many kinds of systems. +`configure' configures yast2-vm 2.13.54 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -795,7 +795,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of yast2-vm 2.13.52:";; + short | recursive ) echo "Configuration of yast2-vm 2.13.54:";; esac cat <<_ACEOF @@ -908,7 +908,7 @@ test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<_ACEOF -yast2-vm configure 2.13.52 +yast2-vm configure 2.13.54 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -922,7 +922,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by yast2-vm $as_me 2.13.52, which was +It was created by yast2-vm $as_me 2.13.54, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1652,7 +1652,7 @@ # Define the identity of the package. PACKAGE='yast2-vm' - VERSION='2.13.52' + VERSION='2.13.54' cat >>confdefs.h <<_ACEOF @@ -1863,7 +1863,7 @@ -VERSION="2.13.52" +VERSION="2.13.54" RPMNAME="yast2-vm" MAINTAINER="Ladislav Slezak <lslezak@suse.cz>" @@ -2654,7 +2654,7 @@ } >&5 cat >&5 <<_CSEOF -This file was extended by yast2-vm $as_me 2.13.52, which was +This file was extended by yast2-vm $as_me 2.13.54, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -2709,7 +2709,7 @@ cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\ -yast2-vm config.status 2.13.52 +yast2-vm config.status 2.13.54 configured by $0, generated by GNU Autoconf 2.59, with options \"`echo "$ac_configure_args" | sed 's/[\""`$]/\\&/g'`\" diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-vm-2.13.52/configure.in new/yast2-vm-2.13.54/configure.in --- old/yast2-vm-2.13.52/configure.in 2006-05-23 17:00:32.000000000 +0200 +++ new/yast2-vm-2.13.54/configure.in 2006-06-02 01:55:58.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.52, http://www.suse.de/feedback, yast2-vm) +AC_INIT(yast2-vm, 2.13.54, 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.52" +VERSION="2.13.54" RPMNAME="yast2-vm" MAINTAINER="Ladislav Slezak <lslezak@suse.cz>" diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-vm-2.13.52/src/VM.ycp new/yast2-vm-2.13.54/src/VM.ycp --- old/yast2-vm-2.13.52/src/VM.ycp 2006-05-10 00:00:09.000000000 +0200 +++ new/yast2-vm-2.13.54/src/VM.ycp 2006-06-01 23:04:58.000000000 +0200 @@ -4,7 +4,7 @@ * Authors: Ladislav Slezak <lslezak@suse.cz> * Michael G. Fritch <mgfritch@novell.com> * - * $Id: VM.ycp 30722 2006-05-05 22:59:43Z mgfritch $ + * $Id: VM.ycp 31270 2006-06-01 21:04:48Z mgfritch $ */ { module "VM"; @@ -718,6 +718,37 @@ } } + + global map ReadConfigFileSettings(string cfg_file) { + map(string) toEval = (map(string))functions["ReadConfigFileSettings"]:nil; + + if (toEval != nil) + { + return toEval(cfg_file); + } + else + { + y2error("ReadConfigFileSettings() function is missing!"); + return nil; + } + } + + + global list<map> ReadAllConfigFileSettings() { + list<map>() toEval = (list<map>())functions["ReadAllConfigFileSettings"]:nil; + + if (toEval != nil) + { + return toEval(); + } + else + { + y2error("ReadAllConfigFileSettings() function is missing!"); + return nil; + } + } + + global symbol GetVirtualMachineState(string state) { symbol(string) toEval = (symbol(string))functions["GetVirtualMachineState"]:nil; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-vm-2.13.52/src/VM_XEN.ycp new/yast2-vm-2.13.54/src/VM_XEN.ycp --- old/yast2-vm-2.13.52/src/VM_XEN.ycp 2006-05-23 19:55:23.000000000 +0200 +++ new/yast2-vm-2.13.54/src/VM_XEN.ycp 2006-06-02 02:36:55.000000000 +0200 @@ -3,7 +3,7 @@ * Package: XEN specific functions and values * Authors: Ladislav Slezak <lslezak@suse.cz> * Michael G. Fritch <mgfritch@novell.com> - * $Id: VM_XEN.ycp 31118 2006-05-23 17:55:16Z mgfritch $ + * $Id: VM_XEN.ycp 31272 2006-06-02 00:36:47Z mgfritch $ */ { module "VM_XEN"; @@ -857,7 +857,7 @@ define list<string> PartitionsInfo(string image) { - string cmd = sformat("sfdisk -d -uS -- '%1'", image); + string cmd = sformat("sfdisk --force -d -uS -- '%1'", image); map outputmap = (map)SCR::Execute(.target.bash_output, cmd); string outputstring = outputmap["stdout"]:""; @@ -1059,12 +1059,11 @@ string partition_name = String::CutBlanks(partition["name"]:""); - string source = regexpsub(partition_name, "(.*)[[0123456789]]*$", "\1"); // remove the partition number - string partition_num = regexpsub(partition_name, ".*([[0123456789]]*$)", "\1"); // save the partition number y2milestone("partition_name='%1'", partition_name); - y2milestone("source='%1'", source); + y2milestone("diskimage='%1'", diskimage); + string partition_num = regexpsub(partition_name, ".*([[0123456789]]*$)", "\1"); // save the partition number y2milestone("partition_num='%1'", partition_num); - string new_target = getDiskTarget(disks, source); + string new_target = getDiskTarget(disks, diskimage); if (new_target != nil && new_target != "") { // set the root device to the partition that contains the sepecified kernel (i.e. /dev/hda2) VM_Common::root_device = new_target + partition_num; @@ -1086,11 +1085,14 @@ boolean ret = false; foreach(map<string,any> disk, disks, { - if ((disk["type"]:"" == "loop-create") || (disk["type"]:"" == "loop-use")) { // FIXME: should support for phys devices be added? - string source = getDiskSource(disks, disk["target"]:""); - if (source != nil && source != "") { - ret = ret || ReadDiskImage(source); + string source = getDiskSource(disks, disk["target"]:""); + if (source != nil && source != "") { + // if a physical device, make sure string source contains the full pathname to the device. + if (disk["type"]:"" == "phys" && regexpmatch(source, "^/dev.*") == false) { + source = "/dev/" + source; } + // read the disk image + ret = ret || ReadDiskImage(source); } } ); @@ -1377,38 +1379,6 @@ return ret; } - global define boolean ValidateConfigName(string name) { - list<string> configs = (list<string>)SCR::Read(.target.dir, conf_path); // list of config file names - list<string> images = (list<string>)SCR::Read(.target.dir, img_prefix); // list of image dir names - if (contains(configs, name) || contains(images, name)) { - // either a config file name or a image directory name conflicts - return false; - } - return true; - } - - - global define string ProposeConfigName() - { - integer domain = 1; - - while ( ValidateConfigName(conf_prefix + tostring(domain)) == false ) - { - domain = domain + 1; - } - - string conf_name = conf_prefix + tostring(domain); - y2milestone("Proposed name: %1", conf_name); - //SCR::Execute (.target.bash, sformat("/usr/bin/touch %1%2", conf_path, conf_name)); - - return conf_name; - } - - global define boolean resetConfigName() - { - VM_Common::config_name = ProposeConfigName(); - return true; - } global define boolean setSourceConfig(integer sid, symbol type, string custom) { @@ -1450,6 +1420,180 @@ return WriteOption(configpath, optname, "'" + optvalue + "'"); } + + string ReadOption(path configpath, string optname) { + + string optvalue = (string)SCR::Read(configpath + topath(optname)); + + if (regexpmatch(optvalue, "'.*'")) { + // remove the single quotes + string tmpoptvalue = regexpsub(optvalue, "'(.*)'", "\1"); + if (optvalue != nil || optvalue != "") + optvalue = tmpoptvalue; + } + else if (regexpmatch(optvalue, "".*"")) { + // remove the double quotes + string tmpoptvalue = regexpsub(optvalue, ""(.*)"", "\1"); + if (optvalue != nil || optvalue != "") + optvalue = tmpoptvalue; + } + + return optvalue; + } + + + global map ReadConfigFileSettings(string cfg_file) { + + y2milestone("ReadConfigFileSettings(%1)", cfg_file); + if (cfg_file == nil || cfg_file == "") { + y2error("cfg_file paramater empty!"); + return nil; + } + + // FIXME: must remove from code below any duplicate ReadSettings() for a specified key! + map new_settings = $[]; + path configpath = .etc.xen.value + topath(getConfigFilePath() + cfg_file); + y2debug("configpath=%1", configpath); + new_settings["name"] = ReadOption(configpath, "name"); + if (new_settings["name"]:"" == nil || new_settings["name"]:"" == "") { + y2error("cfg_file value 'name' is empty!"); + return nil; // ignore cfg files that do not contain a machine name. + } + new_settings["builder"] = ReadOption(configpath, "builder"); + new_settings["memory"] = ReadOption(configpath, "memory"); + new_settings["kernel"] = ReadOption(configpath, "kernel"); + new_settings["bootentry"] = ReadOption(configpath, "bootentry"); + if (new_settings["kernel"]:"" == nil || new_settings["kernel"]:"" == "") { + list<string> tmplist = splitstring(new_settings["bootentry"]:"", ":,"); + new_settings["kernel"] = tmplist[1]:""; + } + new_settings["disks"] = parseDiskConfig(ReadOption(configpath, "disk")); + new_settings["on_poweroff"] = ReadOption(configpath, "on_poweroff"); + new_settings["on_reboot"] = ReadOption(configpath, "on_reboot"); + new_settings["on_crash"] = ReadOption(configpath, "on_crash"); + new_settings["vcpus"] = ReadOption(configpath, "vcpus"); + // new_settings["vif"] = parseVifConfig(ReadOption(configpath, "vif")); // FIXME: must write a method for parsing the vif list<string> + new_settings["stdvga"] = ReadOption(configpath, "stdvga"); + new_settings["sdl"] = ReadOption(configpath, "sdl"); + new_settings["vnc"] = ReadOption(configpath, "vnc"); + new_settings["vncviewer"] = ReadOption(configpath, "vncviewer"); + new_settings["ne2000"] = ReadOption(configpath, "ne2000"); + new_settings["dhcp"] = ReadOption(configpath, "dhcp"); + new_settings["ip"] = ReadOption(configpath, "ip"); + new_settings["netmask"] = ReadOption(configpath, "netmask"); + new_settings["interface"] = ReadOption(configpath, "interface"); + new_settings["gateway"] = ReadOption(configpath, "gateway"); + new_settings["extra"] = ReadOption(configpath, "extra"); + new_settings["bootloader"] = ReadOption(configpath, "bootloader"); + new_settings["cdrom"] = ReadOption(configpath, "cdrom"); + new_settings["boot"] = ReadOption(configpath, "boot"); + new_settings["localtime"] = ReadOption(configpath, "localtime"); + + new_settings["cfg_file"] = cfg_file; + + y2milestone("ReadConfigFileSettings returned: %1", new_settings); + return new_settings; + } + + + global list<map> ReadAllConfigFileSettings() { + + y2milestone("ReadAllConfigFileSettings()"); + + list<map> new_settings_list = []; + + list<string> file_list = (list<string>) SCR::Read(.target.dir, getConfigFilePath()); + y2milestone("file_list=%1", file_list); + if (file_list != nil && size(file_list) > 0) { + foreach(string cfg_file, file_list, { + string first_char = substring(cfg_file, 0, 1); + string last_char = substring(cfg_file, size(cfg_file)-1, size(cfg_file)); + if (first_char == "." || last_char == "~") { + // ignore all files that start with '.' or end with '~' + continue; + } + else { + map new_settings = ReadConfigFileSettings(cfg_file); + if (new_settings != nil && size(new_settings) > 0) { + new_settings_list = add(new_settings_list, new_settings); + } + } + }); + } + y2milestone("ReadAllConfigFileSettings returned: %1", new_settings_list); + return new_settings_list; + } + + global define boolean ValidateConfigName(string name) { + + // check for a conflicting config file name (/etc/xen/vm/*) + list<string> configs = (list<string>)SCR::Read(.target.dir, conf_path); // list of config file names + if (contains(configs, name)) { + // a config file name conflicts + return false; + } + + // check for a conflicting vm name settings inside each config file (/etc/xen/vm/*) + list<map> config_settings = ReadAllConfigFileSettings(); // list<map> of settings inside of the config files + boolean conflict = false; + foreach (map tmpmap, config_settings, { + if (tmpmap != nil) { + if (tmpmap["name"]:"" == name) { + conflict = true; + break; + } + } + }); + // a vm name inside a config file conflicts + if (conflict) { + return false; + } + + // check for conflicting image directory name (/var/lib/xen/images/*) + list<string> images = (list<string>)SCR::Read(.target.dir, img_prefix); // list of image dir names + if (contains(images, name)) { + // try to remove the vm image directory (if it is not empty, it should not be deleted). + string img_dir = img_prefix + name; + string cmd = sformat("rmdir %1", img_dir); + y2milestone("Executing: %1", cmd); + map retmap = (map)SCR::Execute(.target.bash_output, cmd); + y2milestone("retmap=%1", retmap); + images = (list<string>)SCR::Read(.target.dir, img_prefix); // re-create list of image dir names + + if (contains(images, name)) { + // vm image directory is not empty. + // An image directory name conflicts + return false; + } + } + + // no conflicts (a valid config name) + return true; + } + + + global define string ProposeConfigName() + { + integer domain = 1; + + while ( ValidateConfigName(conf_prefix + tostring(domain)) == false ) + { + domain = domain + 1; + } + + string conf_name = conf_prefix + tostring(domain); + y2milestone("Proposed name: %1", conf_name); + //SCR::Execute (.target.bash, sformat("/usr/bin/touch %1%2", conf_path, conf_name)); + + return conf_name; + } + + global define boolean resetConfigName() + { + VM_Common::config_name = ProposeConfigName(); + return true; + } + string GetVIF(list<map<string,string> > conf) { string ret = ""; @@ -1539,6 +1683,12 @@ // library dir (32/64bit) string arch_libdir = Arch::i386() ? "lib" : "lib64"; + + // set pae=1, if dom0 is 64bit, domU is full virtualization, and domU mem >= 3.5 GB (#180361) + if (Arch::x86_64() && VM_Common::memory_size >= 3584) { // (3.5 GB * 1024) = 3584 MB + ret = ret && WriteOption(configpath, "pae", "1"); + } + // set device model ret = ret && WriteStringOption(configpath, "device_model", "/usr/" + arch_libdir + "/xen/bin/qemu-dm"); ret = ret && WriteStringOption(configpath, "kernel", "/usr/lib/xen/boot/hvmloader"); @@ -1745,7 +1895,7 @@ } global define boolean resetExtraArgs() { - string arg = (VM_Common::proposal_type == "install") ? "TERM=xterm textmode=1" : "TERM=xterm"; + string arg = (VM_Common::proposal_type == "install") ? "TERM=xterm vnc=1" : "TERM=xterm"; VM_Common::extra_args = arg; return true; } @@ -2361,6 +2511,8 @@ "parseDiskConfig" : VM_XEN::parseDiskConfig, "updateDiskConfig" : VM_XEN::updateDiskConfig, + "ReadConfigFileSettings" : VM_XEN::ReadConfigFileSettings, + "ReadAllConfigFileSettings" : VM_XEN::ReadAllConfigFileSettings, "Write" : VM_XEN::Write, "Prepare" : VM_XEN::Prepare, diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-vm-2.13.52/src/cmdline.ycp new/yast2-vm-2.13.54/src/cmdline.ycp --- old/yast2-vm-2.13.52/src/cmdline.ycp 2006-04-07 07:12:49.000000000 +0200 +++ new/yast2-vm-2.13.54/src/cmdline.ycp 2006-06-02 02:36:55.000000000 +0200 @@ -9,7 +9,7 @@ * Ladislav Slezak <lslezak@suse.cz> * Michael G. Fritch <mgfritch@novell.com> * - * $Id: cmdline.ycp 29839 2006-04-07 05:12:29Z mgfritch $ + * $Id: cmdline.ycp 31272 2006-06-02 00:36:47Z mgfritch $ * * Handlers for command line mode. * @@ -25,6 +25,7 @@ import "Sequencer"; import "CommandLine"; + textdomain "vm"; @@ -94,8 +95,13 @@ "existing_start" : ``(start()), // boot vm and display feedback dialog ]; + boolean isAutoinstallation = false; + if (Mode::config()) { // running inside of autoinstallation wizard (AutoYaST) + isAutoinstallation = true; + } + map sequence = $[ - "ws_start" : "manage", + "ws_start" : (isAutoinstallation) ? "select_create" : "manage", "manage" : $[ `close : `finish, @@ -108,65 +114,65 @@ $[ `install : "install_prepare", `existing : "existing_prepare", - `abort : "manage", + `abort : (isAutoinstallation) ? `abort : "manage", ], "install_prepare" : $[ `forceback : "select_create", `next : "install_proposal", - `abort : "manage", + `abort : (isAutoinstallation) ? `abort : "manage", ], "install_proposal" : $[ `forceback : "select_create", `next : "install_start", - `abort : "manage", + `abort : (isAutoinstallation) ? `abort : "manage", ], "install_start" : $[ `forceback : "install_proposal", `next : "boot_prepare", - `abort : "manage", + `abort : (isAutoinstallation) ? `abort : "manage", ], "boot_prepare" : $[ `forceback : "install_prepare", `next : "boot_proposal", - `abort : "manage", + `abort : (isAutoinstallation) ? `abort : "manage", ], "boot_proposal" : $[ `forceback : "install_prepare", `next : "boot_start", - `abort : "manage", + `abort : (isAutoinstallation) ? `abort : "manage", ], "boot_start" : $[ `forceback : "boot_proposal", `again : "select_create", - `next : "manage", - `finish : "manage", - `abort : "manage", + `next : (isAutoinstallation) ? `next : "manage", + `finish : (isAutoinstallation) ? `finish : "manage", + `abort : (isAutoinstallation) ? `abort : "manage", ], "existing_prepare" : $[ `forceback : "select_create", `next : "existing_proposal", - `abort : "manage", + `abort : (isAutoinstallation) ? `abort : "manage", ], "existing_proposal" : $[ `forceback : "select_create", `next : "existing_start", - `abort : "manage", + `abort : (isAutoinstallation) ? `abort : "manage", ], "existing_start" : $[ `forceback : "existing_proposal", `again : "select_create", - `next : "manage", - `finish : "manage", - `abort : "manage", + `next : (isAutoinstallation) ? `next : "manage", + `finish : (isAutoinstallation) ? `finish : "manage", + `abort : (isAutoinstallation) ? `abort : "manage", ] ]; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-vm-2.13.52/src/inst_vm_autoyast.ycp new/yast2-vm-2.13.54/src/inst_vm_autoyast.ycp --- old/yast2-vm-2.13.52/src/inst_vm_autoyast.ycp 2006-04-07 07:12:49.000000000 +0200 +++ new/yast2-vm-2.13.54/src/inst_vm_autoyast.ycp 2006-06-01 23:04:58.000000000 +0200 @@ -5,7 +5,7 @@ * * Purpose: Ask user for network settings. * - * $Id: inst_vm_autoyast.ycp 29839 2006-04-07 05:12:29Z mgfritch $ + * $Id: inst_vm_autoyast.ycp 31270 2006-06-01 21:04:48Z mgfritch $ * */ @@ -60,7 +60,11 @@ else if (ret == `select_profile) { string new_profile = (string) UI::QueryWidget (`id(`profile), `Value); - new_profile = UI::AskForExistingFile(new_profile, "*.xml", _("Select an AutoYaST Profile")); + if (new_profile == nil || new_profile == "") + { + new_profile = "/var/lib/autoinstall/repository/"; + } + new_profile = UI::AskForExistingFile(new_profile, "*", _("Select an AutoYaST Profile")); if (new_profile != nil) { @@ -70,7 +74,7 @@ else if (ret == `next) { string profile = (string) UI::QueryWidget (`id(`profile), `Value); - + if (profile != "" && (integer)SCR::Read(.target.size, profile) < 0) { Report::Error(_("The specified AutoYaST Profile does not exist.")); continue; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-vm-2.13.52/src/inst_vm_manage.ycp new/yast2-vm-2.13.54/src/inst_vm_manage.ycp --- old/yast2-vm-2.13.52/src/inst_vm_manage.ycp 2006-05-12 17:41:21.000000000 +0200 +++ new/yast2-vm-2.13.54/src/inst_vm_manage.ycp 2006-06-02 00:40:34.000000000 +0200 @@ -100,50 +100,7 @@ } -void ReadConfigFileSettings() { - y2milestone("Reading config file settings..."); - list<string> file_list = (list<string>) SCR::Read(.target.dir, VM::GetConfigFilePath()); - y2milestone("file_list=%1", file_list); - if (file_list != nil) { - foreach(string cfg_file, file_list, { - string first_char = substring(cfg_file, 0, 1); - string last_char = substring(cfg_file, size(cfg_file)-1, size(cfg_file)); - if (first_char == "." || last_char == "~") { - // ignore all files that start with '.' or end with '~' - continue; - } - else { - map<string, any> new_settings = $[]; - path configpath = .etc.xen.value + topath(VM::GetConfigFilePath() + cfg_file); - y2milestone("Reading config file: %1", configpath); - new_settings["name"] = regexpsub((string)SCR::Read(configpath + topath("name")), "'(.*)'", "\1"); - if (new_settings["name"]:"" == nil || new_settings["name"]:"" == "") continue; // ignore cfg files that do not contain a machine name. - new_settings["builder"] = regexpsub((string)SCR::Read(configpath + topath("builder")), "'(.*)'", "\1"); - new_settings["memory"] = (string)SCR::Read(configpath + topath("memory")); - new_settings["kernel"] = (string)SCR::Read(configpath + topath("kernel")); - if (new_settings["kernel"]:"" != nil && new_settings["kernel"]:"" != "") { - new_settings["kernel"] = regexpsub(new_settings["kernel"]:"", "'(.*)'", "\1"); - } - new_settings["bootentry"] = regexpsub((string)SCR::Read(configpath + topath("bootentry")), "'(.*)'", "\1"); - if (new_settings["kernel"]:"" == nil || new_settings["kernel"]:"" == "") { - list<string> tmplist = splitstring(new_settings["bootentry"]:"", ":,"); - new_settings["kernel"] = tmplist[1]:""; - } - new_settings["disks"] = VM::ParseDiskConfig((string)SCR::Read(configpath + topath("disk"))); - if (tolower(new_settings["builder"]:"linux") == "hvm") { // full virt. - new_settings["sdl"] = (string)SCR::Read(configpath + topath("sdl")); - new_settings["vnc"] = (string)SCR::Read(configpath + topath("vnc")); - new_settings["vncviewer"] = (string)SCR::Read(configpath + topath("vncviewer")); - } - new_settings["cfg_file"] = cfg_file; - SettingsList = add(SettingsList, new_settings); - } - }); - } -} - - -void UpdateSettingsList(map<string, string> new_item) { +void UpdateSettingsList(map new_item) { y2milestone("UpdateSettingsList(%1)", new_item); if (new_item != nil && new_item["name"]:"" != nil && new_item["name"]:"" != "") { boolean found = false; @@ -201,7 +158,7 @@ y2milestone("lines=%1", lines); foreach (string line, lines, { if (line != nil && line != "") { - map<string, string> new_item = $[]; + map new_item = $[]; new_item["name"] = regexpsub(line, exp, "\1"); new_item["id"] = regexpsub(line, exp, "\2"); new_item["memory"] = regexpsub(line, exp, "\3"); @@ -240,9 +197,7 @@ define void refresh_table() { - SettingsList = []; - - ReadConfigFileSettings(); + SettingsList = VM::ReadAllConfigFileSettings(); y2milestone("SettingsList=%1", SettingsList); Read_XM_List(); @@ -302,13 +257,13 @@ `VBox( `Table(`id(`vm_table), `opt(`notify, `immediate), `header( // table heading - `Left(_("Name") + " "), + `Left(_("Name") + " "), // table heading - _("Virtualization Mode"), + _("Virtualization Mode"), // table heading - _("Status") + " ", + _("Status") + " ", // table heading - _("Memory (MB)"), + _("Memory (MB)"), // table heading _("Console")), []), @@ -356,6 +311,11 @@ integer selected_table_item = 0; symbol ret = nil; + + // check whether X window system is accessible + integer isGraphicalDisplay = (integer) SCR::Execute(.target.bash, "/usr/X11R6/bin/xdpyinfo"); + y2milestone("X check (isGraphicalDisplay): %1", isGraphicalDisplay); + while (true) { Popup::ClearFeedback(); // Always clear pop-up feedback ... just in case we forget to clear one in the loop below. @@ -374,12 +334,14 @@ UI::ChangeWidget(`id(`shutdown), `Enabled, true); UI::ChangeWidget(`id(`terminate), `Enabled, true); // if ( isFullVirtualization(selected_table_item) && ! isSDL(selected_table_item) ) { - if ( ! isSDL(selected_table_item) ) { + if ( ( !isSDL(selected_table_item) ) && ( isGraphicalDisplay == 0 ) ) { // only enable `view button if graphical dispaly and selected vm is not configured to use SDL. (bugzilla #181011) UI::ChangeWidget(`id(`view), `Enabled, true); } } else if (size(SettingsList) > 0) { // vm state is not running (stopped) and at least on vm cfg file exists - UI::ChangeWidget(`id(`start), `Enabled, true); + if ( ( isGraphicalDisplay == 0 ) || ( isFullVirtualization(selected_table_item) == false ) ) { // only enable `start button if graphical display or selected vm is paravirtualized. (bugzilla #181009) + UI::ChangeWidget(`id(`start), `Enabled, true); + } UI::ChangeWidget(`id(`delete), `Enabled, true); } } @@ -445,7 +407,7 @@ } } else { - y2error("delete: invalid table item selected"); + y2error("delete_button: invalid table item selected"); continue; } } @@ -475,7 +437,7 @@ } } else { - y2error("start: invalid table item selected"); + y2error("start_button: invalid table item selected"); continue; } } @@ -502,7 +464,7 @@ } } else { - y2error("view: invalid table item selected"); + y2error("view_button: invalid table item selected"); continue; } } @@ -528,7 +490,7 @@ } } else { - y2error("shutdown: invalid table item selected"); + y2error("shutdown_button: invalid table item selected"); continue; } } @@ -557,7 +519,7 @@ } } else { - y2error("terminate: invalid table item selected"); + y2error("terminate_button: invalid table item selected"); continue; } } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-vm-2.13.52/src/vm_finish.ycp new/yast2-vm-2.13.54/src/vm_finish.ycp --- old/yast2-vm-2.13.52/src/vm_finish.ycp 2006-05-08 17:45:35.000000000 +0200 +++ new/yast2-vm-2.13.54/src/vm_finish.ycp 2006-06-02 02:36:55.000000000 +0200 @@ -8,7 +8,7 @@ * Authors: * Ladislav Slezak <lslezak@suse.cz> * - * $Id: vm_finish.ycp 30736 2006-05-08 15:45:29Z mgfritch $ + * $Id: vm_finish.ycp 31272 2006-06-02 00:36:47Z mgfritch $ * */ @@ -60,7 +60,7 @@ if (Arch::is_xenU()) { // disable HW services - they are useless and usually failing in a virtual machine - list<string> disable_services = ["acpid", "kbd"]; + list<string> disable_services = ["acpid", "kbd", "earlykbd"]; y2milestone("disabling services: %1", disable_services); foreach(string s, disable_services, { ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit-unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit-help@opensuse.org