commit: e2319b0dcf7b54d71ddfd1e3eca712c49e83d6fe Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> AuthorDate: Tue Feb 5 14:19:22 2019 +0000 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> CommitDate: Tue Feb 5 14:19:22 2019 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=e2319b0d
atom_explode: ignore slot matching operators Bug: https://bugs.gentoo.org/673750 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> libq/atom_explode.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libq/atom_explode.c b/libq/atom_explode.c index a4ba569..de42103 100644 --- a/libq/atom_explode.c +++ b/libq/atom_explode.c @@ -1,9 +1,10 @@ /* - * Copyright 2005-2018 Gentoo Foundation + * Copyright 2005-2019 Gentoo Foundation * Distributed under the terms of the GNU General Public License v2 * * Copyright 2005-2008 Ned Ludd - <[email protected]> * Copyright 2005-2014 Mike Frysinger - <[email protected]> + * Copyright 2018- Fabian Groffen - <[email protected]> */ typedef enum { VER_ALPHA=0, VER_BETA, VER_PRE, VER_RC, VER_NORM, VER_P } atom_suffixes; @@ -161,6 +162,10 @@ atom_explode(const char *atom) if ((ptr = strrchr(ret->CATEGORY, ':')) != NULL) { ret->SLOT = ptr + 1; *ptr = '\0'; + + /* ignore slots that are about package matching */ + if (ret->SLOT[0] == '=' || ret->SLOT[0] == '*') + ret->SLOT = NULL; } /* see if we have any suffix operators */
