summaryrefslogtreecommitdiff
path: root/portato/backend/portage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--portato/backend/portage/package.py33
-rw-r--r--portato/backend/portage/system.py2
2 files changed, 24 insertions, 11 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):
diff --git a/portato/backend/portage/system.py b/portato/backend/portage/system.py
index 9cda5ab..3e0c539 100644
--- a/portato/backend/portage/system.py
+++ b/portato/backend/portage/system.py
@@ -207,7 +207,7 @@ class PortageSystem (SystemInterface):
t2 = unique_array(t2)
return self.geneticize_list(t2)
else:
- return t;
+ return t
def find_all_world_packages (self, name = None):
world = filter(self.find_lambda(name), [x.get_cpv() for x in self.find_world_packages()[0]])
cons/vol-mute.xbm?id=d99cee2efeafc32581147424e31cfdce9531dc9d&follow=1'>[i3] Replace icons by font awesomeRené 'Necoro' Neumann24-149/+13 2018-06-10[i3] Remove obsolete pidgin stuffRené 'Necoro' Neumann2-36/+0 2018-06-10[zsh] Remove obsolete isabelle functionsRené 'Necoro' Neumann2-112/+0 2018-06-10Misc changesRené 'Necoro' Neumann3-0/+7 2018-06-10[git] Update email addressRené 'Necoro' Neumann1-1/+1 2018-06-10Enhance cci scriptRené 'Necoro' Neumann1-15/+12 2017-11-18Some windows setupRené 'Necoro' Neumann2-1/+6 2017-10-08[zsh] Use zcalc instead of bcRené 'Necoro' Neumann1-5/+4 2017-10-08[zsh] CalculatorRené 'Necoro' Neumann1-0/+8 2017-10-08Some vim changes.René 'Necoro' Neumann4-28/+17 2017-10-08Delete old stuff.René 'Necoro' Neumann5-71/+1