aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2016-06-21 16:50:16 -0400
committerMike Frysinger <vapier@gentoo.org>2016-06-21 16:50:16 -0400
commitbb2446132941352a1026e94df1cffcd664889fa6 (patch)
tree11ae983c78f8cb9bed61abd16e8d0bd9c528ad6f /qlist.c
parentREADME: update repo URLs (diff)
downloadportage-utils-bb2446132941352a1026e94df1cffcd664889fa6.tar.gz
portage-utils-bb2446132941352a1026e94df1cffcd664889fa6.tar.bz2
portage-utils-bb2446132941352a1026e94df1cffcd664889fa6.zip
qlist: fix subslot matching
If the user hasn't request matching against a subslot, make sure we ignore it when checking the package's SLOT value.
Diffstat (limited to 'qlist.c')
-rw-r--r--qlist.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/qlist.c b/qlist.c
index a5b17af8..d2382592 100644
--- a/qlist.c
+++ b/qlist.c
@@ -183,8 +183,11 @@ qlist_match(q_vdb_pkg_ctx *pkg_ctx, const char *name, depend_atom **name_atom, b
}
if (uslot) {
- /* require exact match on SLOTs */
- if (strncmp(pkg_ctx->slot, uslot, uslot_len) != 0 || pkg_ctx->slot[uslot_len] != '\0')
+ /* Require exact match on SLOTs. If the user didn't include a subslot,
+ * then ignore it when checking the package's value. */
+ if (strncmp(pkg_ctx->slot, uslot, uslot_len) != 0 ||
+ (pkg_ctx->slot[uslot_len] != '\0' &&
+ pkg_ctx->slot[uslot_len] != '/'))
return false;
}