ostree is optional and may not be included in the environment that anaconda is running in, so only check the version if it is actually going to be used.
From: "Brian C. Lane" bcl@redhat.com
ostree is optional and may not be included in the environment that anaconda is running in, so only check the version if it is actually going to be used. --- pyanaconda/packaging/rpmostreepayload.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/packaging/rpmostreepayload.py b/pyanaconda/packaging/rpmostreepayload.py index a1069d5..5fdeaad 100644 --- a/pyanaconda/packaging/rpmostreepayload.py +++ b/pyanaconda/packaging/rpmostreepayload.py @@ -32,7 +32,6 @@ import gi gi.require_version("GLib", "2.0") gi.require_version("Gio", "2.0") -gi.require_version("OSTree", "1.0")
from gi.repository import GLib from gi.repository import Gio @@ -134,6 +133,7 @@ def install(self): mainctx.push_thread_default()
cancellable = None + gi.require_version("OSTree", "1.0") from gi.repository import OSTree ostreesetup = self.data.ostreesetup log.info("executing ostreesetup=%r", ostreesetup) @@ -267,6 +267,7 @@ def recreateInitrds(self): def postInstall(self): super(RPMOSTreePayload, self).postInstall()
+ gi.require_version("OSTree", "1.0") from gi.repository import OSTree cancellable = None
Added label: ACK.
Closed.
pushed since it's a simple enough change.
anaconda-patches@lists.fedorahosted.org