Skip to content

Commit

Permalink
On copy, depsolving was running twice. Taught it to Not Do That.
Browse files Browse the repository at this point in the history
backports #9287.
[nocoverage]

fixes #9298

(cherry picked from commit eb161f2)
  • Loading branch information
dralley committed Aug 31, 2021
1 parent 8ad2c45 commit 1c10d0d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
2 changes: 2 additions & 0 deletions CHANGES/9298.bugfix
@@ -0,0 +1,2 @@
Taught copy/ API to only do depsolving once when asked for.
(backported from #9287)
15 changes: 2 additions & 13 deletions pulp_rpm/app/depsolving.py
Expand Up @@ -785,19 +785,8 @@ def run_solver_jobs(jobs):
Take a list of jobs, get a solution, return the set of solvables that needed to
be installed.
"""
previous_problems = set()
attempt = 1

while True:
solver = self._pool.Solver()
raw_problems = solver.solve(jobs)
problems = set(str(problem) for problem in raw_problems)
if not problems or previous_problems == problems:
break
# self._handle_problems(raw_problems, jobs) TODO
previous_problems = problems
attempt += 1

solver = self._pool.Solver()
raw_problems = solver.solve(jobs)
# The solver is simply ignoring the problems encountered and proceeds associating
# any new solvables/units. This might be reported back to the user one day over
# the REST API. For now, log only "real" dependency issues (typically some variant
Expand Down

0 comments on commit 1c10d0d

Please sign in to comment.