diff options
author | Mike Frysinger <vapier@gentoo.org> | 2014-01-27 18:13:43 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2014-01-27 18:13:43 -0500 |
commit | 465c0532f88df7bf3af08e84172ea5a908105fc1 (patch) | |
tree | 3512d05ab6f9fdc56f2cf4334c70aa66ac335dc2 | |
parent | ekeyword: fix python3 compat issues (diff) | |
download | gentoolkit-465c0532f88df7bf3af08e84172ea5a908105fc1.tar.gz gentoolkit-465c0532f88df7bf3af08e84172ea5a908105fc1.tar.bz2 gentoolkit-465c0532f88df7bf3af08e84172ea5a908105fc1.zip |
ekeyword: ignore "*" when processing "all"
Reported-by: Jeroen Roovers <jer@gentoo.org>
-rwxr-xr-x | src/ekeyword/ekeyword.py | 3 | ||||
-rwxr-xr-x | src/ekeyword/ekeyword_unittest.py | 9 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/ekeyword/ekeyword.py b/src/ekeyword/ekeyword.py index 3fa74c1..080e04f 100755 --- a/src/ekeyword/ekeyword.py +++ b/src/ekeyword/ekeyword.py @@ -151,6 +151,9 @@ def process_keywords(keywords, ops, arch_status=None): # master list. If it lacks some keywords, then we might miss # somethings here, but not much we can do. arches = old_arches + # We ignore the glob arch as we never want to tweak it. + if '*' in arches: + arches.remove('*') else: arches = (oarch,) diff --git a/src/ekeyword/ekeyword_unittest.py b/src/ekeyword/ekeyword_unittest.py index 00c295f..b491db0 100755 --- a/src/ekeyword/ekeyword_unittest.py +++ b/src/ekeyword/ekeyword_unittest.py @@ -176,12 +176,11 @@ class TestProcessKeywords(unittest.TestCase): 'arm': 'stable', 'arm64': 'exp', 'm68k': 'dev', - 'mips': 'dev', 's390': 'dev', 'sh': 'dev', } - self._test('alpha arm arm64 m68k mips arm-linux', ops, - '~alpha ~arm ~arm64 ~m68k ~mips ~arm-linux', arch_status) + self._test('-* ~* * alpha arm arm64 m68k arm-linux', ops, + '-* ~* * ~alpha ~arm ~arm64 ~m68k ~arm-linux', arch_status) def testAllMultiUnstableStable(self): ops = ( @@ -194,8 +193,8 @@ class TestProcessKeywords(unittest.TestCase): 'arm64': 'exp', 'm68k': 'dev', } - self._test('alpha arm arm64 m68k', ops, - '~alpha arm ~arm64 ~m68k', arch_status) + self._test('-* ~* * alpha arm arm64 m68k', ops, + '-* ~* * ~alpha arm ~arm64 ~m68k', arch_status) class TestProcessContent(unittest.TestCase): |