mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-07 20:58:27 +08:00
PDCResolver: always look for local modules.
Modules that might have been added to a Mock build with --add-local-build were only checked in one place, but there were two other places where data was loaded directly from the PDC.
This commit is contained in:
@@ -156,6 +156,11 @@ class PDCResolver(GenericResolver):
|
||||
:return: List of Modulemd metadata instances matching the query
|
||||
"""
|
||||
yaml = None
|
||||
|
||||
local_modules = models.ModuleBuild.local_modules(db.session, name, stream)
|
||||
if local_modules:
|
||||
return [m.mmd() for m in local_modules]
|
||||
|
||||
modules = self._get_modules(name, stream, version, context, active=True, strict=strict)
|
||||
if not modules:
|
||||
return []
|
||||
@@ -263,6 +268,13 @@ class PDCResolver(GenericResolver):
|
||||
buildrequires = queried_mmd.get_xmd()['mbs']['buildrequires']
|
||||
# Queue up the next tier of deps that we should look at..
|
||||
for name, details in buildrequires.items():
|
||||
local_modules = models.ModuleBuild.local_modules(
|
||||
db.session, name, details['stream'])
|
||||
if local_modules:
|
||||
for m in local_modules:
|
||||
module_tags[m.koji_tag] = m.mmd()
|
||||
continue
|
||||
|
||||
modules = self._get_modules(
|
||||
name, details['stream'], details['version'],
|
||||
details['context'], active=True, strict=True)
|
||||
|
||||
Reference in New Issue
Block a user