From 2e9c935c37b74edc43f0f6f235a33d5c1255510e Mon Sep 17 00:00:00 2001 From: Thomas Oulevey Date: May 23 2018 07:51:44 +0000 Subject: Compare SCM URLs only if build from an SCM This patch allow to merge source rpm not only build for SCMs. --- diff --git a/hub/kojihub.py b/hub/kojihub.py index af87e77..e3c78b9 100644 --- a/hub/kojihub.py +++ b/hub/kojihub.py @@ -6006,11 +6006,12 @@ def merge_scratch(task_id): # Intentionally skip checking the build task state. # There are cases where the build can be valid even though the task has failed, # e.g. tagging failures. - - # compare the task and build and make sure they are compatible with importing - if task_info['request'][0] != build_task_info['request'][0]: - raise koji.ImportError('SCM URLs for the task and build do not match: %s, %s' % \ - (task_info['request'][0], build_task_info['request'][0])) + # Compare SCM URLs only if build from an SCM + if not task_info['request'][0].startswith('cli-build/'): + # compare the task and build and make sure they are compatible with importing + if task_info['request'][0] != build_task_info['request'][0]: + raise koji.ImportError('SCM URLs for the task and build do not match: %s, %s' % \ + (task_info['request'][0], build_task_info['request'][0])) build_arches = set() for rpm in list_rpms(buildID=build['id']): if rpm['arch'] == 'src':