diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-04-10 03:37:11 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-04-10 03:37:11 +0000 |
commit | 01fd3354ea2c9a1e49a02fef3f17ec7be59aafba (patch) | |
tree | 113d105a3bfc321df9222c3c2d620862c1355ed1 /pym/portage_manifest.py | |
parent | 0113950c012bb59bda47aa0530a7da3dcc0c1c7d (diff) | |
download | portage-01fd3354ea2c9a1e49a02fef3f17ec7be59aafba.tar.gz portage-01fd3354ea2c9a1e49a02fef3f17ec7be59aafba.tar.bz2 portage-01fd3354ea2c9a1e49a02fef3f17ec7be59aafba.zip |
Remove db and mysettings from Manifest and replace them with a mapping object that provides access to fetch lists for each cpv.
svn path=/main/trunk/; revision=3111
Diffstat (limited to 'pym/portage_manifest.py')
-rw-r--r-- | pym/portage_manifest.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/pym/portage_manifest.py b/pym/portage_manifest.py index fff9983aa..df9c3d4a4 100644 --- a/pym/portage_manifest.py +++ b/pym/portage_manifest.py @@ -26,8 +26,8 @@ def manifest2MiscfileFilter(filename): return not (filename in ["CVS", ".svn", "files", "Manifest"] or filename.endswith(".ebuild")) class Manifest(object): - def __init__(self, pkgdir, db, mysettings, distdir, manifest1_compat=True, from_scratch=False): - """ create new Manifest instance for package in pkgdir, using db and mysettings for metadata lookups, + def __init__(self, pkgdir, fetchlist_dict, distdir, manifest1_compat=True, from_scratch=False): + """ create new Manifest instance for package in pkgdir and add compability entries for old portage versions if manifest1_compat == True. Do not parse Manifest file if from_scratch == True (only for internal use) """ self.pkgdir = pkgdir.rstrip(os.sep) + os.sep @@ -42,8 +42,7 @@ class Manifest(object): if not from_scratch: self._read() self.compat = manifest1_compat - self.db = db - self.mysettings = mysettings + self.fetchlist_dict = fetchlist_dict self.distdir = distdir def guessType(self, filename): @@ -286,7 +285,7 @@ class Manifest(object): distfilehashes = self.fhashdict["DIST"] else: distfilehashes = {} - self.__init__(self.pkgdir, self.db, self.mysettings, self.distdir, from_scratch=True) + self.__init__(self.pkgdir, self.fetchlist_dict, self.distdir, from_scratch=True) for pkgdir, pkgdir_dirs, pkgdir_files in os.walk(self.pkgdir): break for f in pkgdir_files: @@ -364,7 +363,7 @@ class Manifest(object): def _getCpvDistfiles(self, cpv): """ Get a list of all DIST files associated to the given cpv """ - return self.db.getfetchlist(cpv, mysettings=self.mysettings, all=True)[1] + return self.fetchlist_dict[cpv] def updateFileHashes(self, ftype, fname, checkExisting=True, ignoreMissing=True, reuseExisting=False): """ Regenerate hashes for the given file """ |