1 |
commit: e2319b0dcf7b54d71ddfd1e3eca712c49e83d6fe |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Feb 5 14:19:22 2019 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Feb 5 14:19:22 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=e2319b0d |
7 |
|
8 |
atom_explode: ignore slot matching operators |
9 |
|
10 |
Bug: https://bugs.gentoo.org/673750 |
11 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
12 |
|
13 |
libq/atom_explode.c | 7 ++++++- |
14 |
1 file changed, 6 insertions(+), 1 deletion(-) |
15 |
|
16 |
diff --git a/libq/atom_explode.c b/libq/atom_explode.c |
17 |
index a4ba569..de42103 100644 |
18 |
--- a/libq/atom_explode.c |
19 |
+++ b/libq/atom_explode.c |
20 |
@@ -1,9 +1,10 @@ |
21 |
/* |
22 |
- * Copyright 2005-2018 Gentoo Foundation |
23 |
+ * Copyright 2005-2019 Gentoo Foundation |
24 |
* Distributed under the terms of the GNU General Public License v2 |
25 |
* |
26 |
* Copyright 2005-2008 Ned Ludd - <solar@g.o> |
27 |
* Copyright 2005-2014 Mike Frysinger - <vapier@g.o> |
28 |
+ * Copyright 2018- Fabian Groffen - <grobian@g.o> |
29 |
*/ |
30 |
|
31 |
typedef enum { VER_ALPHA=0, VER_BETA, VER_PRE, VER_RC, VER_NORM, VER_P } atom_suffixes; |
32 |
@@ -161,6 +162,10 @@ atom_explode(const char *atom) |
33 |
if ((ptr = strrchr(ret->CATEGORY, ':')) != NULL) { |
34 |
ret->SLOT = ptr + 1; |
35 |
*ptr = '\0'; |
36 |
+ |
37 |
+ /* ignore slots that are about package matching */ |
38 |
+ if (ret->SLOT[0] == '=' || ret->SLOT[0] == '*') |
39 |
+ ret->SLOT = NULL; |
40 |
} |
41 |
|
42 |
/* see if we have any suffix operators */ |