def _write_pkg_results_to_BUILD_STATUS_DB(pkg, out): for node in BBSreportutils.supported_nodes(pkg): # INSTALL status if BBSvars.buildtype != 'bioc-longtests': stage = 'install' status = _read_status_from_summary_file(pkg, node.node_id, stage) _write_status_to_BUILD_STATUS_DB(out, pkg, node.node_id, stage, status) # BUILD status stage = 'buildsrc' status = _read_status_from_summary_file(pkg, node.node_id, stage) _write_status_to_BUILD_STATUS_DB(out, pkg, node.node_id, stage, status) skipped_is_OK = status in ['TIMEOUT', 'ERROR'] # CHECK status if BBSvars.buildtype not in ['workflows', 'books']: stage = 'checksrc' if skipped_is_OK: status = 'skipped' else: status = _read_status_from_summary_file( pkg, node.node_id, stage) _write_status_to_BUILD_STATUS_DB(out, pkg, node.node_id, stage, status) # BUILD BIN status if BBSreportutils.is_doing_buildbin(node): stage = 'buildbin' if skipped_is_OK: status = 'skipped' else: status = _read_status_from_summary_file( pkg, node.node_id, stage) _write_status_to_BUILD_STATUS_DB(out, pkg, node.node_id, stage, status) return
def send_notification(pkg): package_status = BBSreportutils.get_pkg_field_from_meat_index( pkg, 'PackageStatus') if package_status == 'Deprecated': return maintainer_email = BBSreportutils.get_pkg_field_from_meat_index( pkg, 'MaintainerEmail') #print "%s %s %s %s" % (pkg, version, maintainer, maintainer_email) #key = 'Last Changed Date' #last_changed_date = BBSreportutils.get_vcs_meta(pkg, key) #key = 'Last Changed Rev' #last_changed_rev = BBSreportutils.get_vcs_meta(pkg, key) problem_descs = [] for node in BBSreportutils.supported_nodes(pkg): stage = 'install' status = BBSreportutils.get_status_from_db(pkg, node.id, stage) if status in ["TIMEOUT", "ERROR"]: leafreport_rURL = BBSreportutils.get_leafreport_rel_url( pkg, node.id, stage) problem_desc = " o %s for 'R CMD INSTALL' on %s. See the details here:\n" % (status, node.id) \ + " %s%s\n" % (BBSreportutils.data_source, leafreport_rURL) problem_descs.append(problem_desc) stage = 'buildsrc' status = BBSreportutils.get_status_from_db(pkg, node.id, stage) if status in ["TIMEOUT", "ERROR"]: leafreport_rURL = BBSreportutils.get_leafreport_rel_url( pkg, node.id, stage) problem_desc = " o %s for 'R CMD build' on %s. See the details here:\n" % (status, node.id) \ + " %s%s\n" % (BBSreportutils.data_source, leafreport_rURL) problem_descs.append(problem_desc) stage = 'checksrc' status = BBSreportutils.get_status_from_db(pkg, node.id, stage) if status in ["TIMEOUT", "ERROR"]: leafreport_rURL = BBSreportutils.get_leafreport_rel_url( pkg, node.id, stage) problem_desc = " o %s for 'R CMD check' on %s. See the details here:\n" % (status, node.id) \ + " %s%s\n" % (BBSreportutils.data_source, leafreport_rURL) problem_descs.append(problem_desc) if len(problem_descs) == 0: return if maintainer_email == "*****@*****.**": to_addrs = ["*****@*****.**"] else: to_addrs = [maintainer_email] subject = "%s problems reported in the %s" % \ (pkg, BBSreportutils.REPORT_TITLE) msg = "%s\nHi %s maintainer,\n\n" % (msg_head, pkg) \ + "According to the %s,\n" % BBSreportutils.REPORT_TITLE \ + "the %s package has the following problem(s):\n\n" % pkg \ + "%s\n%s\n%s" % ('\n'.join(problem_descs), msg_tail, msg_footnote) if arg1 == "": print "###########################################################" print "maintainer_email: %s\n" % maintainer_email print "subject: %s\n" % subject print msg print "" print "BBS> Notifying maintainer(s) of %s:" % pkg sys.stdout.flush() bbs.email.sendtextmail(from_addr, to_addrs, subject, msg) return
def make_STATUS_DB(allpkgs): print "BBS> [make_STATUS_DB] BEGIN..." out = open(BBSreportutils.STATUS_DB_file, 'w') for pkg in allpkgs: for node in BBSreportutils.supported_nodes(pkg): # INSTALL status stagecmd = 'install' status = get_status_from_summary_file(pkg, node.id, stagecmd) out.write('%s#%s#%s: %s\n' % (pkg, node.id, stagecmd, status)) # BUILD status stagecmd = 'buildsrc' status = get_status_from_summary_file(pkg, node.id, stagecmd) out.write('%s#%s#%s: %s\n' % (pkg, node.id, stagecmd, status)) skipped_is_OK = status in ["TIMEOUT", "ERROR"] # CHECK status stagecmd = 'checksrc' if skipped_is_OK: status = "skipped" else: status = get_status_from_summary_file(pkg, node.id, stagecmd) out.write('%s#%s#%s: %s\n' % (pkg, node.id, stagecmd, status)) if BBSreportutils.is_doing_buildbin(node): # BUILD BIN status stagecmd = 'buildbin' if skipped_is_OK: status = "skipped" else: status = get_status_from_summary_file(pkg, node.id, stagecmd) out.write('%s#%s#%s: %s\n' % (pkg, node.id, stagecmd, status)) out.close() print "BBS> [make_STATUS_DB] END" return
def send_notification(pkg): package_status = BBSreportutils.get_pkg_field_from_meat_index(pkg, 'PackageStatus') if package_status == 'Deprecated': return maintainer_email = BBSreportutils.get_pkg_field_from_meat_index(pkg, 'MaintainerEmail') #print "%s %s %s %s" % (pkg, version, maintainer, maintainer_email) #key = 'Last Changed Date' #last_changed_date = BBSreportutils.get_vcs_meta(pkg, key) #key = 'Last Changed Rev' #last_changed_rev = BBSreportutils.get_vcs_meta(pkg, key) problem_descs = [] for node in BBSreportutils.supported_nodes(pkg): stage = 'install' status = BBSreportutils.get_status_from_db(pkg, node.id, stage) if status in ["TIMEOUT", "ERROR"]: leafreport_rURL = BBSreportutils.get_leafreport_rel_url(pkg, node.id, stage) problem_desc = " o %s for 'R CMD INSTALL' on %s. See the details here:\n" % (status, node.id) \ + " %s%s\n" % (BBSreportutils.data_source, leafreport_rURL) problem_descs.append(problem_desc) stage = 'buildsrc' status = BBSreportutils.get_status_from_db(pkg, node.id, stage) if status in ["TIMEOUT", "ERROR"]: leafreport_rURL = BBSreportutils.get_leafreport_rel_url(pkg, node.id, stage) problem_desc = " o %s for 'R CMD build' on %s. See the details here:\n" % (status, node.id) \ + " %s%s\n" % (BBSreportutils.data_source, leafreport_rURL) problem_descs.append(problem_desc) stage = 'checksrc' status = BBSreportutils.get_status_from_db(pkg, node.id, stage) if status in ["TIMEOUT", "ERROR"]: leafreport_rURL = BBSreportutils.get_leafreport_rel_url(pkg, node.id, stage) problem_desc = " o %s for 'R CMD check' on %s. See the details here:\n" % (status, node.id) \ + " %s%s\n" % (BBSreportutils.data_source, leafreport_rURL) problem_descs.append(problem_desc) if len(problem_descs) == 0: return if maintainer_email == "*****@*****.**": to_addrs = ["*****@*****.**"] else: to_addrs = [maintainer_email] subject = "%s problems reported in the %s" % \ (pkg, BBSreportutils.REPORT_TITLE) msg = "%s\nHi %s maintainer,\n\n" % (msg_head, pkg) \ + "According to the %s,\n" % BBSreportutils.REPORT_TITLE \ + "the %s package has the following problem(s):\n\n" % pkg \ + "%s\n%s\n%s" % ('\n'.join(problem_descs), msg_tail, msg_footnote) if arg1 == "": print "###########################################################" print "maintainer_email: %s\n" % maintainer_email print "subject: %s\n" % subject print msg print "" print "BBS> Notifying maintainer(s) of %s:" % pkg sys.stdout.flush() bbs.email.sendtextmail(from_addr, to_addrs, subject, msg) return
def send_notification(pkg): maintainer_email = BBSreportutils.get_pkg_field_from_meat_index( pkg, 'MaintainerEmail') #print "%s %s %s %s" % (pkg, version, maintainer, maintainer_email) #key = 'Last Changed Date' #last_changed_date = BBSreportutils.get_svn_info(pkg, key) #key = 'Last Changed Rev' #last_changed_rev = BBSreportutils.get_svn_info(pkg, key) problem_descs = [] for node in BBSreportutils.supported_nodes(pkg): stagecmd = 'install' status = BBSreportutils.get_status_from_db(pkg, node.id, stagecmd) if status in ["TIMEOUT", "ERROR"]: leafreport_rURL = BBSreportutils.get_leafreport_rURL( pkg, node.id, stagecmd) problem_desc = " o %s for 'R CMD INSTALL' on %s. See the details here:\n" % (status, node.id) \ + " %s%s\n" % (BBSreportutils.data_source, leafreport_rURL) problem_descs.append(problem_desc) stagecmd = 'buildsrc' status = BBSreportutils.get_status_from_db(pkg, node.id, stagecmd) if status in ["TIMEOUT", "ERROR"]: leafreport_rURL = BBSreportutils.get_leafreport_rURL( pkg, node.id, stagecmd) problem_desc = " o %s for 'R CMD build' on %s. See the details here:\n" % (status, node.id) \ + " %s%s\n" % (BBSreportutils.data_source, leafreport_rURL) problem_descs.append(problem_desc) stagecmd = 'checksrc' status = BBSreportutils.get_status_from_db(pkg, node.id, stagecmd) if status in ["TIMEOUT", "ERROR"]: leafreport_rURL = BBSreportutils.get_leafreport_rURL( pkg, node.id, stagecmd) problem_desc = " o %s for 'R CMD check' on %s. See the details here:\n" % (status, node.id) \ + " %s%s\n" % (BBSreportutils.data_source, leafreport_rURL) problem_descs.append(problem_desc) if len(problem_descs) != 0: if maintainer_email == "*****@*****.**": to_addrs = ["*****@*****.**"] else: to_addrs = [maintainer_email] subject = "%s problems reported by the \"%s\" for %s" \ % (pkg, main_page_title, BBSreportutils.get_build_label()) msg = "%s\nHi %s maintainer,\n\n" % (msg_head, pkg) \ + "According to the \"%s\" for %s,\n" % (main_page_title, BBSreportutils.get_build_label()) \ + "the %s package has the following problem(s):\n\n" % pkg \ + "%s\n%s\n%s" % ('\n'.join(problem_descs), msg_tail, msg_footnote) if arg1 == "": print "###########################################################" print "maintainer_email: %s\n" % maintainer_email print "subject: %s\n" % subject print msg print "" bbs.email.sendtextmail(from_addr, to_addrs, subject, msg) return
def send_notification(pkg): version = BBSreportutils.get_pkg_field_from_meat_index(pkg, 'Version') maintainer = BBSreportutils.get_pkg_field_from_meat_index(pkg, 'Maintainer') maintainer_email = BBSreportutils.get_pkg_field_from_meat_index(pkg, 'MaintainerEmail') #print "%s %s %s %s" % (pkg, version, maintainer, maintainer_email) #key = 'Last Changed Date' #last_changed_date = BBSreportutils.get_svn_info(pkg, key) #key = 'Last Changed Rev' #last_changed_rev = BBSreportutils.get_svn_info(pkg, key) problem_descs = [] for node in BBSreportutils.supported_nodes(pkg): stagecmd = 'install' status = BBSreportutils.get_status_from_db(pkg, node.id, stagecmd) if status in ["TIMEOUT", "ERROR"]: leafreport_rURL = BBSreportutils.get_leafreport_rURL(pkg, node.id, stagecmd) problem_desc = " o %s for 'R CMD INSTALL' on %s. See the details here:\n" % (status, node.id) \ + " %s%s\n" % (BBSreportutils.data_source, leafreport_rURL) problem_descs.append(problem_desc) stagecmd = 'buildsrc' status = BBSreportutils.get_status_from_db(pkg, node.id, stagecmd) if status in ["TIMEOUT", "ERROR"]: leafreport_rURL = BBSreportutils.get_leafreport_rURL(pkg, node.id, stagecmd) problem_desc = " o %s for 'R CMD build' on %s. See the details here:\n" % (status, node.id) \ + " %s%s\n" % (BBSreportutils.data_source, leafreport_rURL) problem_descs.append(problem_desc) stagecmd = 'checksrc' status = BBSreportutils.get_status_from_db(pkg, node.id, stagecmd) if status in ["TIMEOUT", "ERROR"]: leafreport_rURL = BBSreportutils.get_leafreport_rURL(pkg, node.id, stagecmd) problem_desc = " o %s for 'R CMD check' on %s. See the details here:\n" % (status, node.id) \ + " %s%s\n" % (BBSreportutils.data_source, leafreport_rURL) problem_descs.append(problem_desc) if len(problem_descs) != 0: if maintainer_email == "*****@*****.**": to_addrs = ["*****@*****.**"] else: to_addrs = [maintainer_email] subject = "%s problems reported by the \"%s\" for %s" \ % (pkg, main_page_title, BBSreportutils.get_build_label()) msg = "%s\nHi %s maintainer,\n\n" % (msg_head, pkg) \ + "According to the \"%s\" for %s,\n" % (main_page_title, BBSreportutils.get_build_label()) \ + "the %s package has the following problem(s):\n\n" % pkg \ + "%s\n%s\n%s" % ('\n'.join(problem_descs), msg_tail, msg_footnote) if arg1 == "": print "###########################################################" print "maintainer_email: %s\n" % maintainer_email print "subject: %s\n" % subject print msg print "" bbs.email.sendtextmail(from_addr, to_addrs, subject, msg) return
def send_notification(dcf_record): pkg = dcf_record['Package'] package_status = dcf_record.get('PackageStatus') if package_status == 'Deprecated': return maintainer_email = dcf_record['MaintainerEmail'] #print("%s %s %s %s" % (pkg, version, maintainer, maintainer_email)) #key = 'Last Changed Date' #last_changed_date = BBSreportutils.get_vcs_meta(pkg, key) #key = 'Last Changed Rev' #last_changed_rev = BBSreportutils.get_vcs_meta(pkg, key) problem_descs = [] for node in BBSreportutils.supported_nodes(pkg): problem_descs += collect_problems(pkg, node) if len(problem_descs) == 0: return report_nodes = BBSutils.getenv('BBS_REPORT_NODES') report_title = BBSreportutils.make_report_title(report_nodes) if maintainer_email == "*****@*****.**": to_addrs = ["*****@*****.**"] else: to_addrs = [maintainer_email] subject = "%s problems reported in the %s" % (pkg, report_title) msg = "%s\nHi %s maintainer,\n\n" % (msg_head, pkg) \ + "According to the %s,\n" % report_title \ + "the %s package has the following problem(s):\n\n" % pkg \ + "%s\n%s\n%s" % ('\n'.join(problem_descs), msg_tail, msg_footnote) if arg1 == "": print("###########################################################") print("maintainer_email: %s\n" % maintainer_email) print("subject: %s\n" % subject) print(msg) print() print("BBS> Notifying maintainer(s) of %s:" % pkg) sys.stdout.flush() bbs.notify.sendtextmail(from_addr, to_addrs, subject, msg) return