| |
@@ -5809,7 +5809,7 @@
|
| |
data['cg_id'] = cg_id
|
| |
# CGs shouldn't have to worry about epoch
|
| |
data.setdefault('epoch', None)
|
| |
- build_id = new_build(data, strict=True)
|
| |
+ build_id = new_build(data, strict=False)
|
| |
# store token
|
| |
token = generate_token()
|
| |
insert = InsertProcessor(table='build_reservations')
|
| |
@@ -5855,6 +5855,7 @@
|
| |
binfo = get_build(build_id, strict=True)
|
| |
koji.plugin.run_callbacks('postBuildStateChange', attribute='state',
|
| |
old=koji.BUILD_STATES['BUILDING'], new=state, info=binfo)
|
| |
+ clear_reservation(build_id)
|
| |
|
| |
|
| |
def cg_import(metadata, directory, token=None):
|
| |
CGInitBuild will fail on already existing build (even canceled/failed),
so it can't be used to reuse previously refunded nvr.
CGRefund build doesn't delete reservation. Having reservation token for
build which is no more in BUILDING doesn't make much sense and blocks
and reservation of same NVR.
Fixes: https://pagure.io/koji/issue/1852