From 5fae6fd808c8e0d3df083befc29b7776d6390e85 Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@cd1c1023-2f26-0410-ae45-c471fc1f0318> Date: Mon, 18 Feb 2008 03:16:42 +0000 Subject: [PATCH] - updated TODO - invert masking verification order to allow user to unmask repositories maskings git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@1235 cd1c1023-2f26-0410-ae45-c471fc1f0318 --- TODO | 1 + libraries/databaseTools.py | 38 +++++++++++++++++++------------------- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/TODO b/TODO index a7841bc30..aed89b872 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,5 @@ TODO list: + - add reagent tool to bump database easily - add simulated "equo world" test to reagent (with package keywording enabled) (or run deptest with keywordfilter enabled) - lzma compression for the database? - migrate server code to ServerInterface diff --git a/libraries/databaseTools.py b/libraries/databaseTools.py index 8bd967e33..742924e61 100644 --- a/libraries/databaseTools.py +++ b/libraries/databaseTools.py @@ -3685,6 +3685,25 @@ class etpDatabase: cached = idpackageValidatorCache.get((idpackage,reponame)) if cached != None: return cached + # check if user package.mask needs it masked + for atom in etpConst['packagemasking']['mask']: + matches = self.atomMatch(atom, multiMatch = True, packagesFilter = False) + if matches[1] != 0: + continue + if idpackage in matches[0]: + # sorry, masked + idpackageValidatorCache[(idpackage,reponame)] = -1,1 + return -1,1 + + # see if we can unmask by just lookin into user package.unmask stuff -> etpConst['packagemasking']['unmask'] + for atom in etpConst['packagemasking']['unmask']: + matches = self.atomMatch(atom, multiMatch = True, packagesFilter = False) + if matches[1] != 0: + continue + if idpackage in matches[0]: + idpackageValidatorCache[(idpackage,reponame)] = idpackage,3 + return idpackage,3 + # check if repository packages.db.mask needs it masked repomask = etpConst['packagemasking']['repos_mask'].get(reponame) if repomask != None: @@ -3710,16 +3729,6 @@ class etpDatabase: idpackageValidatorCache[(idpackage,reponame)] = -1,9 return -1,9 - # check if user package.mask needs it masked - for atom in etpConst['packagemasking']['mask']: - matches = self.atomMatch(atom, multiMatch = True, packagesFilter = False) - if matches[1] != 0: - continue - if idpackage in matches[0]: - # sorry, masked - idpackageValidatorCache[(idpackage,reponame)] = -1,1 - return -1,1 - mykeywords = self.retrieveKeywords(idpackage) # XXX WORKAROUND if not mykeywords: mykeywords = [''] # ** is fine then @@ -3732,15 +3741,6 @@ class etpDatabase: #### IT IS MASKED!! - # see if we can unmask by just lookin into package.unmask stuff -> etpConst['packagemasking']['unmask'] - for atom in etpConst['packagemasking']['unmask']: - matches = self.atomMatch(atom, multiMatch = True, packagesFilter = False) - if matches[1] != 0: - continue - if idpackage in matches[0]: - idpackageValidatorCache[(idpackage,reponame)] = idpackage,3 - return idpackage,3 - # if we get here, it means we didn't find mykeywords in etpConst['keywords'], we need to seek etpConst['packagemasking']['keywords'] # seek in repository first if reponame in etpConst['packagemasking']['keywords']['repositories']: