|
|
6e2a04 |
From a9e281087d075f798ac64dad657d34816d533d2a Mon Sep 17 00:00:00 2001
|
|
|
6e2a04 |
From: Jaroslav Mracek <jmracek@redhat.com>
|
|
|
6e2a04 |
Date: Tue, 3 Sep 2019 11:01:23 +0200
|
|
|
6e2a04 |
Subject: [PATCH] Mark job goal.upgrade with sltr as targeted
|
|
|
6e2a04 |
|
|
|
6e2a04 |
It allows to keep installed packages in upgrade set.
|
|
|
6e2a04 |
|
|
|
6e2a04 |
It also prevents from reinstalling of modified packages with same NEVRA.
|
|
|
6e2a04 |
---
|
|
|
6e2a04 |
libdnf/goal/Goal.cpp | 2 +-
|
|
|
6e2a04 |
libdnf/goal/Goal.hpp | 6 ++++--
|
|
|
6e2a04 |
2 files changed, 5 insertions(+), 3 deletions(-)
|
|
|
6e2a04 |
|
|
|
6e2a04 |
diff --git a/libdnf/goal/Goal.cpp b/libdnf/goal/Goal.cpp
|
|
|
6e2a04 |
index b69be19..a38cbb4 100644
|
|
|
6e2a04 |
--- a/libdnf/goal/Goal.cpp
|
|
|
6e2a04 |
+++ b/libdnf/goal/Goal.cpp
|
|
|
6e2a04 |
@@ -767,7 +767,7 @@ void
|
|
|
6e2a04 |
Goal::upgrade(HySelector sltr)
|
|
|
6e2a04 |
{
|
|
|
6e2a04 |
pImpl->actions = static_cast<DnfGoalActions>(pImpl->actions | DNF_UPGRADE);
|
|
|
6e2a04 |
- sltrToJob(sltr, &pImpl->staging, SOLVER_UPDATE);
|
|
|
6e2a04 |
+ sltrToJob(sltr, &pImpl->staging, SOLVER_UPDATE|SOLVER_TARGETED);
|
|
|
6e2a04 |
}
|
|
|
6e2a04 |
|
|
|
6e2a04 |
void
|
|
|
6e2a04 |
diff --git a/libdnf/goal/Goal.hpp b/libdnf/goal/Goal.hpp
|
|
|
6e2a04 |
index f33dfa2..d701317 100644
|
|
|
6e2a04 |
--- a/libdnf/goal/Goal.hpp
|
|
|
6e2a04 |
+++ b/libdnf/goal/Goal.hpp
|
|
|
6e2a04 |
@@ -86,8 +86,10 @@ public:
|
|
|
6e2a04 |
/**
|
|
|
6e2a04 |
* @brief If selector ill formed, it rises std::runtime_error()
|
|
|
6e2a04 |
*
|
|
|
6e2a04 |
- * @param sltr p_sltr: It should contain only upgrades with obsoletes otherwise it can try to
|
|
|
6e2a04 |
- * reinstall installonly packages.
|
|
|
6e2a04 |
+ * @param sltr p_sltr: It contains upgrade-to packages and obsoletes. The presence of installed
|
|
|
6e2a04 |
+ * packages prevents reinstalling packages with the same NEVRA but changed contant. To honor repo
|
|
|
6e2a04 |
+ * priority all relevant packages must be present. To upgrade package foo from priority repo, all
|
|
|
6e2a04 |
+ * installed and available packages of the foo must be in selector plus obsoletes of foo.
|
|
|
6e2a04 |
*/
|
|
|
6e2a04 |
void upgrade(HySelector sltr);
|
|
|
6e2a04 |
void userInstalled(DnfPackage *pkg);
|
|
|
6e2a04 |
--
|
|
|
6e2a04 |
libgit2 0.28.2
|
|
|
6e2a04 |
|