Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 523048
Collapse All | Expand All

(-)a/pym/_emerge/depgraph.py (-4 / +7 lines)
Lines 421-426 class _dynamic_depgraph_config(object): Link Here
421
		self._buildpkgonly_deps_unsatisfied = False
421
		self._buildpkgonly_deps_unsatisfied = False
422
		self._autounmask = depgraph._frozen_config.myopts.get('--autounmask') != 'n'
422
		self._autounmask = depgraph._frozen_config.myopts.get('--autounmask') != 'n'
423
		self._success_without_autounmask = False
423
		self._success_without_autounmask = False
424
		self._required_use_unsatisfied = False
424
		self._traverse_ignored_deps = False
425
		self._traverse_ignored_deps = False
425
		self._complete_mode = False
426
		self._complete_mode = False
426
		self._slot_operator_deps = {}
427
		self._slot_operator_deps = {}
Lines 2461-2466 class depgraph(object): Link Here
2461
				self._dynamic_config._unsatisfied_deps_for_display.append(
2462
				self._dynamic_config._unsatisfied_deps_for_display.append(
2462
					((pkg.root, atom),
2463
					((pkg.root, atom),
2463
					{"myparent" : dep.parent, "show_req_use" : pkg}))
2464
					{"myparent" : dep.parent, "show_req_use" : pkg}))
2465
				self._dynamic_config._required_use_unsatisfied = True
2464
				self._dynamic_config._skip_restart = True
2466
				self._dynamic_config._skip_restart = True
2465
				return 0
2467
				return 0
2466
2468
Lines 8390-8397 class depgraph(object): Link Here
8390
		return self._dynamic_config._need_restart and \
8392
		return self._dynamic_config._need_restart and \
8391
			not self._dynamic_config._skip_restart
8393
			not self._dynamic_config._skip_restart
8392
8394
8393
	def success_without_autounmask(self):
8395
	def need_config_change(self):
8394
		return self._dynamic_config._success_without_autounmask
8396
		return self._dynamic_config._success_without_autounmask or \
8397
			self._dynamic_config._required_use_unsatisfied
8395
8398
8396
	def autounmask_breakage_detected(self):
8399
	def autounmask_breakage_detected(self):
8397
		try:
8400
		try:
Lines 8665-8671 def _backtrack_depgraph(settings, trees, myopts, myparams, myaction, myfiles, sp Link Here
8665
			backtrack_parameters=backtrack_parameters)
8668
			backtrack_parameters=backtrack_parameters)
8666
		success, favorites = mydepgraph.select_files(myfiles)
8669
		success, favorites = mydepgraph.select_files(myfiles)
8667
8670
8668
		if success or mydepgraph.success_without_autounmask():
8671
		if success or mydepgraph.need_config_change():
8669
			break
8672
			break
8670
		elif not allow_backtracking:
8673
		elif not allow_backtracking:
8671
			break
8674
			break
Lines 8677-8683 def _backtrack_depgraph(settings, trees, myopts, myparams, myaction, myfiles, sp Link Here
8677
		else:
8680
		else:
8678
			break
8681
			break
8679
8682
8680
	if not (success or mydepgraph.success_without_autounmask()) and backtracked:
8683
	if not (success or mydepgraph.need_config_change()) and backtracked:
8681
8684
8682
		if debug:
8685
		if debug:
8683
			writemsg_level(
8686
			writemsg_level(
(-)a/pym/portage/tests/resolver/ResolverPlayground.py (-3 / +14 lines)
Lines 674-680 class ResolverPlaygroundTestCase(object): Link Here
674
						expected = x
674
						expected = x
675
						break
675
						break
676
			elif key in ("unstable_keywords", "needed_p_mask_changes",
676
			elif key in ("unstable_keywords", "needed_p_mask_changes",
677
				"unsatisfied_deps") and expected is not None:
677
				"unsatisfied_deps", "required_use_unsatisfied") and \
678
				expected is not None:
678
				expected = set(expected)
679
				expected = set(expected)
679
680
680
			elif key == "forced_rebuilds" and expected is not None:
681
			elif key == "forced_rebuilds" and expected is not None:
Lines 693-702 class ResolverPlaygroundResult(object): Link Here
693
694
694
	checks = (
695
	checks = (
695
		"success", "mergelist", "use_changes", "license_changes", "unstable_keywords", "slot_collision_solutions",
696
		"success", "mergelist", "use_changes", "license_changes", "unstable_keywords", "slot_collision_solutions",
696
		"circular_dependency_solutions", "needed_p_mask_changes", "unsatisfied_deps", "forced_rebuilds"
697
		"circular_dependency_solutions", "needed_p_mask_changes", "unsatisfied_deps", "forced_rebuilds",
698
		"required_use_unsatisfied"
697
		)
699
		)
698
	optional_checks = (
700
	optional_checks = (
699
		"forced_rebuilds",
701
		"forced_rebuilds",
702
		"required_use_unsatisfied",
700
		"unsatisfied_deps"
703
		"unsatisfied_deps"
701
		)
704
		)
702
705
Lines 714-719 class ResolverPlaygroundResult(object): Link Here
714
		self.circular_dependency_solutions = None
717
		self.circular_dependency_solutions = None
715
		self.unsatisfied_deps = frozenset()
718
		self.unsatisfied_deps = frozenset()
716
		self.forced_rebuilds = None
719
		self.forced_rebuilds = None
720
		self.required_use_unsatisfied = None
717
721
718
		if self.depgraph._dynamic_config._serialized_tasks_cache is not None:
722
		if self.depgraph._dynamic_config._serialized_tasks_cache is not None:
719
			self.mergelist = []
723
			self.mergelist = []
Lines 780-785 class ResolverPlaygroundResult(object): Link Here
780
		if self.depgraph._forced_rebuilds:
784
		if self.depgraph._forced_rebuilds:
781
			self.forced_rebuilds = dict(self._iter_forced_rebuilds())
785
			self.forced_rebuilds = dict(self._iter_forced_rebuilds())
782
786
787
		required_use_unsatisfied = []
788
		for pargs, kwargs in \
789
			self.depgraph._dynamic_config._unsatisfied_deps_for_display:
790
			if "show_req_use" in kwargs:
791
				required_use_unsatisfied.append(pargs[1])
792
		if required_use_unsatisfied:
793
			self.required_use_unsatisfied = set(required_use_unsatisfied)
794
783
	def _iter_forced_rebuilds(self):
795
	def _iter_forced_rebuilds(self):
784
		for child_dict in self.depgraph._forced_rebuilds.values():
796
		for child_dict in self.depgraph._forced_rebuilds.values():
785
			for child, parents in child_dict.items():
797
			for child, parents in child_dict.items():
786
- 

Return to bug 523048