diff options
author | necoro <> | 2006-10-08 17:26:27 +0000 |
---|---|---|
committer | necoro <> | 2006-10-08 17:26:27 +0000 |
commit | f27145ec49c6f1cdd13db2f3bf389164f10ac828 (patch) | |
tree | 46368b0191a98a7406ea860972f25114955e465f /geneticone/backend/flags.py | |
parent | 1e9ddc03e5667e5a9297508f7bec8b7f3ea46dc9 (diff) | |
download | portato-f27145ec49c6f1cdd13db2f3bf389164f10ac828.tar.gz portato-f27145ec49c6f1cdd13db2f3bf389164f10ac828.tar.bz2 portato-f27145ec49c6f1cdd13db2f3bf389164f10ac828.zip |
Made the testing stuff working too ... I hope ^^ ... removed obsolete-dir
Diffstat (limited to '')
-rw-r--r-- | geneticone/backend/flags.py | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/geneticone/backend/flags.py b/geneticone/backend/flags.py index 1251bfd..2da0a94 100644 --- a/geneticone/backend/flags.py +++ b/geneticone/backend/flags.py @@ -468,6 +468,26 @@ TESTING_PATH_IS_DIR = os.path.isdir(TESTING_PATH) newTesting = {} arch = "" +def remove_new_testing (cpv): + if isinstance(cpv, package.Package): + cpv = cpv.get_cpv() + + try: + del newTesting[cpv] + except KeyError: + pass + +def new_testing_status (cpv): + if isinstance(cpv, package.Package): + cpv = cpv.get_cpv() + + if cpv in newTesting: + for file, line in newTesting[cpv]: + if line == "-1": return False + else: return True + + return None + def set_testing (pkg, enable): """Enables the package for installing when it is marked as testing (~ARCH). @param pkg: the package @@ -484,12 +504,11 @@ def set_testing (pkg, enable): if not cpv in newTesting: newTesting[cpv] = [] - debug("arch: "+arch) for file, line in newTesting[cpv]: if (enable and line != "-1") or (not enable and line == "-1"): newTesting[cpv].remove((file, line)) - if (enable and (pkg.get_mask_status() % 3 == 0)) or (not enable and (pkg.get_mask_status() % 3 != 0)): + if (enable and not pkg.is_testing(allowed=True)) or (not enable and pkg.is_testing(allowed=True)): return if not enable: |