1 |
commit: ab6a74c11df188a902c1d2a007661a4334d558bc |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jul 1 10:02:22 2021 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jul 1 10:02:22 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=ab6a74c1 |
7 |
|
8 |
qmerge: ignore REPO in version replacement calculation |
9 |
|
10 |
When we up/downgrade a package, or replace it, we don't care what |
11 |
repository it comes from. Since atom_compare checks it when it's in |
12 |
query, simply drop it for that call. |
13 |
|
14 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
15 |
|
16 |
qmerge.c | 5 +++++ |
17 |
1 file changed, 5 insertions(+) |
18 |
|
19 |
diff --git a/qmerge.c b/qmerge.c |
20 |
index 2323f78..bf8dc21 100644 |
21 |
--- a/qmerge.c |
22 |
+++ b/qmerge.c |
23 |
@@ -1095,8 +1095,13 @@ pkg_merge(int level, const depend_atom *qatom, const tree_match_ctx *mpkg) |
24 |
|
25 |
previnst = best_version(slotatom, BV_INSTALLED); |
26 |
if (previnst != NULL) { |
27 |
+ char *orepo = previnst->atom->REPO; |
28 |
+ previnst->atom->REPO = NULL; |
29 |
+ /* drop REPO from query, we don't care about where the |
30 |
+ * replacement comes from here */ |
31 |
replacing = atom_compare(mpkg->atom, previnst->atom); |
32 |
replver = previnst->atom->PVR; |
33 |
+ previnst->atom->REPO = orepo; |
34 |
} |
35 |
|
36 |
(void)qprint_tree_node(level, mpkg, previnst, replacing); |