mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-23 18:21:42 +08:00
Generate koji tag from MBS and use informative name
koji now supports tags with max length of 256, we can use
more informative tag name instead of the hash one.
The new format of koji tag name is:
module-<name>-<stream>-<version>-<context>
However when the generated tag's length > (256 - len('build')), we
fallback to the old way of name in hash format (module-<hash>).
In this change, koji tag is always generated from MBS itself, even
with pdc resolver.
FIXES: #918 #925
This commit is contained in:
@@ -142,19 +142,6 @@ class PDCResolver(GenericResolver):
|
||||
def _get_module(self, name, stream, version=None, context=None, active=None, strict=False):
|
||||
return self._get_modules(name, stream, version, context, active, strict)[0]
|
||||
|
||||
def get_module_tag(self, name, stream, version=None, context=None, strict=False):
|
||||
"""
|
||||
:param name: a module's name
|
||||
:param stream: a module's stream
|
||||
:param version: a module's version
|
||||
:param context: a module's context
|
||||
:param strict: Normally this function returns None if no module can be
|
||||
found. If strict=True, then an UnprocessableEntity is raised.
|
||||
:return: koji tag string
|
||||
"""
|
||||
return self._get_module(
|
||||
name, stream, version, context, active=True, strict=strict)['koji_tag']
|
||||
|
||||
def get_module_modulemds(self, name, stream, version=None, context=None, strict=False):
|
||||
"""
|
||||
Gets the module modulemds from the resolver.
|
||||
|
||||
Reference in New Issue
Block a user