summaryrefslogtreecommitdiff
path: root/portato/backend/portage/package.py
diff options
context:
space:
mode:
authornecoro <>2007-04-13 16:27:56 +0000
committernecoro <>2007-04-13 16:27:56 +0000
commit19f9e0b5234693cf7e27a24c94f2136cd90be8c7 (patch)
tree990cc025c0485483c7e0158d8b166bc1b568de1f /portato/backend/portage/package.py
parent2d76b0ba7f6d0040c42e53df87f1ffbcbbe2cba1 (diff)
downloadportato-19f9e0b5234693cf7e27a24c94f2136cd90be8c7.tar.gz
portato-19f9e0b5234693cf7e27a24c94f2136cd90be8c7.tar.bz2
portato-19f9e0b5234693cf7e27a24c94f2136cd90be8c7.zip
Improved masking display and made most of the Qt-Frontend work
Diffstat (limited to 'portato/backend/portage/package.py')
-rw-r--r--portato/backend/portage/package.py27
1 files changed, 18 insertions, 9 deletions
diff --git a/portato/backend/portage/package.py b/portato/backend/portage/package.py
index b455530..38e7369 100644
--- a/portato/backend/portage/package.py
+++ b/portato/backend/portage/package.py
@@ -82,20 +82,29 @@ class PortagePackage (Package):
if status == "masked": return True
elif status == "unmasked": return False
else:
- debug("BUG in flags.new_masking_status. It returns",status)
+ debug("BUG in flags.new_masking_status. It returns", status, error = True)
else: # we have not touched the status
if self._status and ("profile" in self._status or "package.mask" in self._status):
return True
return False
- else:
- try:
- masked = self._settings.settings.pmaskdict[self.get_cp()]
- except KeyError: # key error: not masked
- return False
-
- for cpv in masked:
- if self.matches(cpv):
+ else: # we want the original portage value XXX: bug if masked by user AND by system
+
+ # get the normal masked ones
+ if self._status and ("profile" in self._status or "package.mask" in self._status):
+ if not flags.is_locally_masked(self, changes = False): # assume that if it is locally masked, it is not masked by the system
return True
+ else: # more difficult: get the ones we unmasked, but are masked by the system
+ try:
+ masked = self._settings.settings.pmaskdict[self.get_cp()]
+ except KeyError: # key error: not masked
+ return False
+
+ for cpv in masked:
+ if self.matches(cpv):
+ if not flags.is_locally_masked(self, changes = False): # assume that if it is locally masked, it is not masked by the system
+ return True
+ else:
+ return False
return False