diff options
author | 2016-06-21 16:50:16 -0400 | |
---|---|---|
committer | 2016-06-21 16:50:16 -0400 | |
commit | bb2446132941352a1026e94df1cffcd664889fa6 (patch) | |
tree | 11ae983c78f8cb9bed61abd16e8d0bd9c528ad6f /qlist.c | |
parent | README: update repo URLs (diff) | |
download | portage-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.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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; } |