diff options
author | Zac Medico <zmedico@gentoo.org> | 2024-01-07 22:04:37 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2024-01-08 00:08:51 -0800 |
commit | 4b885b9ca063c990b1e218c73a786e9d434717e8 (patch) | |
tree | 2387c941bd2fbe876c7a3d4d17dc284889f68655 /lib/_emerge/depgraph.py | |
parent | lib/_emerge: codespell fixes (diff) | |
download | gentoo-portage-4b885b9ca063c990b1e218c73a786e9d434717e8.tar.xz gentoo-portage-4b885b9ca063c990b1e218c73a786e9d434717e8.zip |
_calc_depclean: add dep_check action
Add a dep_check action which can be used to check the
dependencies of all installed packages. The plan is for depgraph
to use this action to check for broken dependencies prior to the
merge order calculation. The new frozen_config parameter will
allow depgraph to pass a shared frozen config to _calc_depclean.
The result of the dep_check action becomes stale as soon as there
is any change to the installed packages. So, in order to account
for dependencies that may become broken or satisfied during the
process of updating installed packages, the merge order
calculation will need to refresh the dep_check calculation for
every merge order choice that it makes. This refresh will need
to be optimized to identify the portion of the graph that would
become stale due to a given change, so that it can avoid
unnecessary repetition of work.
Bug: https://bugs.gentoo.org/921333
Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'lib/_emerge/depgraph.py')
-rw-r--r-- | lib/_emerge/depgraph.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py index a2865cad230d..b859e68224ae 100644 --- a/lib/_emerge/depgraph.py +++ b/lib/_emerge/depgraph.py @@ -11723,6 +11723,7 @@ def backtrack_depgraph( myaction: Optional[str], myfiles: list[str], spinner: "_emerge.stdout_spinner.stdout_spinner", + frozen_config: Optional[_frozen_depgraph_config] = None, ) -> tuple[Any, depgraph, list[str]]: """ @@ -11747,6 +11748,7 @@ def _backtrack_depgraph( myaction: Optional[str], myfiles: list[str], spinner: "_emerge.stdout_spinner.stdout_spinner", + frozen_config: Optional[_frozen_depgraph_config] = None, ) -> tuple[Any, depgraph, list[str], int, int]: debug = "--debug" in myopts mydepgraph = None @@ -11756,7 +11758,10 @@ def _backtrack_depgraph( backtracker = Backtracker(max_depth) backtracked = 0 - frozen_config = _frozen_depgraph_config(settings, trees, myopts, myparams, spinner) + if frozen_config is None: + frozen_config = _frozen_depgraph_config( + settings, trees, myopts, myparams, spinner + ) while backtracker: if debug and mydepgraph is not None: |