aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2016-01-27 18:32:57 -0500
committerMike Frysinger <vapier@gentoo.org>2016-01-27 18:32:57 -0500
commit1b33e0ae109e11b1ee696ea6c6919bb86ecbc66f (patch)
tree64e37bc4958eef38d83cbbb486a0ba4ff395abbb /src/ekeyword/ekeyword.py
parentekeyword: allow passing arch_status={} to disable profile logic (diff)
downloadgentoolkit-1b33e0ae109e11b1ee696ea6c6919bb86ecbc66f.tar.gz
gentoolkit-1b33e0ae109e11b1ee696ea6c6919bb86ecbc66f.tar.bz2
gentoolkit-1b33e0ae109e11b1ee696ea6c6919bb86ecbc66f.zip
ekeyword: fix "all" keyword handling w/-keywords
When an ebuild has a keyword like '-sparc', we don't want the magic "all" or "~all" keywords to change it to 'sparc' or '~sparc'.
Diffstat (limited to 'src/ekeyword/ekeyword.py')
-rwxr-xr-xsrc/ekeyword/ekeyword.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ekeyword/ekeyword.py b/src/ekeyword/ekeyword.py
index 64f4eb0..e4a8197 100755
--- a/src/ekeyword/ekeyword.py
+++ b/src/ekeyword/ekeyword.py
@@ -180,9 +180,17 @@ 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('*')
+
+ # For keywords that are explicitly disabled, do not update. When
+ # people use `ekeyword ~all ...` or `ekeyword all ...`, they rarely
+ # (if ever) want to change a '-sparc' to 'sparc' or '-sparc' to
+ # '~sparc'. We force people to explicitly do `ekeyword sparc ...`
+ # in these cases.
+ arches = [x for x in arches if '-' + x not in new_keywords]
else:
arches = (oarch,)