Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 632598

Summary: sys-apps/portage: --autounmask USE changes can trigger unnecessary backtracking
Product: Portage Development Reporter: Zac Medico <zmedico>
Component: Core - DependenciesAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal CC: esigra
Priority: Normal Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=628004
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 376695, 631448    

Description Zac Medico gentoo-dev 2017-10-01 00:49:48 UTC
The want_restart_for_use_change function it overly eager to trigger backtracking in some cases where there are USE dependencies in the graph. The problem is right here, where want_restart_for_use_change returns True for any overlapping USE dependencies, even though those USE dependencies may be satisfied with the changes:

new_use, changes = self._dynamic_config._needed_use_config_changes.get(pkg)
for ppkg, atom in parent_atoms:
	if not atom.use or \
		not any(x in atom.use.required for x in changes):
		continue
	else:
		return True

I discovered this issue while working on GLEP 73 support (bug 628004), since autounmask USE changes make trigger REQUIRED_USE changes, and we want to avoid backtracking here whenever possible.
Comment 3 Zac Medico gentoo-dev 2017-10-02 19:37:24 UTC
Released in 2.3.11.