diff options
author | 2021-08-16 15:21:57 +0200 | |
---|---|---|
committer | 2021-08-16 15:21:57 +0200 | |
commit | 18c65792094cb90b6876940b86a35e21e3da488c (patch) | |
tree | 6a56f3e46ce05fc8e42727a68c91cdaada44c3c3 /qmerge.c | |
parent | TODO: update qmerge items (diff) | |
download | portage-utils-18c65792094cb90b6876940b86a35e21e3da488c.tar.gz portage-utils-18c65792094cb90b6876940b86a35e21e3da488c.tar.bz2 portage-utils-18c65792094cb90b6876940b86a35e21e3da488c.zip |
libq/atom: introduce atom_compare_flg
atom_compare_flg allows to give match behaviour flags, such that often
used exceptions can now be handled without having to modify the input
atoms.
atom_compare is now a macro calling atom_compare_flg with
flags=ATOM_COMP_DEFAULT.
Updated all callers that can use this feature.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'qmerge.c')
-rw-r--r-- | qmerge.c | 17 |
1 files changed, 3 insertions, 14 deletions
@@ -1095,23 +1095,12 @@ pkg_merge(int level, const depend_atom *qatom, const tree_match_ctx *mpkg) previnst = best_version(slotatom, BV_INSTALLED); if (previnst != NULL) { - char *orepo; - char *osubslot; - /* drop REPO and SUBSLOT from query, we don't care about where * the replacement comes from here, SUBSLOT only affects rebuild * triggering */ - orepo = previnst->atom->REPO; - osubslot = previnst->atom->SUBSLOT; - previnst->atom->REPO = NULL; - previnst->atom->SUBSLOT = NULL; - - replacing = atom_compare(mpkg->atom, previnst->atom); - replver = previnst->atom->PVR; - - /* restore atom for later printing/handling */ - previnst->atom->REPO = orepo; - previnst->atom->SUBSLOT = osubslot; + replacing = atom_compare_flg(mpkg->atom, previnst->atom, + ATOM_COMP_NOSUBSLOT | ATOM_COMP_NOREPO); + replver = previnst->atom->PVR; } (void)qprint_tree_node(level, mpkg, previnst, replacing); |