Skip to content

Commit

Permalink
depgraph: Do not trigger rebuilds for some options
Browse files Browse the repository at this point in the history
Do not trigger rebuilds for options which do not merge packages
like --buildpkgonly, --fetchonly, and --fetch-all-uri.

Bug: https://bugs.gentoo.org/927301
Signed-off-by: Zac Medico <zmedico@gentoo.org>
  • Loading branch information
zmedico committed Mar 20, 2024
1 parent b276077 commit 3b2b59d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/_emerge/depgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@
import _emerge.stdout_spinner.stdout_spinner


_NO_MERGE_OPTS = ("--buildpkgonly", "--fetchonly", "--fetch-all-uri")

# Exposes a depgraph interface to dep_check.
_dep_check_graph_interface = collections.namedtuple(
"_dep_check_graph_interface",
Expand Down Expand Up @@ -1942,7 +1944,9 @@ def _process_slot_conflicts(self):
for conflict in self._dynamic_config._package_tracker.slot_conflicts():
self._process_slot_conflict(conflict)

if self._dynamic_config._allow_backtracking:
if self._dynamic_config._allow_backtracking and not any(
opt in self._frozen_config.myopts for opt in _NO_MERGE_OPTS
):
self._slot_operator_trigger_reinstalls()

def _process_slot_conflict(self, conflict):
Expand Down Expand Up @@ -8967,7 +8971,7 @@ def _accept_blocker_conflicts(self):
if self._dynamic_config._allow_backtracking:
return False
acceptable = False
for x in ("--buildpkgonly", "--fetchonly", "--fetch-all-uri", "--nodeps"):
for x in _NO_MERGE_OPTS + ("--nodeps",):
if x in self._frozen_config.myopts:
acceptable = True
break
Expand Down

0 comments on commit 3b2b59d

Please sign in to comment.