richardphibel / rpms / dnf

Forked from rpms/dnf 2 years ago
Clone

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

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