summaryrefslogtreecommitdiff
path: root/portato/backend/package.py
diff options
context:
space:
mode:
authorNecoro <>2008-01-24 23:49:51 +0000
committerNecoro <>2008-01-24 23:49:51 +0000
commit4d4d5a6fd0348ecc628251dbca5ac9e22acfb555 (patch)
tree4b9e0de2dc57b8f4794812349c04466c5877c946 /portato/backend/package.py
parentbf75aae3c9f6ac2130b65a0499e501ee697688b1 (diff)
downloadportato-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 'portato/backend/package.py')
-rw-r--r--portato/backend/package.py26
1 files changed, 6 insertions, 20 deletions
diff --git a/portato/backend/package.py b/portato/backend/package.py
index 16cee0e..da44e8a 100644
--- a/portato/backend/package.py
+++ b/portato/backend/package.py
@@ -68,20 +68,6 @@ class Package (_Package):
return flags.is_locally_masked(self)
- def get_installed_use_flags (self):
- """Returns a list of the useflags enabled at installation time. If package is not installed, it returns an empty list.
-
- @returns: list of useflags enabled at installation time or an empty list
- @rtype: string[]"""
-
- if self.is_installed():
- uses = set(self.get_use_flags().split()) # all set at installation time
- iuses = set(self.get_iuse_flags(installed=True)) # all you can set for the package
-
- return list(uses.intersection(iuses))
- else:
- return []
-
def get_new_use_flags (self):
"""Returns a list of the new useflags, i.e. these flags which are not written to the portage-system yet.
@@ -276,13 +262,13 @@ class Package (_Package):
@returns: the reason for masking the package
@rtype: string"""
- def get_iuse_flags (self, installed = False, keep = False):
+ def get_iuse_flags (self, installed = False, removeForced = True):
"""Returns a list of _all_ useflags for this package, i.e. all useflags you can set for this package.
@param installed: do not take the ones stated in the ebuild, but the ones it has been installed with
@type installed: boolean
- @param keep: keep the "+" or "-" signs for forced flags
- @type keep: boolean
+ @param removeForced: remove forced flags (i.e. usemask / useforce) from the iuse flags as they cannot be set from the user
+ @type removeForced: boolean
@returns: list of use-flags
@rtype: string[]"""
@@ -360,11 +346,11 @@ class Package (_Package):
raise NotImplementedError
- def get_use_flags(self):
+ def get_installed_use_flags(self):
"""Returns _all_ (not only the package-specific) useflags which were set at the installation time of the package.
- @returns: string holding all useflags
- @rtype: string"""
+ @returns: list of use flags
+ @rtype: string[]"""
raise NotImplementedError