Blame SOURCES/0011-Keep-installed-packages-in-upgrade-job-RhBug172825216442411741381.patch

2ad730
From a5c4a994f8ad2764ca8f971c39f189d5f9d7d337 Mon Sep 17 00:00:00 2001
2ad730
From: Jaroslav Mracek <jmracek@redhat.com>
2ad730
Date: Tue, 3 Sep 2019 11:01:51 +0200
2ad730
Subject: [PATCH] Keep installed packages in upgrade job (RhBug:1728252,1644241,1741381)
2ad730
2ad730
In combination with marking of job as TARGETED it prevents from
2ad730
reinstalling of modified packages with same NEVRA.
2ad730
2ad730
https://bugzilla.redhat.com/show_bug.cgi?id=1728252
2ad730
https://bugzilla.redhat.com/show_bug.cgi?id=1644241
2ad730
https://bugzilla.redhat.com/show_bug.cgi?id=1741381
2ad730
2ad730
Closes: #1474
2ad730
Approved by: m-blaha
2ad730
---
2ad730
 dnf/base.py               | 3 ---
2ad730
 dnf/module/module_base.py | 2 +-
2ad730
 2 files changed, 1 insertion(+), 4 deletions(-)
2ad730
2ad730
diff --git a/dnf/base.py b/dnf/base.py
2ad730
index b2ced61..628c154 100644
2ad730
--- a/dnf/base.py
2ad730
+++ b/dnf/base.py
2ad730
@@ -1968,9 +1968,6 @@ class Base(object):
2ad730
                 obsoletes=q.installed().union(q.upgrades()))
2ad730
             # add obsoletes into transaction
2ad730
             q = q.union(obsoletes)
2ad730
-        # provide only available packages to solver otherwise selection of available
2ad730
-        # possibilities will be ignored
2ad730
-        q = q.available()
2ad730
         if reponame is not None:
2ad730
             q.filterm(reponame=reponame)
2ad730
         q = self._merge_update_filters(q, pkg_spec=pkg_spec)
2ad730
diff --git a/dnf/module/module_base.py b/dnf/module/module_base.py
2ad730
index 976d730..ce70f63 100644
2ad730
--- a/dnf/module/module_base.py
2ad730
+++ b/dnf/module/module_base.py
2ad730
@@ -214,7 +214,7 @@ class ModuleBase(object):
2ad730
 
2ad730
             if not upgrade_package_set:
2ad730
                 logger.error(_("Unable to match profile in argument {}").format(spec))
2ad730
-            query = self.base.sack.query().available().filterm(name=upgrade_package_set)
2ad730
+            query = self.base.sack.query().filterm(name=upgrade_package_set)
2ad730
             if query:
2ad730
                 sltr = dnf.selector.Selector(self.base.sack)
2ad730
                 sltr.set(pkg=query)
2ad730
--
2ad730
libgit2 0.28.2
2ad730