Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package virt-manager for openSUSE:Factory 
checked in at 2024-08-05 17:20:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/virt-manager (Old)
 and      /work/SRC/openSUSE:Factory/.virt-manager.new.7232 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "virt-manager"

Mon Aug  5 17:20:43 2024 rev:260 rq:1191255 version:4.1.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/virt-manager/virt-manager.changes        
2024-07-28 17:18:52.742439326 +0200
+++ /work/SRC/openSUSE:Factory/.virt-manager.new.7232/virt-manager.changes      
2024-08-05 17:20:45.069835657 +0200
@@ -1,0 +2,7 @@
+Mon Jul 29 15:29:29 MDT 2024 - carn...@suse.com
+
+- bsc#1228384 - virt-install generates unwanted libvirt storage
+  pools when running with --dry-run --print-xml
+  virtinst-dont-create-storage-pool-for-dryrun.patch
+
+-------------------------------------------------------------------

New:
----
  virtinst-dont-create-storage-pool-for-dryrun.patch

BETA DEBUG BEGIN:
  New:  pools when running with --dry-run --print-xml
  virtinst-dont-create-storage-pool-for-dryrun.patch
BETA DEBUG END:

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

Other differences:
------------------
++++++ virt-manager.spec ++++++
--- /var/tmp/diff_new_pack.5cYvSn/_old  2024-08-05 17:20:47.389930718 +0200
+++ /var/tmp/diff_new_pack.5cYvSn/_new  2024-08-05 17:20:47.389930718 +0200
@@ -154,6 +154,7 @@
 Patch228:       virtinst-media-detection.patch
 Patch229:       virtinst-enable-video-virtio-for-arm.patch
 Patch230:       virtinst-add-hyperv-performance-options.patch
+Patch231:       virtinst-dont-create-storage-pool-for-dryrun.patch
 # Bug Fixes
 Patch251:       virtman-increase-setKeepAlive-count.patch
 Patch252:       virtman-allow-destroy-from-shutdown-menu-of-crashed-vm.patch
@@ -331,6 +332,10 @@
 donttest="$donttest or testCLI0416virt_clone or testCLI0417virt_clone"
 donttest="$donttest or testCLI0419virt_clone or testCLI0420virt_clone"
 donttest="$donttest or testCLI0428virt_clone"
+# bsc#1228384: --dry-run no longer creates a storage pool when used
+donttest="$donttest or testCLI0007virt_install_storage_creation"
+donttest="$donttest or testCLI0132virt_install_remote_storage"
+donttest="$donttest or testCLI0350virt_xml_edit_clear_disk"
 #
 pytest -v -rfEs -k "not ($donttest)"
 %endif

++++++ virtinst-dont-create-storage-pool-for-dryrun.patch ++++++
Reference: bsc#1228384
Don't create a storage pool for a dry run

Index: virt-manager-4.1.0/virtinst/cli.py
===================================================================
--- virt-manager-4.1.0.orig/virtinst/cli.py
+++ virt-manager-4.1.0/virtinst/cli.py
@@ -69,6 +69,14 @@ def _reset_global_state():
     _globalstate = _GlobalState()
 
 
+_dryrun = False
+
+def get_dryrun():
+    return _dryrun
+def set_dryrun(val):
+    global _dryrun
+    _dryrun = val
+
 VIRT_PARSERS = []
 
 
@@ -646,6 +654,7 @@ def add_misc_options(grp, prompt=False,
                 help=argparse.SUPPRESS)
 
     if dryrun:
+        set_dryrun(True)
         grp.add_argument("--dry-run", action="store_true", dest="dry",
                        help=_("Run through install process, but do not "
                               "create devices or define the guest."))
@@ -3615,7 +3624,7 @@ class ParserDisk(VirtCLIParser):
     ###################
 
     def set_path_cb(self, inst, val, virtarg):
-        inst.set_source_path(val)
+        inst.set_source_path(val, get_dryrun())
     def path_lookup_cb(self, inst, val, virtarg):
         return inst.get_source_path() == val
 
Index: virt-manager-4.1.0/virtinst/devices/disk.py
===================================================================
--- virt-manager-4.1.0.orig/virtinst/devices/disk.py
+++ virt-manager-4.1.0/virtinst/devices/disk.py
@@ -635,7 +635,7 @@ class DeviceDisk(Device):
             self._resolve_storage_backend()
         return self._storage_backend.get_path()
 
-    def set_source_path(self, newpath):
+    def set_source_path(self, newpath, dryrun=False):
         if self._storage_backend.will_create_storage():
             raise xmlutil.DevError(
                     "Can't change disk path if storage creation info "
@@ -644,7 +644,7 @@ class DeviceDisk(Device):
         # User explicitly changed 'path', so try to lookup its storage
         # object since we may need it
         (newpath, vol_object, parent_pool) = diskbackend.manage_path(
-                self.conn, newpath)
+                self.conn, newpath, dryrun)
 
         self._change_backend(newpath, vol_object, parent_pool)
         self._set_xmlpath(self.get_source_path())
Index: virt-manager-4.1.0/virtinst/diskbackend.py
===================================================================
--- virt-manager-4.1.0.orig/virtinst/diskbackend.py
+++ virt-manager-4.1.0/virtinst/diskbackend.py
@@ -136,7 +136,7 @@ def _get_storage_search_path(path):
     return path
 
 
-def manage_path(conn, path):
+def manage_path(conn, path, dryrun=False):
     """
     If path is not managed, try to create a storage pool to probe the path
     """
@@ -150,7 +150,7 @@ def manage_path(conn, path):
 
     searchpath = _get_storage_search_path(path)
     vol, pool = _check_if_path_managed(conn, searchpath)
-    if vol or pool or not _can_auto_manage(path):
+    if vol or pool or not _can_auto_manage(path) or dryrun is True:
         return path, vol, pool
 
     dirname = os.path.dirname(path)

Reply via email to