summaryrefslogtreecommitdiff
path: root/portato/backend/flags.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--portato/backend/flags.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/portato/backend/flags.py b/portato/backend/flags.py
index b9fcae2..61d27aa 100644
--- a/portato/backend/flags.py
+++ b/portato/backend/flags.py
@@ -213,6 +213,23 @@ def sort_use_flag_list (flaglist):
flaglist.sort(key = flag_key)
return flaglist
+def filter_defaults (flaglist):
+ """
+ Removes "+" and "-" from IUSE defaults.
+
+ @param flaglist: the list of useflags
+ @type flaglist: string<iterator>
+
+ @returns: the "cleaned" list
+ @rtype: string<iterator>
+ """
+
+ for flag in flaglist:
+ if flag.startswith(("+","-")):
+ yield flag[1:]
+ else:
+ yield flag
+
def set_use_flag (pkg, flag):
"""Sets the useflag for a given package.