# the tempfile is designed for python policycheck.py, bash script doesn't use it
try:
- execfile(os.path.expanduser('~/.config/rpmlint'))
+ rpmlint_config = os.path.join(os.getenv('GIT_CACHE_DIR'),
+ os.getenv('RPMLINT_PRJ'),
+ 'rpmlint')
+ if not os.path.isfile(rpmlint_config):
+ rpmlint_config = '~/.config/rpmlint'
+ execfile(os.path.expanduser(rpmlint_config))
except IOError:
pass
if not clone_gitproject(GERRIT_PROJECT, prjdir):
end('retry')
- # if scm/rpmlint-config changed, update HOME/.config/rpmlint
- print '\n', GERRIT_PROJECT, RPMLINT_PRJ
- if GERRIT_PROJECT == RPMLINT_PRJ:
- if not os.path.exists('%s/.config' % JENKINS_HOME):
- os.makedirs('%s/.config' % JENKINS_HOME)
- shutil.copy2('%s/rpmlint' % prjdir, '%s/.config/rpmlint' % JENKINS_HOME)
- print '\nPulled scm/rpmlint-config change to local, exit now'
- end('success')
-
mygit = Git(prjdir)
mygerrit = gerrit.Gerrit(GERRIT_HOSTNAME, GERRIT_USERNAME, GERRIT_SSHPORT)