summaryrefslogtreecommitdiff
path: root/portato/backend/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'portato/backend/package.py')
-rw-r--r--portato/backend/package.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/portato/backend/package.py b/portato/backend/package.py
index fc0bd02..225c06a 100644
--- a/portato/backend/package.py
+++ b/portato/backend/package.py
@@ -38,6 +38,10 @@ class Package:
self._settings = settings
self._settingslock = settingslock
+
+ self.forced_flags = set()
+ self.forced_flags.update(self._settings.usemask)
+ self.forced_flags.update(self._settings.useforce)
try:
self._status = portage.getmaskingstatus(self.get_cpv(), settings = self._settings)
@@ -151,7 +155,7 @@ class Package:
else:
tree = porttree
- return unique_array(self.get_env_var("IUSE", tree = tree).split())
+ return list(set(self.get_env_var("IUSE", tree = tree).split()).difference(self.forced_flags))
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.
@@ -160,13 +164,10 @@ class Package:
@rtype: string[]"""
if self.is_installed():
- uses = self.get_use_flags().split() # all set at installation time
- iuses = self.get_all_use_flags() # all you can set for the package
- set = []
- for u in iuses:
- if u in uses:
- set.append(u)
- return set
+ uses = set(self.get_use_flags().split()) # all set at installation time
+ iuses = set(self.get_all_use_flags(installed=True)) # all you can set for the package
+
+ return list(uses.intersection(iuses))
else:
return []
/+172 2008-06-30Added stuff to plugin.pyRené 'Necoro' Neumann1-2/+24 2008-06-25Now load 22 versions when running the correct portageRené 'Necoro' Neumann4-8/+18 2008-06-25Added Package_22 and System_22René 'Necoro' Neumann4-5/+63