aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoakim Tjernlund <joakim.tjernlund@infinera.com>2019-05-14 18:58:19 +0200
committerFabian Groffen <grobian@gentoo.org>2019-05-16 19:12:31 +0200
commit8a5215917d1d1a40d7a127c9218fa1c2166954de (patch)
treed46c84642416283c707090ecd3445e7c0007968f /qlist.c
parentqmerge: ensure we respect SLOT while finding candidate package to unmerge (diff)
downloadportage-utils-8a5215917d1d1a40d7a127c9218fa1c2166954de.tar.gz
portage-utils-8a5215917d1d1a40d7a127c9218fa1c2166954de.tar.bz2
portage-utils-8a5215917d1d1a40d7a127c9218fa1c2166954de.zip
qmerge: make qlist_match more sensical about SLOT and REPO matches
make exact match skip : and :: for SLOT resp. REPO when NULL Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com> Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'qlist.c')
-rw-r--r--qlist.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/qlist.c b/qlist.c
index 92191084..52ae77db 100644
--- a/qlist.c
+++ b/qlist.c
@@ -258,13 +258,15 @@ qlist_match(
if (exact) {
int i;
- snprintf(buf, sizeof(buf), "%s/%s-%s:%s%s%s::%s",
+ snprintf(buf, sizeof(buf), "%s/%s-%s%s%s%s%s%s%s",
atom->CATEGORY,
atom->PN,
atom->PVR,
+ atom->SLOT != NULL ? ":" : "",
atom->SLOT != NULL ? atom->SLOT : "",
atom->SUBSLOT != NULL ? "/" : "",
atom->SUBSLOT != NULL ? atom->SUBSLOT : "",
+ atom->REPO != NULL ? "::" : "",
atom->REPO != NULL ? atom->REPO : "");
/* exact match: CAT/PN-PVR[:SLOT][::REPO] */