Lines 47-58
Link Here
|
47 |
from _emerge.UnmergeDepPriority import UnmergeDepPriority |
47 |
from _emerge.UnmergeDepPriority import UnmergeDepPriority |
48 |
from _emerge.visible import visible |
48 |
from _emerge.visible import visible |
49 |
|
49 |
|
50 |
import portage.proxy.lazyimport |
|
|
51 |
import portage.proxy as proxy |
52 |
proxy.lazyimport.lazyimport(globals(), |
53 |
'_emerge.Scheduler:Scheduler', |
54 |
) |
55 |
#from _emerge.Scheduler import Scheduler |
56 |
class depgraph(object): |
50 |
class depgraph(object): |
57 |
|
51 |
|
58 |
pkg_tree_map = RootConfig.pkg_tree_map |
52 |
pkg_tree_map = RootConfig.pkg_tree_map |
Lines 69-75
Link Here
|
69 |
self.edebug = 1 |
63 |
self.edebug = 1 |
70 |
self.spinner = spinner |
64 |
self.spinner = spinner |
71 |
self._running_root = trees["/"]["root_config"] |
65 |
self._running_root = trees["/"]["root_config"] |
72 |
self._opts_no_restart = Scheduler._opts_no_restart |
66 |
self._opts_no_restart = frozenset(["--buildpkgonly", |
|
|
67 |
"--fetchonly", "--fetch-all-uri", "--pretend"]) |
73 |
self.pkgsettings = {} |
68 |
self.pkgsettings = {} |
74 |
# Maps slot atom to package for each Package added to the graph. |
69 |
# Maps slot atom to package for each Package added to the graph. |
75 |
self._slot_pkg_map = {} |
70 |
self._slot_pkg_map = {} |
Lines 2235-2241
Link Here
|
2235 |
self._pkg_cache[pkg] = pkg |
2230 |
self._pkg_cache[pkg] = pkg |
2236 |
return pkg |
2231 |
return pkg |
2237 |
|
2232 |
|
2238 |
def validate_blockers(self): |
2233 |
def _validate_blockers(self): |
2239 |
"""Remove any blockers from the digraph that do not match any of the |
2234 |
"""Remove any blockers from the digraph that do not match any of the |
2240 |
packages within the graph. If necessary, create hard deps to ensure |
2235 |
packages within the graph. If necessary, create hard deps to ensure |
2241 |
correct merge order such that mutually blocking packages are never |
2236 |
correct merge order such that mutually blocking packages are never |
Lines 2625-2631
Link Here
|
2625 |
if not self._complete_graph(): |
2620 |
if not self._complete_graph(): |
2626 |
raise self._unknown_internal_error() |
2621 |
raise self._unknown_internal_error() |
2627 |
|
2622 |
|
2628 |
if not self.validate_blockers(): |
2623 |
if not self._validate_blockers(): |
2629 |
raise self._unknown_internal_error() |
2624 |
raise self._unknown_internal_error() |
2630 |
|
2625 |
|
2631 |
if self._slot_collision_info: |
2626 |
if self._slot_collision_info: |
Lines 3772-3778
Link Here
|
3772 |
if "--changelog" in self.myopts: |
3767 |
if "--changelog" in self.myopts: |
3773 |
inst_matches = vardb.match(pkg.slot_atom) |
3768 |
inst_matches = vardb.match(pkg.slot_atom) |
3774 |
if inst_matches: |
3769 |
if inst_matches: |
3775 |
changelogs.extend(self.calc_changelog( |
3770 |
changelogs.extend(self._calc_changelog( |
3776 |
portdb.findname(pkg_key), |
3771 |
portdb.findname(pkg_key), |
3777 |
inst_matches[0], pkg_key)) |
3772 |
inst_matches[0], pkg_key)) |
3778 |
else: |
3773 |
else: |
Lines 4267-4273
Link Here
|
4267 |
show_mask_docs() |
4262 |
show_mask_docs() |
4268 |
print |
4263 |
print |
4269 |
|
4264 |
|
4270 |
def calc_changelog(self,ebuildpath,current,next): |
4265 |
def _calc_changelog(self,ebuildpath,current,next): |
4271 |
if ebuildpath == None or not os.path.exists(ebuildpath): |
4266 |
if ebuildpath == None or not os.path.exists(ebuildpath): |
4272 |
return [] |
4267 |
return [] |
4273 |
current = '-'.join(portage.catpkgsplit(current)[1:]) |
4268 |
current = '-'.join(portage.catpkgsplit(current)[1:]) |
Lines 4301-4307
Link Here
|
4301 |
return [] |
4296 |
return [] |
4302 |
return divisions |
4297 |
return divisions |
4303 |
|
4298 |
|
4304 |
def find_changelog_tags(self,changelog): |
4299 |
def _find_changelog_tags(self,changelog): |
4305 |
divs = [] |
4300 |
divs = [] |
4306 |
release = None |
4301 |
release = None |
4307 |
while 1: |
4302 |
while 1: |
Lines 4376-4382
Link Here
|
4376 |
if world_locked: |
4371 |
if world_locked: |
4377 |
world_set.unlock() |
4372 |
world_set.unlock() |
4378 |
|
4373 |
|
4379 |
def loadResumeCommand(self, resume_data, skip_masked=True, |
4374 |
def _loadResumeCommand(self, resume_data, skip_masked=True, |
4380 |
skip_missing=True): |
4375 |
skip_missing=True): |
4381 |
""" |
4376 |
""" |
4382 |
Add a resume command to the graph and validate it in the process. This |
4377 |
Add a resume command to the graph and validate it in the process. This |
Lines 4802-4808
Link Here
|
4802 |
mydepgraph = depgraph(settings, trees, |
4797 |
mydepgraph = depgraph(settings, trees, |
4803 |
myopts, myparams, spinner) |
4798 |
myopts, myparams, spinner) |
4804 |
try: |
4799 |
try: |
4805 |
success = mydepgraph.loadResumeCommand(mtimedb["resume"], |
4800 |
success = mydepgraph._loadResumeCommand(mtimedb["resume"], |
4806 |
skip_masked=skip_masked) |
4801 |
skip_masked=skip_masked) |
4807 |
except depgraph.UnsatisfiedResumeDep, e: |
4802 |
except depgraph.UnsatisfiedResumeDep, e: |
4808 |
if not skip_unsatisfied: |
4803 |
if not skip_unsatisfied: |