#116 Fix verbose resolve-deps after allowing SRPMs in its output
Merged a year ago by kalev. Opened a year ago by tpopela.
modularity/ tpopela/fedmod fix-libsolv-search-criteria  into  master

file modified
+5 -3
@@ -300,9 +300,11 @@ 

  

  

  def _get_rpm(pool, pkg):

-     sel = pool.select(pkg,

-                       solv.Selection.SELECTION_NAME

-                       | solv.Selection.SELECTION_DOTARCH)

+     search_criteria = (solv.Selection.SELECTION_NAME

+                     | solv.Selection.SELECTION_DOTARCH)

+     if "." in pkg:

+         search_criteria  |= solv.Selection.SELECTION_CANON

+     sel = pool.select(pkg, search_criteria)

      if sel.isempty():

          raise RuntimeError("Couldn't find package {}".format(pkg))

      found = sel.solvables()

In the commit 9b8b59 we've allowed SRPMs to be listed in the verbose of
output of fedora resolve-deps. This uncovered a path where we're
calling libsolv on the full NVR as that's what included in the data that
are passed to print_transaction() function. Extend the search criteria
to also cover the canonical selection for resolving the NVR specified
packages (similarly to what we've done in commit c86735)

I sadly didn't hit this previously as I've this change applied locally
when I was debugging https://pagure.io/modularity/fedmod/pull-request/113
and left it there when working on the commit 9b8b59.

Looks good to me. Thanks!

Pull-Request has been merged by kalev

a year ago
Metadata