diff options
| author | Jate Sujjavanich <jatedev@gmail.com> | 2021-11-29 15:10:10 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-12-08 20:28:01 +0000 |
| commit | fc34eadb56606ed1d308a657dc829eb0b7c65331 (patch) | |
| tree | 35cdf1e86ef2ab520fec32635c4f9e4320bcb200 /meta | |
| parent | 652e053d0c3f93c9ed59a80511fdfaea5939aef7 (diff) | |
| download | poky-fc34eadb56606ed1d308a657dc829eb0b7c65331.tar.gz | |
libdnf: Backport bugfix for upgrade calc
Mark goal.upgrade with sltr as targeted
This allows a bugfix in dnf to work
(From OE-Core rev: f17edb6854985ffb1a43b8288253f9618334fc3f)
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>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/recipes-devtools/libdnf/libdnf/0040-Mark-job-goal.upgrade-with-sltr-as-target.patch | 58 | ||||
| -rw-r--r-- | meta/recipes-devtools/libdnf/libdnf_0.28.1.bb | 1 |
2 files changed, 59 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 | |||
diff --git a/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb b/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb index fb7fc80758..39858ad401 100644 --- a/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb +++ b/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb | |||
| @@ -11,6 +11,7 @@ SRC_URI = "git://github.com/rpm-software-management/libdnf;branch=master;protoco | |||
| 11 | file://0001-Add-WITH_TESTS-option.patch \ | 11 | file://0001-Add-WITH_TESTS-option.patch \ |
| 12 | file://0001-include-stdexcept-for-runtime_error.patch \ | 12 | file://0001-include-stdexcept-for-runtime_error.patch \ |
| 13 | file://fix-deprecation-warning.patch \ | 13 | file://fix-deprecation-warning.patch \ |
| 14 | file://0040-Mark-job-goal.upgrade-with-sltr-as-target.patch \ | ||
| 14 | " | 15 | " |
| 15 | 16 | ||
| 16 | SRCREV = "751f89045b80d58c0d05800f74357cf78cdf7e77" | 17 | SRCREV = "751f89045b80d58c0d05800f74357cf78cdf7e77" |
