summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/dnf/dnf/0040-Keep-installed-packages-in-upgrade-job-RhBug-1728252.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/dnf/dnf/0040-Keep-installed-packages-in-upgrade-job-RhBug-1728252.patch')
-rw-r--r--meta/recipes-devtools/dnf/dnf/0040-Keep-installed-packages-in-upgrade-job-RhBug-1728252.patch60
1 files changed, 60 insertions, 0 deletions
diff --git a/meta/recipes-devtools/dnf/dnf/0040-Keep-installed-packages-in-upgrade-job-RhBug-1728252.patch b/meta/recipes-devtools/dnf/dnf/0040-Keep-installed-packages-in-upgrade-job-RhBug-1728252.patch
new file mode 100644
index 0000000000..57c2375a54
--- /dev/null
+++ b/meta/recipes-devtools/dnf/dnf/0040-Keep-installed-packages-in-upgrade-job-RhBug-1728252.patch
@@ -0,0 +1,60 @@
1From c88a77198c0156e425c2725f30e481207de5162f Mon Sep 17 00:00:00 2001
2From: Jaroslav Mracek <jmracek@redhat.com>
3Date: Tue, 3 Sep 2019 11:01:51 +0200
4Subject: [PATCH] Keep installed packages in upgrade job
5 (RhBug:1728252,1644241,1741381)
6
7In combination with marking of job as TARGETED it prevents from
8reinstalling of modified packages with same NEVRA.
9
10https://bugzilla.redhat.com/show_bug.cgi?id=1728252
11https://bugzilla.redhat.com/show_bug.cgi?id=1644241
12https://bugzilla.redhat.com/show_bug.cgi?id=1741381
13
14Closes: #1474
15Approved by: m-blaha
16
17
18Backport to fix bug in dnf in oe-core
19from https://github.com/rpm-software-management/dnf
20
21Removed spec file portion of patch
22
23Upstream-Status: Backport
24Signed-off-by: Jate Sujjavanich <jatedev@gmail.com>
25---
26 dnf.spec | 4 ++--
27 dnf/base.py | 3 ---
28 dnf/module/module_base.py | 2 +-
29 3 files changed, 3 insertions(+), 6 deletions(-)
30
31diff --git a/dnf/base.py b/dnf/base.py
32index b2ced61..628c154 100644
33--- a/dnf/base.py
34+++ b/dnf/base.py
35@@ -1968,9 +1968,6 @@ class Base(object):
36 obsoletes=q.installed().union(q.upgrades()))
37 # add obsoletes into transaction
38 q = q.union(obsoletes)
39- # provide only available packages to solver otherwise selection of available
40- # possibilities will be ignored
41- q = q.available()
42 if reponame is not None:
43 q.filterm(reponame=reponame)
44 q = self._merge_update_filters(q, pkg_spec=pkg_spec)
45diff --git a/dnf/module/module_base.py b/dnf/module/module_base.py
46index 976d730..ce70f63 100644
47--- a/dnf/module/module_base.py
48+++ b/dnf/module/module_base.py
49@@ -214,7 +214,7 @@ class ModuleBase(object):
50
51 if not upgrade_package_set:
52 logger.error(_("Unable to match profile in argument {}").format(spec))
53- query = self.base.sack.query().available().filterm(name=upgrade_package_set)
54+ query = self.base.sack.query().filterm(name=upgrade_package_set)
55 if query:
56 sltr = dnf.selector.Selector(self.base.sack)
57 sltr.set(pkg=query)
58--
592.7.4
60