From 57ad671b9085af5a19a444119bdbb060b8cbea35 Mon Sep 17 00:00:00 2001
From: Jaroslav Mracek <jmracek@redhat.com>
Date: Fri, 18 Oct 2019 10:54:09 +0200
Subject: [PATCH] Reset libgit2 module when F31
This is downstream hack that resolves distribution issue with libgit2.
libgit2 module drops default and is supposed to be replaced non-modular
package.
https://bugzilla.redhat.com/show_bug.cgi?id=1747408
---
plugins/system_upgrade.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/plugins/system_upgrade.py b/plugins/system_upgrade.py
index b9615a9..26c218d 100644
--- a/plugins/system_upgrade.py
+++ b/plugins/system_upgrade.py
@@ -514,6 +514,15 @@ class SystemUpgradeCommand(dnf.cli.Command):
else:
self.base.upgrade_all()
+ # downstream hack to narrow libgit2 changes in distribution
+ if (self.base.conf.releasever == "31" and dnf.base.WITH_MODULES):
+ module_base = dnf.module.module_base.ModuleBase(self.base)
+ try:
+ module_base.reset(["libgit2"])
+ except dnf.exceptions.MarkingErrors as e:
+ # When module "libgit2" is not available, just pass
+ pass
+
with self.state as state:
state.download_status = 'downloading'
state.target_releasever = self.base.conf.releasever
--
2.23.0