def rebase_helper_checkers(self, new_version, old_task_id, new_task_id, tmp_dir): argument = [ '--non-interactive', '--builds-nowait', '--results-dir', tmp_dir, '--fedpkg-build-tasks', old_task_id + ',' + new_task_id, new_version, ] rh_app = None rh_stuff = None try: cli = CLI(argument) rh_app = Application(cli) ret_code = rh_app.run() if int(ret_code) != 0: self.log.warn('Comparing package were not successful') rh_stuff = rh_app.get_rebasehelper_data() except Exception: self.log.exception('Compare packages failed.') self.log.info(rh_stuff) return rh_stuff
def rebase_helper(self, package, upstream, tmp, bz): """ Rebase helper part which does a rebase a inform package maintainer whether package was rebased properly. Output information are in dictionary rh_stuff. """ self.log.info("Rebase-helper is going to rebase package") rh_stuff = {} result_rh = -1 rh_app = None url = self.git_url.format(package=package) self.log.info("Cloning %r to %r" % (url, tmp)) sh.git.clone(url, tmp) os.chdir(tmp) try: argument = [ '--non-interactive', '--builds-nowait', '--buildtool', 'fedpkg', upstream ] cli = CLI(argument) rh_app = Application(cli) rh_app.set_upstream_monitoring() self.log.info("Rebasehelper package %s %s" % (package, upstream)) result_rh = rh_app.run() self.log.info("Rebasehelper finish properly") except Exception as ex: self.log.info( 'builsys.py: Rebase helper failed with unknown reason. %s' % str(ex)) rh_stuff = rh_app.get_rebasehelper_data() self.log.info(rh_stuff) return result_rh, rh_stuff