diff options
author | Necoro <> | 2008-01-24 23:49:51 +0000 |
---|---|---|
committer | Necoro <> | 2008-01-24 23:49:51 +0000 |
commit | 4d4d5a6fd0348ecc628251dbca5ac9e22acfb555 (patch) | |
tree | 4b9e0de2dc57b8f4794812349c04466c5877c946 /portato/backend/flags.py | |
parent | bf75aae3c9f6ac2130b65a0499e501ee697688b1 (diff) | |
download | portato-4d4d5a6fd0348ecc628251dbca5ac9e22acfb555.tar.gz portato-4d4d5a6fd0348ecc628251dbca5ac9e22acfb555.tar.bz2 portato-4d4d5a6fd0348ecc628251dbca5ac9e22acfb555.zip |
r716@Devoty: necoro | 2008-01-25 00:35:00 +0100
Improved useflag handling
r717@Devoty: necoro | 2008-01-25 00:47:45 +0100
improved update_world
Diffstat (limited to '')
-rw-r--r-- | portato/backend/flags.py | 17 |
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. |