From 3b95b09408555cab5ca7737d717462312ed883ac Mon Sep 17 00:00:00 2001 From: Chenxiong Qi Date: Aug 05 2019 08:09:29 +0000 Subject: Fix name s2nsvc in MMDResolver.solve The original name s2nsvc does not contain the name of arch. Signed-off-by: Chenxiong Qi --- diff --git a/module_build_service/mmd_resolver.py b/module_build_service/mmd_resolver.py index b31e2d1..a50d641 100644 --- a/module_build_service/mmd_resolver.py +++ b/module_build_service/mmd_resolver.py @@ -447,7 +447,7 @@ class MMDResolver(object): self.pool.createwhatprovides() # "solvable to n:s:v:c" - s2nsvc = lambda s: "%s:%s" % (s.name, s.arch) + s2nsvca = lambda s: "%s:%s" % (s.name, s.arch) # "solvable to n:s" s2ns = lambda s: ":".join(s.name.split(":", 2)[:2]) @@ -474,7 +474,7 @@ class MMDResolver(object): elif len(requires) == 0: # Return early in case the requires is empty, because it basically means # the module has no buildrequires section. - return set([frozenset([s2nsvc(src)])]) + return set([frozenset([s2nsvca(src)])]) requires = requires[0] src_alternatives = alternatives[src] = collections.OrderedDict() @@ -521,7 +521,7 @@ class MMDResolver(object): # This will allow us to group alternatives for single NS in case of First # policy and later return just the first alternative. if policy == MMDResolverPolicy.All: - kfunc = s2nsvc + kfunc = s2nsvca elif policy == MMDResolverPolicy.First: kfunc = s2ns # `key` contains tuple similar to "('gtk:1', 'foo:1')" @@ -620,7 +620,7 @@ class MMDResolver(object): # Convert the solvables in alternatives to nsvc and return them as set of frozensets. return set( - frozenset(s2nsvc(s) for s in transactions[0]) + frozenset(s2nsvca(s) for s in transactions[0]) for src_alternatives in alternatives.values() for transactions in src_alternatives.values() )