additional fixes
This commit is contained in:
parent
9bfefe782e
commit
04da1d2db3
8 changed files with 90 additions and 97 deletions
|
|
@ -20,9 +20,9 @@ def kiwiBuild(target, arches, desc_url, desc_path, optional_arches=None, profile
|
|||
context.session.assertPerm('image')
|
||||
for i in [desc_url, desc_path, profile, release]:
|
||||
if i is not None:
|
||||
kojihub.check_value_type(i, cast=str)
|
||||
kojihub.convert_value(i, cast=str, check_only=True)
|
||||
if repos:
|
||||
kojihub.check_value_type(repos, cast=list)
|
||||
kojihub.convert_value(repos, cast=list, check_only=True)
|
||||
kojihub.get_build_targets(target, strict=True)
|
||||
arches = koji.parse_arches(arches, strict=True, allow_none=False)
|
||||
optional_arches = koji.parse_arches(optional_arches, strict=True, allow_none=True)
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ def runroot(tagInfo, arch, command, channel=None, **opts):
|
|||
""" Create a runroot task """
|
||||
context.session.assertPerm('runroot')
|
||||
arch = koji.parse_arches(arch, strict=True, allow_none=False)
|
||||
kojihub.check_value_type(command, cast=str)
|
||||
kojihub.convert_value(command, cast=str, check_only=True)
|
||||
taskopts = {
|
||||
'priority': 15,
|
||||
'arch': arch,
|
||||
|
|
|
|||
|
|
@ -16,13 +16,13 @@ from kojihub import ( # noqa: E402
|
|||
_delete_tag,
|
||||
_edit_tag,
|
||||
assert_policy,
|
||||
convert_value,
|
||||
get_build_target,
|
||||
readInheritanceData,
|
||||
get_tag,
|
||||
get_user,
|
||||
nextval,
|
||||
policy_get_user,
|
||||
check_value_type
|
||||
readInheritanceData,
|
||||
)
|
||||
|
||||
CONFIG_FILE = "/etc/koji-hub/plugins/sidetag.conf"
|
||||
|
|
@ -271,11 +271,11 @@ def editSideTag(sidetag, debuginfo=None, rpm_macros=None, remove_rpm_macros=None
|
|||
if debuginfo is not None:
|
||||
kwargs['extra']['with_debuginfo'] = bool(debuginfo)
|
||||
if rpm_macros is not None:
|
||||
check_value_type(rpm_macros, cast=dict)
|
||||
convert_value(rpm_macros, cast=dict, check_only=True)
|
||||
for macro, value in rpm_macros.items():
|
||||
kwargs['extra']['rpm.macro.%s' % macro] = value
|
||||
if remove_rpm_macros is not None:
|
||||
check_value_type(remove_rpm_macros, cast=list)
|
||||
convert_value(remove_rpm_macros, cast=list, check_only=True)
|
||||
kwargs['remove_extra'] = ['rpm.macro.%s' % m for m in remove_rpm_macros]
|
||||
|
||||
_edit_tag(sidetag['id'], **kwargs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue