summaryrefslogtreecommitdiff
path: root/portato
diff options
context:
space:
mode:
Diffstat (limited to 'portato')
-rw-r--r--portato/backend/package.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/portato/backend/package.py b/portato/backend/package.py
index d4eff19..056d54c 100644
--- a/portato/backend/package.py
+++ b/portato/backend/package.py
@@ -218,6 +218,28 @@ class Package:
flags.remove_new_use_flags(self)
+ def is_use_flag_enabled (self, flag):
+ """Looks whether a given useflag is enabled for the package, taking all options
+ (ie. even the new flags) into account.
+
+ @param flag: the flag to check
+ @type flag: string
+ @returns: True or False
+ @rtype: bool"""
+
+ if self.is_installed() and flag in self.get_actual_use_flags(): # flags set during install
+ return True
+
+ elif (not self.is_installed()) and flag in self.get_settings("USE").split() \
+ and not flags.invert_use_flag(flag) in pkg.get_new_use_flags(): # flags that would be set
+ return True
+
+ elif flag in self.get_new_use_flags():
+ return True
+
+ else:
+ return False
+
def get_matched_dep_packages (self, depvar):
"""This function looks for all dependencies which are resolved. In normal case it makes only sense for installed packages, but should work for uninstalled ones too.
lass='deletions'>-40/+75 The .gpg-id file may now have multiple keys in it, one per line. If a .gpg-id file exists inside a subdirectory, passwords inside that directory are encrypted to that/those ids. The init command has learned a -p/--path option for writing such a sub directory .gpg-id and now can take several arguments for ids. 2014-03-18Shred shm files.Jason A. Donenfeld3-1/+4 2014-03-18Do not compress passwords.Jason A. Donenfeld1-1/+1 According to a forthcoming paper by Alfredo Pironti, OpenPGP compression can reveal entropy levels. We thus disable compression. Existing password stores can be reencrypted without compression using the "--reencrypt" flag for "init". Reported-by: Alfredo Pironti <alfredo.pironti@inria.fr> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> 2013-09-14Use a glob in the pattern match instead of using two comparisons for [yY].Chris Down1-1/+1 2013-09-14Rephrase awkward/confusing message about enabling echo during password entry.Chris Down1-3/+3 2013-09-14Fix directory traversal for reencryption when $PREFIX is a symlinkBrian Shore1-1/+1 2013-08-26Makefile: Do not install bash completion to /etcLukas Fleischer1-3/+2 `make install` should never install anything to /etc. "/usr/share/bash-completion/completions/" is the right place for completions that are installed by software packages. Signed-off-by: Lukas Fleischer <info@cryptocrack.de> 2013-05-22check if a passfile exists before checking for directoryBrian Mattern1-13/+12