def _getDb(self, path): preUmask = os.umask(0) rootInfoDb = BdbWrapper(path) if not rootInfoDb.open(): return None os.umask(preUmask) return rootInfoDb
def getActivePkgFiles(self, pkg): if not self.isActivePackage(pkg): return None pkgFileDbPath = self._ainstRoot.getPkgFileDbPath() wrapper = BdbWrapper(pkgFileDbPath) if not wrapper.open(): return None files = wrapper.get(pkg.name) if files is None: return None fileList = files.split(self._ainstRoot.getFileSpliter()) wrapper.close() return fileList
def _getPkgFileDb(self): pkgFileDbPath = self._ainstRoot.getPkgFileDbPath() return BdbWrapper(pkgFileDbPath)
def _getFilePkgDb(self): filePkgDbPath = self._ainstRoot.getFilePkgDbPath() return BdbWrapper(filePkgDbPath)