Hello community,

here is the log from the commit of package yast2-vm for openSUSE:Factory 
checked in at 2018-02-13 10:24:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-vm (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-vm.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-vm"

Tue Feb 13 10:24:07 2018 rev:78 rq:575847 version:3.2.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-vm/yast2-vm.changes        2017-11-10 
14:43:31.354181396 +0100
+++ /work/SRC/openSUSE:Factory/.yast2-vm.new/yast2-vm.changes   2018-02-13 
10:24:09.180444061 +0100
@@ -1,0 +2,8 @@
+Fri Feb  9 12:19:42 MST 2018 - carn...@suse.com
+
+- The check for TextMode was in the wrong place and
+  useless. Move it and update package list if user
+  doesn't want GUI components installed. (bsc#1077694)
+- 3.2.5
+
+-------------------------------------------------------------------

Old:
----
  yast2-vm-3.2.4.tar.bz2

New:
----
  yast2-vm-3.2.5.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-vm.spec ++++++
--- /var/tmp/diff_new_pack.mDPTOo/_old  2018-02-13 10:24:09.868419274 +0100
+++ /var/tmp/diff_new_pack.mDPTOo/_new  2018-02-13 10:24:09.872419130 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package yast2-vm
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-vm
-Version:        3.2.4
+Version:        3.2.5
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-vm-3.2.4.tar.bz2 -> yast2-vm-3.2.5.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-vm-3.2.4/package/yast2-vm.changes 
new/yast2-vm-3.2.5/package/yast2-vm.changes
--- old/yast2-vm-3.2.4/package/yast2-vm.changes 2017-11-07 23:56:16.941121226 
+0100
+++ new/yast2-vm-3.2.5/package/yast2-vm.changes 2018-02-12 18:44:06.000000000 
+0100
@@ -1,4 +1,12 @@
 -------------------------------------------------------------------
+Fri Feb  9 12:19:42 MST 2018 - carn...@suse.com
+
+- The check for TextMode was in the wrong place and
+  useless. Move it and update package list if user
+  doesn't want GUI components installed. (bsc#1077694)
+- 3.2.5
+
+-------------------------------------------------------------------
 Thu Nov  2 10:43:22 MDT 2017 - carn...@suse.com
 
 - bsc#1007599 - yast virtualization module does not work well with
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-vm-3.2.4/package/yast2-vm.spec 
new/yast2-vm-3.2.5/package/yast2-vm.spec
--- old/yast2-vm-3.2.4/package/yast2-vm.spec    2017-11-07 23:56:16.941121226 
+0100
+++ new/yast2-vm-3.2.5/package/yast2-vm.spec    2018-02-12 18:44:06.000000000 
+0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-vm
-Version:        3.2.4
+Version:        3.2.5
 Release:        0
 Group:         System/YaST
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-vm-3.2.4/src/modules/VirtConfig.rb 
new/yast2-vm-3.2.5/src/modules/VirtConfig.rb
--- old/yast2-vm-3.2.4/src/modules/VirtConfig.rb        2017-11-07 
23:56:16.941121226 +0100
+++ new/yast2-vm-3.2.5/src/modules/VirtConfig.rb        2018-02-12 
18:44:06.000000000 +0100
@@ -1,7 +1,7 @@
 # encoding: utf-8
 
 # 
------------------------------------------------------------------------------
-# Copyright (c) 2013 Novell, Inc. All Rights Reserved.
+# Copyright (c) 2018 Novell, Inc. All Rights Reserved.
 #
 #
 # This program is free software; you can redistribute it and/or modify it under
@@ -153,6 +153,52 @@
       isPAE
     end
 
+    # Check for TextMode only
+    def installGUIComponents(packages)
+      inst_gui = true
+
+      Builtins.y2milestone("Checking for TextMode display")
+
+      kvm_index = packages.index("patterns-server-kvm_tools")
+      xen_index = packages.index("patterns-server-xen_tools")
+
+      if kvm_index != nil || xen_index != nil
+        # The tools patterns install gui components. If in text mode we may 
not want them
+        if Ops.get_boolean(UI.GetDisplayInfo, "TextMode", true) == true
+          inst_gui = Popup.YesNo(
+            _("Running in text mode. Install graphical components anyway?")
+          )
+        end
+      end
+      if inst_gui == false
+        # Text Mode Only.
+        Builtins.y2milestone("Requested not to install graphical components")
+        Builtins.y2milestone("Current package list = %1", packages)
+        common_packages = ["libvirt-client", "libvirt-daemon-config-network", 
"virt-manager-common", "virt-install", "vm-install"]
+        add_common = false
+
+        # The tools patterns will pull in graphical components so drop entire 
pattern if present
+        if kvm_index != nil
+          packages = Builtins.remove(packages, kvm_index)
+          packages = Builtins.add(packages, "libvirt-daemon-qemu")
+          add_common = true
+        end
+
+        if xen_index != nil
+          packages = Builtins.remove(packages, xen_index)
+          packages = Builtins.add(packages, "libvirt-daemon-xen")
+          add_common = true
+        end
+
+        if add_common == true
+          packages = packages + common_packages
+        end
+        Builtins.y2milestone("Non-gui package list = %1", packages)
+      end
+
+      return packages
+    end
+
     def reloadApparmor
       if Package.InstalledAll(["apparmor"])
         cmd = "systemctl restart apparmor.service"
@@ -200,7 +246,6 @@
       false
     end
 
-
     def ConfigureDom0(is_s390)
       progress_stages = [
         # progress stage 1/2
@@ -395,12 +440,12 @@
       packages = []
       common_vm_packages = []
 
-      if install_vm == true
-        common_vm_packages = ["libvirt-client", "vm-install", "virt-install", 
"bridge-utils"]
-      end
-
       result = true
       if isOpenSuse == true
+        if install_vm == true
+          common_vm_packages = ["libvirt-client", "vm-install", "virt-install"]
+        end
+
        if isTumbleweed == true
           packages = ["patterns-server-xen_server"] if install_xen_server
        else
@@ -433,6 +478,7 @@
           packages = packages + ["patterns-server-xen_tools"] if 
install_xen_tools
           packages = packages + ["patterns-server-kvm_server"] if 
install_kvm_server
           packages = packages + ["patterns-server-kvm_tools"] if 
install_kvm_tools
+          packages = installGUIComponents(packages)
           result = Package.DoInstall(packages)
           if result == false
             Report.Error(_("Package installation failed for sles patterns\n"))
@@ -441,23 +487,6 @@
         end
       end
 
-      inst_gui = true
-
-      Builtins.y2milestone("VirtConfig::ConfigureDom0 Checking for 
packages...")
-
-      # Assume python gtk is installed. If in text mode we don't care
-      if Ops.get_boolean(UI.GetDisplayInfo, "TextMode", true) == true
-        inst_gui = Popup.YesNo(
-          _("Running in text mode. Install graphical components anyway?")
-        )
-      end
-      if inst_gui == true
-        packages = Builtins.add(packages, "python-gtk")
-        # Also make sure virt-manager and virt-viewer is there - runs GUI only
-        packages = Builtins.add(packages, "virt-manager")
-        packages = Builtins.add(packages, "virt-viewer")
-      end
-
       success = true
 
       # progressbar title - check whether Xen packages are installed


Reply via email to