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']: