neil / rpms / python-blivet

Forked from rpms/python-blivet a year ago
Clone
8fd212
From 83ccc9f9f14845fcce7a5ba5fa21fbb97b1dbbb7 Mon Sep 17 00:00:00 2001
3187bc
From: Vojtech Trefny <vtrefny@redhat.com>
3187bc
Date: Wed, 11 Jul 2018 15:36:24 +0200
3187bc
Subject: [PATCH] Force command line based libblockdev LVM plugin
3187bc
3187bc
---
3187bc
 blivet/__init__.py | 9 +++++++--
3187bc
 1 file changed, 7 insertions(+), 2 deletions(-)
3187bc
3187bc
diff --git a/blivet/__init__.py b/blivet/__init__.py
8fd212
index dd8d0f54..62cc539a 100644
3187bc
--- a/blivet/__init__.py
3187bc
+++ b/blivet/__init__.py
3187bc
@@ -63,11 +63,16 @@ gi.require_version("BlockDev", "2.0")
3187bc
 from gi.repository import GLib
3187bc
 from gi.repository import BlockDev as blockdev
3187bc
 if arch.is_s390():
3187bc
-    _REQUESTED_PLUGIN_NAMES = set(("lvm", "btrfs", "swap", "crypto", "loop", "mdraid", "mpath", "dm", "s390", "nvdimm"))
3187bc
+    _REQUESTED_PLUGIN_NAMES = set(("btrfs", "swap", "crypto", "loop", "mdraid", "mpath", "dm", "s390", "nvdimm"))
3187bc
 else:
3187bc
-    _REQUESTED_PLUGIN_NAMES = set(("lvm", "btrfs", "swap", "crypto", "loop", "mdraid", "mpath", "dm", "nvdimm"))
3187bc
+    _REQUESTED_PLUGIN_NAMES = set(("btrfs", "swap", "crypto", "loop", "mdraid", "mpath", "dm", "nvdimm"))
3187bc
 
3187bc
 _requested_plugins = blockdev.plugin_specs_from_names(_REQUESTED_PLUGIN_NAMES)
3187bc
+# XXX force non-dbus LVM plugin
3187bc
+lvm_plugin = blockdev.PluginSpec()
3187bc
+lvm_plugin.name = blockdev.Plugin.LVM
3187bc
+lvm_plugin.so_name = "libbd_lvm.so.2"
3187bc
+_requested_plugins.append(lvm_plugin)
3187bc
 try:
3187bc
     # do not check for dependencies during libblockdev initializtion, do runtime
3187bc
     # checks instead
3187bc
-- 
8fd212
2.38.1
3187bc