diff options
Diffstat (limited to 'pym/_emerge/Package.py')
-rw-r--r-- | pym/_emerge/Package.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/pym/_emerge/Package.py b/pym/_emerge/Package.py index b7501860..93b86f10 100644 --- a/pym/_emerge/Package.py +++ b/pym/_emerge/Package.py @@ -207,13 +207,18 @@ class Package(Task): self.disabled = frozenset(disabled) self.all = frozenset(chain(enabled, disabled, other)) - def is_valid_flag(self, flag): + def is_valid_flag(self, flags): """ - @returns: True if flag is a valid USE value which may + @returns: True if all flags are valid USE values which may be specified in USE dependencies, False otherwise. """ - return flag in self.all or \ - self._iuse_implicit_regex.match(flag) is not None + if isinstance(flags, basestring): + flags = [flags] + for flag in flags: + if not flag in self.all and \ + self._iuse_implicit_regex.match(flag) is None: + return False + return True def _get_hash_key(self): hash_key = getattr(self, "_hash_key", None) |