#1195 Fix compatibility with libsolv-0.7.4.
Closed 5 years ago by jkaluza. Opened 5 years ago by jkaluza.
jkaluza/fm-orchestrator mmd-solver  into  master

@@ -446,7 +446,6 @@ 

          # For each solvable object generated from input module, run the solver.

          # For reasons why there might be multiple solvable objects, please read the

          # `add_modules(...)` inline comments.

-         solver = self.pool.Solver()

          alternatives = collections.OrderedDict()

          for src in solvables:

              # Create the solv Job to represent the solving task.
@@ -526,6 +525,7 @@ 

                  for j in jobs:

                      log.debug("  - %s", j)

                  # Solve the deps and log the dependency issues.

+                 solver = self.pool.Solver()

                  problems = solver.solve(jobs)

                  if problems:

                      problem_str = self._detect_transitive_stream_collision(problems)

For so far unknown reason (reported upstream), the new libsolv-0.7.4
needs new Solver instance for each solver.solve() call, otherwise
the previous solve() call influences the previous solve() call.

It is not clear for now whether we used the API correctly and the
new libsolv contains a regression, or whether we used the API wrong
and it worked by accident. In both cases, this should be safer way
of running solver.

So, this seems to be libsolv issue, which might get fixed in this PR: https://github.com/openSUSE/libsolv/pull/313.

Not sure... we can wait until this gets fixed in Fedora, or merge this and use this temporarily.

I've backported fix to F29+.

Since our MBS deployments are on RHEL, this shouldn't affect the supported deployments, but it would affect Fedora users performing local builds. I think we can wait until the libsolv update gets submitted to stable though instead of merging and releasing this change. What do you think @jkaluza?

Thanks @ignatenkobrain for the quick fix!

Yes, I was not sure how fast the libsolv fix will be, but it was surprisingly fast, so I'm going to close this workaround PR without merging.

Pull-Request has been closed by jkaluza

5 years ago