summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJate Sujjavanich <jatedev@gmail.com>2021-11-29 15:10:11 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-12-08 20:28:01 +0000
commit57b3bf09e191b1a1517c892c3fd8c44ab31003f5 (patch)
tree727e04046264f860ecb0ecf223f677908bb21b4c
parentfc34eadb56606ed1d308a657dc829eb0b7c65331 (diff)
downloadpoky-57b3bf09e191b1a1517c892c3fd8c44ab31003f5.tar.gz
dnf: Backport bugfix for upgrade
Keep installed packages in upgrade job This prevents duplicate identical packages from being reinstalled with each upgrade (From OE-Core rev: 87c413d2a9554412d02dee4534febfafdbe4a4c1) Signed-off-by: Jate Sujjavanich <jatedev@gmail.com> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/dnf/dnf/0040-Keep-installed-packages-in-upgrade-job-RhBug-1728252.patch60
-rw-r--r--meta/recipes-devtools/dnf/dnf_4.2.2.bb1
2 files changed, 61 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
diff --git a/meta/recipes-devtools/dnf/dnf_4.2.2.bb b/meta/recipes-devtools/dnf/dnf_4.2.2.bb
index 1b00ae945e..6b6b233d6d 100644
--- a/meta/recipes-devtools/dnf/dnf_4.2.2.bb
+++ b/meta/recipes-devtools/dnf/dnf_4.2.2.bb
@@ -16,6 +16,7 @@ SRC_URI = "git://github.com/rpm-software-management/dnf.git;branch=master;protoc
16 file://0030-Run-python-scripts-using-env.patch \ 16 file://0030-Run-python-scripts-using-env.patch \
17 file://Fix-SyntaxWarning.patch \ 17 file://Fix-SyntaxWarning.patch \
18 file://0001-set-python-path-for-completion_helper.patch \ 18 file://0001-set-python-path-for-completion_helper.patch \
19 file://0040-Keep-installed-packages-in-upgrade-job-RhBug-1728252.patch \
19 " 20 "
20 21
21SRCREV = "9947306a55271b8b7c9e2b6e3b7d582885b6045d" 22SRCREV = "9947306a55271b8b7c9e2b6e3b7d582885b6045d"