summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Luther <SebastianLuther@gmx.de>2010-05-25 13:19:05 +0200
committerZac Medico <zmedico@gentoo.org>2010-05-25 04:43:46 -0700
commitae975aac54bdb26331c5539a85987ca7f5c0f0e8 (patch)
tree5045ddd8e908036c8d3bb38aa9112779818f3a89
parentSimplify code by passing a list of flags to Package.iuse.is_valid_flag (diff)
downloadportage-idfetch-ae975aac54bdb26331c5539a85987ca7f5c0f0e8.tar.gz
portage-idfetch-ae975aac54bdb26331c5539a85987ca7f5c0f0e8.tar.bz2
portage-idfetch-ae975aac54bdb26331c5539a85987ca7f5c0f0e8.zip
_emerge.Package.iuse.is_valid_flags should return a list of flags missing from IUSE
-rw-r--r--pym/_emerge/Package.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pym/_emerge/Package.py b/pym/_emerge/Package.py
index 93b86f10..0eba4b65 100644
--- a/pym/_emerge/Package.py
+++ b/pym/_emerge/Package.py
@@ -214,11 +214,12 @@ class Package(Task):
"""
if isinstance(flags, basestring):
flags = [flags]
+ missing_iuse = []
for flag in flags:
if not flag in self.all and \
self._iuse_implicit_regex.match(flag) is None:
- return False
- return True
+ missing_iuse.append(flag)
+ return missing_iuse
def _get_hash_key(self):
hash_key = getattr(self, "_hash_key", None)