summaryrefslogtreecommitdiffstats
path: root/comps.py
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2001-01-22 15:06:52 +0000
committerMatt Wilson <msw@redhat.com>2001-01-22 15:06:52 +0000
commit8e6904c232fb4c7c8949b86019024c833160a221 (patch)
tree433b5b82b362ed3de08b9cd706437b9e1353d67c /comps.py
parent6d69d0326006741f63a0403304ebc216ebc50665 (diff)
downloadanaconda-8e6904c232fb4c7c8949b86019024c833160a221.tar.gz
anaconda-8e6904c232fb4c7c8949b86019024c833160a221.tar.xz
anaconda-8e6904c232fb4c7c8949b86019024c833160a221.zip
add support for \!
Diffstat (limited to 'comps.py')
-rw-r--r--comps.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/comps.py b/comps.py
index f1a7c07a7..535021991 100644
--- a/comps.py
+++ b/comps.py
@@ -353,16 +353,19 @@ class ComponentSet:
else:
if len(l) != 2:
raise ValueError, "too many arguments for lang"
- if l[1] not in langs:
- newTruth = 0
+ if l[1] and l[1][0] == "!":
+ newTruth = l[1] not in langs
else:
- newTruth = 1
+ newTruth = l[1] in langs
elif l[0] == "arch":
if tags and "arch" not in tags:
newTruth = 1
if len(l) != 2:
raise ValueError, "too many arguments for arch"
- newTruth = l[1] in self.archList
+ if l[1] and l[1][0] == "!":
+ newTruth = l[1] not in self.archList
+ else:
+ newTruth = l[1] in self.archList
else:
s = "unknown condition type %s" % (l[0],)
raise ValueError, s