diff options
Diffstat (limited to 'meta/recipes-devtools/libdnf/libdnf/0040-Mark-job-goal.upgrade-with-sltr-as-target.patch')
-rw-r--r-- | meta/recipes-devtools/libdnf/libdnf/0040-Mark-job-goal.upgrade-with-sltr-as-target.patch | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/meta/recipes-devtools/libdnf/libdnf/0040-Mark-job-goal.upgrade-with-sltr-as-target.patch b/meta/recipes-devtools/libdnf/libdnf/0040-Mark-job-goal.upgrade-with-sltr-as-target.patch new file mode 100644 index 0000000000..61d255581b --- /dev/null +++ b/meta/recipes-devtools/libdnf/libdnf/0040-Mark-job-goal.upgrade-with-sltr-as-target.patch | |||
@@ -0,0 +1,58 @@ | |||
1 | From b4c5a3312287f31a2075a235db846ff611586d2c Mon Sep 17 00:00:00 2001 | ||
2 | From: Jaroslav Mracek <jmracek@redhat.com> | ||
3 | Date: Tue, 3 Sep 2019 11:01:23 +0200 | ||
4 | Subject: [PATCH] Mark job goal.upgrade with sltr as targeted | ||
5 | |||
6 | It allows to keep installed packages in upgrade set. | ||
7 | |||
8 | It also prevents from reinstalling of modified packages with same NEVRA. | ||
9 | |||
10 | |||
11 | Backport commit b4c5a3312287f31a2075a235db846ff611586d2c from | ||
12 | https://github.com/rpm-software-management/libdnf | ||
13 | |||
14 | This bug is present in oe-core's dnf | ||
15 | |||
16 | Remove changes to spec file from upstream | ||
17 | |||
18 | Upstream-Status: Backport | ||
19 | Signed-off-by: Jate Sujjavanich <jatedev@gmail.com> | ||
20 | --- | ||
21 | libdnf.spec | 4 ++-- | ||
22 | libdnf/goal/Goal.cpp | 2 +- | ||
23 | libdnf/goal/Goal.hpp | 6 ++++-- | ||
24 | 3 files changed, 7 insertions(+), 5 deletions(-) | ||
25 | |||
26 | diff --git a/libdnf/goal/Goal.cpp b/libdnf/goal/Goal.cpp | ||
27 | index b69be19..a38cbb4 100644 | ||
28 | --- a/libdnf/goal/Goal.cpp | ||
29 | +++ b/libdnf/goal/Goal.cpp | ||
30 | @@ -767,7 +767,7 @@ void | ||
31 | Goal::upgrade(HySelector sltr) | ||
32 | { | ||
33 | pImpl->actions = static_cast<DnfGoalActions>(pImpl->actions | DNF_UPGRADE); | ||
34 | - sltrToJob(sltr, &pImpl->staging, SOLVER_UPDATE); | ||
35 | + sltrToJob(sltr, &pImpl->staging, SOLVER_UPDATE|SOLVER_TARGETED); | ||
36 | } | ||
37 | |||
38 | void | ||
39 | diff --git a/libdnf/goal/Goal.hpp b/libdnf/goal/Goal.hpp | ||
40 | index f33dfa2..d701317 100644 | ||
41 | --- a/libdnf/goal/Goal.hpp | ||
42 | +++ b/libdnf/goal/Goal.hpp | ||
43 | @@ -86,8 +86,10 @@ public: | ||
44 | /** | ||
45 | * @brief If selector ill formed, it rises std::runtime_error() | ||
46 | * | ||
47 | - * @param sltr p_sltr: It should contain only upgrades with obsoletes otherwise it can try to | ||
48 | - * reinstall installonly packages. | ||
49 | + * @param sltr p_sltr: It contains upgrade-to packages and obsoletes. The presence of installed | ||
50 | + * packages prevents reinstalling packages with the same NEVRA but changed contant. To honor repo | ||
51 | + * priority all relevant packages must be present. To upgrade package foo from priority repo, all | ||
52 | + * installed and available packages of the foo must be in selector plus obsoletes of foo. | ||
53 | */ | ||
54 | void upgrade(HySelector sltr); | ||
55 | void userInstalled(DnfPackage *pkg); | ||
56 | -- | ||
57 | 2.7.4 | ||
58 | |||