Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 631894 - sys-apps/portage: depgraph _minimize_children method randomly chooses packages to eliminate
Summary: sys-apps/portage: depgraph _minimize_children method randomly chooses package...
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Portage team
Keywords: InVCS
Depends on:
Blocks: 155723 631448
  Show dependency tree
Reported: 2017-09-24 07:55 UTC by Zac Medico
Modified: 2018-02-01 23:54 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Zac Medico gentoo-dev 2017-09-24 07:55:50 UTC
Daniel Robbins isolated the problem in the area of code:

> 	for pkg in pkgs:
> 		eliminate_pkg = True
> 		for atom in atom_pkg_graph.parent_nodes(pkg):
> 			if len(atom_pkg_graph.child_nodes(atom)) < 2:
> 				eliminate_pkg = False
> 				break
> 		if eliminate_pkg:
> 			atom_pkg_graph.remove(pkg)

The problem is that the order of iteration of the pkgs set is random. This causes packages to be removed from atom_pkg_graph in random order, and their removal affects the atom_pkg_graph.child_nodes(atom) results for packages processed in later iterations of the loop, leading to a random outcome.
Comment 3 Zac Medico gentoo-dev 2017-10-02 19:37:14 UTC
Released in 2.3.11.