mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-02-09 16:14:59 +08:00
Fix content generator using name instead of mmd content
The original variable name was confusing and caused the misuse. This has been fixed as well
This commit is contained in:
@@ -47,12 +47,13 @@ class KojiContentGenerator(object):
|
||||
"""
|
||||
self.owner = module.owner
|
||||
self.module = module
|
||||
self.module_str = module.name
|
||||
self.module_name = module.name
|
||||
self.mmd = module.modulemd
|
||||
self.config = config
|
||||
|
||||
|
||||
def __repr__(self):
|
||||
return "<KojiContentGenerator module: %s>" % (self.module_str)
|
||||
return "<KojiContentGenerator module: %s>" % (self.module_name)
|
||||
|
||||
def _koji_rpms_in_tag(self, tag):
|
||||
""" Return the list of koji rpms in a tag. """
|
||||
@@ -142,9 +143,9 @@ class KojiContentGenerator(object):
|
||||
'buildroot_id': 1,
|
||||
'arch': "noarch",
|
||||
'type': 'modulemd',
|
||||
'filesize': len(self.module_str),
|
||||
'filesize': len(self.mmd),
|
||||
'checksum_type': 'md5',
|
||||
'checksum': hashlib.md5(self.module_str).hexdigest(),
|
||||
'checksum': hashlib.md5(self.mmd).hexdigest(),
|
||||
'filename': 'modulemd.yaml',
|
||||
'components': components
|
||||
}
|
||||
|
||||
@@ -599,8 +599,8 @@
|
||||
}
|
||||
],
|
||||
"arch": "noarch",
|
||||
"filesize": 5,
|
||||
"checksum": "ee434023cf89d7dfb21f63d64f0f9d74",
|
||||
"filesize": 1134,
|
||||
"checksum": "bf1615b15f6a0fee485abe94af6b56b6",
|
||||
"checksum_type": "md5",
|
||||
"type": "modulemd"
|
||||
}
|
||||
@@ -615,7 +615,7 @@
|
||||
"typeinfo": {
|
||||
"modulemd": {
|
||||
"module_build_service_id": 1,
|
||||
"modulemd_str": ""
|
||||
"modulemd_str": "# Document type identifier\ndocument: modulemd\n# Module metadata format version\nversion: 1\ndata:\n # Module name, optional\n # Typically filled in by the buildsystem, using the VCS repository\n # name as the name of the module.\n name: nginx\n # Module update stream, optional\n # Typically filled in by the buildsystem, using the VCS branch name\n # as the name of the stream.\n stream: 1\n # Module version, integer, optional, cannot be negative\n # Typically filled in by the buildsystem, using the VCS commit\n # timestamp. Module version defines upgrade path for the particular\n # update stream.\n version: 2\n # A short summary describing the module, required\n summary: An example nginx module\n # A verbose description of the module, required\n description: >\n A module for the tests of module build service\n # Module and content licenses in the Fedora license identifier\n # format, required\n license:\n # Module license, required\n # This list covers licenses used for the module metadata, SPEC\n # files or extra patches\n module:\n - MIT\n"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user