diff options
author | necoro <> | 2007-04-04 17:35:05 +0000 |
---|---|---|
committer | necoro <> | 2007-04-04 17:35:05 +0000 |
commit | a54998f99c9bc5830eba7de9a76fac10f99721f0 (patch) | |
tree | 1b6478c0b32368c3a78e3f0eaf556dc576af067b /portato/backend/portage/package.py | |
parent | 4896a255f7064cd669edb9b42dce32a57541ea62 (diff) | |
download | portato-a54998f99c9bc5830eba7de9a76fac10f99721f0.tar.gz portato-a54998f99c9bc5830eba7de9a76fac10f99721f0.tar.bz2 portato-a54998f99c9bc5830eba7de9a76fac10f99721f0.zip |
showed masked packages unmasked by the user similar to stable marked testing packages
Diffstat (limited to 'portato/backend/portage/package.py')
-rw-r--r-- | portato/backend/portage/package.py | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/portato/backend/portage/package.py b/portato/backend/portage/package.py index ed90db0..b455530 100644 --- a/portato/backend/portage/package.py +++ b/portato/backend/portage/package.py @@ -74,16 +74,29 @@ class PortagePackage (Package): else: return status - def is_masked (self): - status = flags.new_masking_status(self.get_cpv()) - if status != None: # we have locally changed it - if status == "masked": return True - elif status == "unmasked": return False - else: - debug("BUG in flags.new_masking_status. It returns",status) - else: # we have not touched the status - if self._status and ("profile" in self._status or "package.mask" in self._status): - return True + def is_masked (self, use_changed = True): + + if use_changed: + status = flags.new_masking_status(self.get_cpv()) + if status != None: # we have locally changed it + if status == "masked": return True + elif status == "unmasked": return False + else: + debug("BUG in flags.new_masking_status. It returns",status) + 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): + return True + return False def get_all_use_flags (self, installed = False): |