| |
@@ -156,9 +156,12 @@
|
| |
|
| |
buildrequires = xmd_mbs['buildrequires']
|
| |
for br_name, details in buildrequires.items():
|
| |
- build = session.query(models.ModuleBuild).filter_by(
|
| |
- name=br_name, stream=details['stream'], version=details['version'],
|
| |
- state=models.BUILD_STATES['ready']).first()
|
| |
+ build = models.ModuleBuild.get_build_from_nsvc(
|
| |
+ session, br_name, details['stream'], details['version'], details['context'],
|
| |
+ state=models.BUILD_STATES['ready'])
|
| |
+ if not build:
|
| |
+ raise RuntimeError(
|
| |
+ 'Buildrequired module %s %r does not exist in MBS db' % (br_name, details))
|
| |
module_tags[build.koji_tag] = build.mmd()
|
| |
|
| |
return module_tags
|
| |
The
buildrequires
inxmd
sections contains particular NSVC of buildrequired module. MBS ignored thecontext
from that NSVC and instead just took.first()
module from MBS db matching the NSV. This is wrong and leads to wrong koji tag inheritance in case of buildrequires with multiple streams built by MSE.It should fix FACTORY-2600.