Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Side by Side Diff: pym/_emerge/Scheduler.py

Issue 6813084: Remove unnecessary sync in Scheduler.py. (Closed) Base URL: git://git.overlays.gentoo.org/proj/portage.git@master
Patch Set: Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 1999-2011 Gentoo Foundation 1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2 2 # Distributed under the terms of the GNU General Public License v2
3 3
4 from __future__ import print_function 4 from __future__ import print_function
5 5
6 import gc 6 import gc
7 import gzip 7 import gzip
8 import logging 8 import logging
9 import shutil 9 import shutil
10 import signal 10 import signal
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 """ 316 """
317 Initialization structures used for dependency calculations 317 Initialization structures used for dependency calculations
318 involving currently installed packages. 318 involving currently installed packages.
319 """ 319 """
320 self._set_graph_config(graph_config) 320 self._set_graph_config(graph_config)
321 self._blocker_db = {} 321 self._blocker_db = {}
322 for root in self.trees: 322 for root in self.trees:
323 if graph_config is None: 323 if graph_config is None:
324 fake_vartree = FakeVartree(self.trees[root]["roo t_config"], 324 fake_vartree = FakeVartree(self.trees[root]["roo t_config"],
325 pkg_cache=self._pkg_cache) 325 pkg_cache=self._pkg_cache)
326 fake_vartree.sync()
326 else: 327 else:
327 fake_vartree = graph_config.trees[root]['vartree '] 328 fake_vartree = graph_config.trees[root]['vartree ']
328 fake_vartree.sync()
329 self._blocker_db[root] = BlockerDB(fake_vartree) 329 self._blocker_db[root] = BlockerDB(fake_vartree)
330 330
331 def _destroy_graph(self): 331 def _destroy_graph(self):
332 """ 332 """
333 Use this to free memory at the beginning of _calc_resume_list(). 333 Use this to free memory at the beginning of _calc_resume_list().
334 After _calc_resume_list(), the _init_graph() method 334 After _calc_resume_list(), the _init_graph() method
335 must to be called in order to re-generate the structures that 335 must to be called in order to re-generate the structures that
336 this method destroys. 336 this method destroys.
337 """ 337 """
338 self._blocker_db = None 338 self._blocker_db = None
(...skipping 1750 matching lines...) Expand 10 before | Expand all | Expand 10 after
2089 tree_type = depgraph.pkg_tree_map[type_name] 2089 tree_type = depgraph.pkg_tree_map[type_name]
2090 db = root_config.trees[tree_type].dbapi 2090 db = root_config.trees[tree_type].dbapi
2091 db_keys = list(self.trees[root_config.root][ 2091 db_keys = list(self.trees[root_config.root][
2092 tree_type].dbapi._aux_cache_keys) 2092 tree_type].dbapi._aux_cache_keys)
2093 metadata = zip(db_keys, db.aux_get(cpv, db_keys, myrepo=myrepo)) 2093 metadata = zip(db_keys, db.aux_get(cpv, db_keys, myrepo=myrepo))
2094 pkg = Package(built=(type_name != "ebuild"), 2094 pkg = Package(built=(type_name != "ebuild"),
2095 cpv=cpv, installed=installed, metadata=metadata, 2095 cpv=cpv, installed=installed, metadata=metadata,
2096 root_config=root_config, type_name=type_name) 2096 root_config=root_config, type_name=type_name)
2097 self._pkg_cache[pkg] = pkg 2097 self._pkg_cache[pkg] = pkg
2098 return pkg 2098 return pkg
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698