else:
specfile = utils.find_spec('%s/%s' % (prjdir, packagingdir))
if not specfile:
- specfile = '%s/%s/%s.spec' % (prjdir, packagingdir, prj)
+ msg = "[ERROR]: Packaging directory contains multiply spec files, backend service can not decide which spec file to use. Please use OBS_PACKAGE parameter in scm/git-obs-mapping project to specify the target spec file or contact system administrator for more details."
+ mygerrit.review(commit = GERRIT_PATCHSET_REVISION, message = msg)
+ continue
print('specfile %s' % specfile)
# build the package under home project of backend service user
print 'submit this change to OBS for build check...'
temp_build = TempPackageBuild(OBS_API_URL, OBS_OSCRC_PATH, buildcheck_project, spec.name)
if 'NoRepo' == temp_build.remote_build(obs_dest_prj, prjdir, 'GIT_PROJECT: %s\nCOMMIT_ID: %s\nOWNER_EMAIL: %s' % (GERRIT_PROJECT, GERRIT_PATCHSET_REVISION, GERRIT_CHANGE_OWNER_EMAIL)):
- msg = "[BUILD CHECK RESULT] Can not test build against to project %s, which currently has no build targets defined. Please contact the build systerm administrator." %(obs_dest_prj)
+ msg = "[BUILD CHECK RESULT] Can not test build against to project %s, which currently has no build targets defined. Please contact the build system administrator." %(obs_dest_prj)
mygerrit.review(commit = GERRIT_PATCHSET_REVISION, message = msg)
except Exception, err:
print '%s' % err